Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : cross-compiler-alienless
http://hackage.haskell.org/trac/ghc/changeset/a18f0096c6c9b1d649067fc73c04f43fef7bef82 >--------------------------------------------------------------- commit a18f0096c6c9b1d649067fc73c04f43fef7bef82 Author: Gabor Greif <ggr...@gmail.com> Date: Thu Sep 13 14:02:41 2012 +0200 Checkpointing some makefile simplifications that I attempted. This is not in a working state yet, as we are trying to build something that goes into the build/ dir but it is not yet created. Not sure how to add dependency tracking properly. Btw., Ian is working in this area on the master branch so there will be a bunch of conflicts anyway :-( >--------------------------------------------------------------- includes/ghc.mk | 44 +++++++++++--------------------------------- 1 files changed, 11 insertions(+), 33 deletions(-) diff --git a/includes/ghc.mk b/includes/ghc.mk index b41f92e..5b7bd51 100644 --- a/includes/ghc.mk +++ b/includes/ghc.mk @@ -141,8 +141,13 @@ DerivedConstants.h : else includes_dist-derivedconstants_CC_OPTS = -Iincludes/dist-derivedconstants/build +includes_dist-derivedconstants_C_SRCS = mkDerivedConstants.c +includes_dist-derivedconstants_PROG = mkDerivedConstants$(exeext) ifeq "$(BuildingCrossCompiler)-$(AlienScript)" "YES-" +includes/dist-derivedconstants/build/Capability.cross.h \ +includes/dist-derivedconstants/build/Rts.cross.h: $(includes_H_CONFIG) $(includes_H_PLATFORM) $(includes_H_FILES) $$(rts_H_FILES) + includes/dist-derivedconstants/build/Capability.cross.h: rts/Capability.h | $$(dir $$@)/. $(CC_STAGE1) -E -DPROFILING -DTHREADED_RTS $(CONF_CPP_OPTS_STAGE1) $(rts_CC_OPTS) $< > $@ includes/dist-derivedconstants/build/Rts.cross.h: includes/Rts.h | $$(dir $$@)/. @@ -155,17 +160,7 @@ includes/dist-derivedconstants/build/mkDerivedConstants.cross.o: includes/dist-d includes/dist-derivedconstants/build/SizeMacros.h: includes/mkSizeMacros.cross.awk includes/dist-derivedconstants/build/SizeMacros.h: includes/dist-derivedconstants/build/mkDerivedConstants.cross.o | $$(dir $$@)/. $(NM) $< | $(SORT) | awk -f includes/mkSizeMacros.cross.awk > $@ - -includes_dist-derivedconstants_C_SRCS = mkDerivedConstants.c # XXX NM_STAGE1 AWK -includes_dist-derivedconstants_PROG = mkDerivedConstants$(exeext) - -includes/dist-derivedconstants/build/mkDerivedConstants$(exeext) : includes/dist-derivedconstants/build/SizeMacros.h -includes/dist-derivedconstants/build/mkDerivedConstants$(exeext) : includes/mkDerivedConstants.c - $(CC_STAGE0) $(includes_dist-derivedconstants_CC_OPTS) $(CONF_CPP_OPTS_STAGE0) $(rts_CC_OPTS) $(includes_CC_OPTS) $< -o $@ - -$(INPLACE_BIN)/mkDerivedConstants$(exeext) : includes/dist-derivedconstants/build/mkDerivedConstants$(exeext) - $(CP) $< $@ else includes/dist-derivedconstants/build/SizeMacros.h : | $$(dir $$@)/. @echo "#define OFFSET(s_type, field) ((size_t)&(((s_type*)0)->field))" > $@ @@ -184,14 +179,6 @@ includes/dist-derivedconstants/build/SizeMacros.h : | $$(dir $$@)/. @echo "#define b_bitmap b.bitmap" >> $@ @echo >> $@ -includes_dist-derivedconstants_C_SRCS = mkDerivedConstants.c -includes_dist-derivedconstants_PROG = mkDerivedConstants$(exeext) - -$(eval $(call build-prog,includes,dist-derivedconstants,0)) - -$(includes_dist-derivedconstants_depfile_c_asm) : $(includes_H_CONFIG) $(includes_H_PLATFORM) $(includes_H_FILES) $$(rts_H_FILES) -includes/dist-derivedconstants/build/mkDerivedConstants.o : includes/dist-derivedconstants/build/SizeMacros.h $(includes_H_CONFIG) $(includes_H_PLATFORM) - ifneq "$(AlienScript)" "" $(INPLACE_BIN)/mkDerivedConstants$(exeext): includes/$(includes_dist-derivedconstants_C_SRCS) | $$(dir $$@)/. $(WhatGccIsCalled) -o $@ $< $(CFLAGS) $(includes_CC_OPTS) @@ -199,6 +186,9 @@ endif endif ifneq "$(BINDIST)" "YES" +$(includes_dist-derivedconstants_depfile_c_asm) : | includes/dist-derivedconstants/build/SizeMacros.h +$(includes_dist-derivedconstants_depfile_c_asm) : $(includes_H_CONFIG) $(includes_H_PLATFORM) $(includes_H_FILES) $$(rts_H_FILES) +$(eval $(call build-prog,includes,dist-derivedconstants,0)) $(includes_DERIVEDCONSTANTS) : $(INPLACE_BIN)/mkDerivedConstants$(exeext) | $$(dir $$@)/. ifeq "$(AlienScript)" "" ./$< >$@ @@ -222,25 +212,14 @@ $(includes_GHCCONSTANTS) : else +ifneq "$(BINDIST)" "YES" includes_dist-ghcconstants_CC_OPTS = -DGEN_HASKELL -Iincludes/dist-derivedconstants/build - -ifeq "$(BuildingCrossCompiler)-$(AlienScript)" "YES-" -includes/dist-ghcconstants/build/mkDerivedConstants$(exeext) : includes/dist-derivedconstants/build/SizeMacros.h -includes/dist-ghcconstants/build/mkDerivedConstants$(exeext) : includes/mkDerivedConstants.c | $$(dir $$@)/. - $(CC_STAGE0) $(includes_dist-ghcconstants_CC_OPTS) $(CONF_CPP_OPTS_STAGE0) $(rts_CC_OPTS) $(includes_CC_OPTS) $< -o $@ -$(INPLACE_BIN)/mkGHCConstants$(exeext) : includes/dist-ghcconstants/build/mkDerivedConstants$(exeext) - $(CP) $< $@ -else includes_dist-ghcconstants_PROG = mkGHCConstants$(exeext) includes_dist-ghcconstants_C_SRCS = mkDerivedConstants.c -$(eval $(call build-prog,includes,dist-ghcconstants,0)) -endif - -ifneq "$(BINDIST)" "YES" +$(includes_dist-ghcconstants_depfile_c_asm) : | includes/dist-derivedconstants/build/SizeMacros.h $(includes_dist-ghcconstants_depfile_c_asm) : $(includes_H_CONFIG) $(includes_H_PLATFORM) $(includes_H_FILES) $$(rts_H_FILES) - -includes/dist-ghcconstants/build/mkDerivedConstants.o : includes/dist-derivedconstants/build/SizeMacros.h $(includes_H_CONFIG) $(includes_H_PLATFORM) +$(eval $(call build-prog,includes,dist-ghcconstants,0)) ifneq "$(AlienScript)" "" $(INPLACE_BIN)/mkGHCConstants$(exeext): includes/$(includes_dist-ghcconstants_C_SRCS) | $$(dir $$@)/. @@ -255,7 +234,6 @@ else endif endif - endif # --------------------------------------------------------------------------- _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc