X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FMakefile;h=1db9a456b33ba63299f407451ec2157a9d788c55;hb=b180d2d4959b3b5b8361afc8329f40479176555b;hp=8cbd489630c30c721ce16f73a0db80480ef858c0;hpb=30d7641901d6c4f82255c58f8425eddeb6c66dab;p=ghc-hetmet.git diff --git a/ghc/compiler/Makefile b/ghc/compiler/Makefile index 8cbd489..1db9a45 100644 --- a/ghc/compiler/Makefile +++ b/ghc/compiler/Makefile @@ -18,11 +18,8 @@ TOP = .. # Use GHC for compiling C bits (NB. must be before boilerplate include) -# NB. this requires BootingFromHc to be set on the make command line! # -ifneq "$(BootingFromHc)" "YES" UseGhcForCc = YES -endif include $(TOP)/mk/boilerplate.mk @@ -109,7 +106,7 @@ ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" done else for i in */*hi-boot*; do \ - $(LN_S) -f ../../$$i stage$(stage)/$$i; \ + $(LN_S) -f ../../$$i stage$(stage)/$$i || true ; \ done endif @@ -183,7 +180,7 @@ boot :: $(CONFIG_HS) $(CONFIG_HS) : $(FPTOOLS_TOP)/mk/config.mk Makefile @$(RM) -f $(CONFIG_HS) - @echo -n "Creating $(CONFIG_HS) ... " + @echo "Creating $(CONFIG_HS) ... " @echo "module Config where" >>$(CONFIG_HS) @echo "cProjectName = \"$(ProjectName)\"" >> $(CONFIG_HS) @echo "cProjectVersion = \"$(ProjectVersion)\"" >> $(CONFIG_HS) @@ -235,7 +232,7 @@ CLEAN_FILES += $(CONFIG_HS) ALL_DIRS = \ utils basicTypes types hsSyn prelude rename typecheck deSugar coreSyn \ specialise simplCore stranal stgSyn simplStg codeGen absCSyn main \ - profiling parser cprAnalysis compMan ndpFlatten + profiling parser cprAnalysis compMan ndpFlatten cbits # Make sure we include Config.hs even if it doesn't exist yet... ALL_SRCS += $(CONFIG_HS) @@ -368,7 +365,6 @@ ifeq "$(HOSTPLATFORM)" "hppa1.1-hp-hpux9" rename/RnMonad_HC_OPTS = -O2 -O2-for-C endif -utils/StringBuffer_HC_OPTS = -fvia-C -fno-prune-tydecls utils/Digraph_HC_OPTS = -fglasgow-exts ifeq "$(bootstrapped)" "YES" @@ -439,7 +435,7 @@ PRIMOP_BITS=primop-data-decl.hs-incl \ CLEAN_FILES += prelude/primops.txt CLEAN_FILES += $(PRIMOP_BITS) -SRC_CPP_OPTS += -I$(GHC_INCLUDE_DIR) -traditional +SRC_CPP_OPTS += -I$(GHC_INCLUDE_DIR) SRC_CPP_OPTS += ${GhcCppOpts} ifneq "$(BootingFromHc)" "YES" @@ -481,7 +477,7 @@ primop-usage.hs-incl: prelude/primops.txt # ---------------------------------------------------------------------------- # Parsers/lexers -SRC_HAPPY_OPTS += +RTS -K2m -H16m -RTS $(GHC_HAPPY_OPTS) +SRC_HAPPY_OPTS += +RTS -K2m -H16m -RTS #----------------------------------------------------------------------------- # Linking @@ -585,7 +581,10 @@ MKDEPENDHS=$(HC) # Must do this *after* including target.mk, because $(HS_SRCS) isn't set yet. depend :: $(HS_SRCS) $(C_SRCS) + touch .depend-BASE +ifneq "$(BootingFromHc)" "YES" $(MKDEPENDHS) -M -optdep-f -optdep.depend-BASE $(foreach way,$(WAYS),-optdep-s -optdep$(way)) $(foreach obj,$(MKDEPENDHS_OBJ_SUFFICES),-osuf $(obj)) $(MKDEPENDHS_OPTS) $(filter-out -split-objs, $(MKDEPENDHS_HC_OPTS)) $(HS_SRCS) +endif $(MKDEPENDC) -f .depend-BASE $(MKDEPENDC_OPTS) $(foreach way,$(WAYS),-s $(way)) -- $(CC_OPTS) -- $(C_SRCS) $(PERL) -pe 'binmode(stdin); binmode(stdout); s@^(\S*\.o)@stage$(stage)/$$1@g; s@(\S*\.hi)@stage$(stage)/$$1@g' <.depend-BASE >.depend-$(stage) # The binmode stuff tells perl not to add stupid ^M's to the output