X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=mk%2Ftarget.mk;h=2cb9d0fb6ebaf7c18bc1cdeb6a9ecc6f6aeb7b6b;hb=e40b7641a33099f6abeaadfe562c221be4891120;hp=ac222242ed0f59b892dbbbaaf7484af7bbdb2d5b;hpb=8c086331fdf6977aea94b69337ed4c9723b6de19;p=ghc-hetmet.git diff --git a/mk/target.mk b/mk/target.mk index ac22224..2cb9d0f 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -44,6 +44,11 @@ PRE_SRCS := $(ALL_SRCS) include $(TOP)/mk/package.mk +################################################################### +# Suffix rules for Haskell, C and literate + +include $(TOP)/mk/suffix.mk + ################################################################## # FPtools standard targets # @@ -72,7 +77,13 @@ include $(TOP)/mk/package.mk # Compiler produced files that are targets of the source's imports. MKDEPENDHS_OBJ_SUFFICES=o -depend :: $(MKDEPENDHS_SRCS) $(MKDEPENDC_SRCS) +ifneq "$(STAMP_PKG_CONF)" "" +PKGCONF_DEP = $(STAMP_PKG_CONF) +else +PKGCONF_DEP = +endif + +depend :: $(MKDEPENDHS_SRCS) $(MKDEPENDC_SRCS) $(STAMP_PKG_CONF) @$(RM) .depend @touch .depend ifneq "$(DOC_SRCS)" "" @@ -232,9 +243,6 @@ else $(HS_PROG) :: $(HS_OBJS) $(CC) -o $@ $(HC_BOOT_CC_OPTS) $(HC_BOOT_LD_OPTS) $(HS_OBJS) $(HC_BOOT_LIBS) endif - -# for building a Haskell program, we add FptoolsHcOpts -SRC_HC_OPTS += $(FptoolsHcOpts) endif #---------------------------------------- @@ -296,20 +304,18 @@ SRC_HC_OPTS += -split-objs ifeq "$(ArSupportsInput)" "" define BUILD_LIB $(RM) $@ $@.tmp -(echo $(STUBOBJS) $(EXTRA_OBJS); $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o') | xargs ar q $@.tmp -$(RANLIB) $@.tmp -$(MV) $@.tmp $@ +(echo $(STUBOBJS) $(C_OBJS); $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o') | xargs $(AR) $@ +$(RANLIB) $@ endef else define BUILD_LIB $(RM) $@ $@.tmp -echo $(STUBOBJS) > $@.list -echo $(EXTRA_OBJS) >> $@.list +echo $(STUBOBJS) > $@.list +echo $(C_OBJS) >> $@.list $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o' >> $@.list -$(AR) $(AR_OPTS) $@.tmp $(ArSupportsInput) $@.list +$(AR) $(AR_OPTS) $@ $(ArSupportsInput) $@.list $(RM) $@.list -$(RANLIB) $@.tmp -$(MV) $@.tmp $@ +$(RANLIB) $@ endef endif @@ -1113,7 +1119,7 @@ endif # the --no-print-directory flag which is passed to recursive # invocations of make. # -ifeq "$(way)" "" +#ifeq "$(way)" "" ifneq "$(SUBDIRS)" "" # we override the 'boot', 'all' and 'install' targets in the top @@ -1160,7 +1166,7 @@ $(ALL_TARGET) docs runtests $(BOOT_TARGET) TAGS clean distclean mostlyclean main @echo "------------------------------------------------------------------------" endif -endif +#endif # # Selectively building subdirectories.