Don't include inter-package dependencies when compiling with stage 0; #4031
authorIan Lynagh <igloo@earth.li>
Sun, 9 May 2010 13:05:11 +0000 (13:05 +0000)
committerIan Lynagh <igloo@earth.li>
Sun, 9 May 2010 13:05:11 +0000 (13:05 +0000)
This fixes a problem when building with GHC 6.12 on Windows, where
dependencies on stage 0 (bootstrapping compiler) packages have absolute
paths c:/ghc/..., and make gets confused by the colon.

rts/ghc.mk
rules/build-dependencies.mk
rules/build-package.mk
rules/build-prog.mk

index a7a2c11..bf110fa 100644 (file)
@@ -391,7 +391,7 @@ rts_dist_MKDEPENDC_OPTS += -Irts/dist/build
 
 endif
 
-$(eval $(call build-dependencies,rts,dist))
+$(eval $(call build-dependencies,rts,dist,1))
 
 $(rts_dist_depfile_c_asm) : libffi/dist-install/build/ffi.h $(DTRACEPROBES_H)
 
index 7a05803..6ebc7ef 100644 (file)
 #
 # -----------------------------------------------------------------------------
 
-define build-dependencies # args: $1 = dir, $2 = distdir
+define build-dependencies
+# $1 = dir
+# $2 = distdir
+# $3 = GHC stage to use (0 == bootstrapping compiler)
 
 $1_$2_depfile_haskell = $$($1_$2_depfile_base).haskell
 $1_$2_depfile_c_asm = $$($1_$2_depfile_base).c_asm
 
 $1_$2_C_FILES_DEPS = $$(filter-out $$($1_$2_C_FILES_NODEPS),$$($1_$2_C_FILES))
 
-$1_$2_MKDEPENDHS_FLAGS = -include-pkg-deps -dep-makefile $$($1_$2_depfile_haskell).tmp $$(foreach way,$$(filter-out v,$$($1_$2_WAYS)),-dep-suffix $$(way))
+$1_$2_MKDEPENDHS_FLAGS = -dep-makefile $$($1_$2_depfile_haskell).tmp $$(foreach way,$$(filter-out v,$$($1_$2_WAYS)),-dep-suffix $$(way))
+ifneq "$3" "0"
+$1_$2_MKDEPENDHS_FLAGS += -include-pkg-deps
+endif
 
 ifneq "$$($1_$2_NO_BUILD_DEPS)" "YES"
 
index b4763b6..5a589f4 100644 (file)
@@ -133,7 +133,7 @@ $(call includes-sources,$1,$2)
 $1_$2_WAYS_DASHED = $$(subst $$(space),,$$(patsubst %,-%,$$(strip $$($1_$2_WAYS))))
 $1_$2_depfile_base = $1/$2/build/.depend$$($1_$2_WAYS_DASHED)
 
-$(call build-dependencies,$1,$2)
+$(call build-dependencies,$1,$2,$3)
 
 # --- BUILDING
 
index 9674bf6..e072907 100644 (file)
@@ -92,7 +92,7 @@ $(call c-sources,$1,$2)
 
 $1_$2_depfile_base = $1/$2/build/.depend
 
-$(call build-dependencies,$1,$2)
+$(call build-dependencies,$1,$2,$3)
 
 # --- IMPLICIT RULES