[project @ 2002-05-01 18:48:07 by sof]
[ghc-hetmet.git] / mk / target.mk
index 1e9a4d4..ae851cd 100644 (file)
@@ -296,14 +296,15 @@ SRC_HC_OPTS += -split-objs
 ifeq "$(ArSupportsInput)" ""
 define BUILD_LIB
 $(RM) $@ $@.tmp
-(echo $(STUBOBJS); $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o') | xargs ar q $@.tmp
+(echo $(STUBOBJS) $(EXTRA_OBJS); $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o') | xargs ar q $@.tmp
 $(RANLIB) $@.tmp
 $(MV) $@.tmp $@
 endef
 else
 define BUILD_LIB
 $(RM) $@ $@.tmp
-echo $(STUBOBJS) > $@.list
+echo $(STUBOBJS)    > $@.list
+echo $(EXTRA_OBJS) >> $@.list
 $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o' >> $@.list
 $(AR) $(AR_OPTS) $@.tmp $(ArSupportsInput) $@.list
 $(RM) $@.list
@@ -1100,6 +1101,7 @@ endif
 # the --no-print-directory flag which is passed to recursive
 # invocations of make.
 #
+ifeq "$(way)" ""
 ifneq "$(SUBDIRS)" ""
 
 # we override the 'boot', 'all' and 'install' targets in the top
@@ -1146,6 +1148,7 @@ $(ALL_TARGET) docs runtests $(BOOT_TARGET) TAGS clean distclean mostlyclean main
        @echo "------------------------------------------------------------------------"
 
 endif
+endif
 
 #
 # Selectively building subdirectories.