diff options
author | Ian Lynagh <igloo@earth.li> | 2009-05-17 13:05:58 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-05-17 13:05:58 +0000 |
commit | 56aad1af62167a41117419a94f6b9ce1f2e60576 (patch) | |
tree | a5d13ce065dba8edc2fb3589eda3234efc8f42f4 /rules | |
parent | 48f63fe6ade6f28d7bb5df5dc04580ce2c89c99d (diff) | |
download | haskell-56aad1af62167a41117419a94f6b9ce1f2e60576.tar.gz |
Bootstrapping fixes
Diffstat (limited to 'rules')
-rw-r--r-- | rules/build-package-way.mk | 5 | ||||
-rw-r--r-- | rules/build-prog.mk | 2 | ||||
-rw-r--r-- | rules/hs-suffix-rules-srcdir.mk | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/rules/build-package-way.mk b/rules/build-package-way.mk index 06e432a7c5..636f6410b9 100644 --- a/rules/build-package-way.mk +++ b/rules/build-package-way.mk @@ -29,9 +29,14 @@ $$($1_PACKAGE)-$($1_$2_VERSION)_$2_$3_LIB = $$($1_$2_$3_LIB) # All the .a/.so library file dependencies for this library $1_$2_$3_DEPS_LIBS=$$(foreach dep,$$($1_$2_DEPS),$$($$(dep)_$2_$3_LIB)) +ifneq "$$(BootingFromHc)" "YES" $1_$2_$3_MKSTUBOBJS = find $1/$2/build -name "*_stub.$$($3_osuf)" -print # HACK ^^^ we tried to use $(wildcard), but apparently it fails due to # make using cached directory contents, or something. +else +$1_$2_$3_MKSTUBOBJS = true +$1_$2_v_C_OBJS += $$(shell find $1/$2/build -name "*_stub.c" -print | sed 's/c$$$$/o/') +endif ifeq "$3" "dyn" # Link a dynamic library diff --git a/rules/build-prog.mk b/rules/build-prog.mk index 20cf46fe0c..1bb9028f3b 100644 --- a/rules/build-prog.mk +++ b/rules/build-prog.mk @@ -104,7 +104,7 @@ $1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2 else $1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) $$(MKDIRHIER) $$(dir $$@) - $$(CC) -o $$@ $$($1_$2_v_ALL_CC_OPTS) $$(LD_OPTS) $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) + $$(CC) -o $$@ $$($1_$2_v_ALL_CC_OPTS) $$(LD_OPTS) $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) $$($1_$2_v_EXTRA_CC_OPTS) endif # Note [lib-depends] if this program is built with stage1 or greater, we diff --git a/rules/hs-suffix-rules-srcdir.mk b/rules/hs-suffix-rules-srcdir.mk index 4aa7b7eb2a..ceeede8e96 100644 --- a/rules/hs-suffix-rules-srcdir.mk +++ b/rules/hs-suffix-rules-srcdir.mk @@ -84,10 +84,12 @@ $1/$2/build/%.$$($3_way_)o-boot : $1/$4/%.hs-boot $$($1_$2_HC_DEP) $1/$2/build/%.$$($3_way_)o-boot : $1/$4/%.lhs-boot $$($1_$2_HC_DEP) $$($1_$2_HC) $$($1_$2_$3_ALL_HC_OPTS) -c $$< -o $$@ +ifneq "$$(BootingFromHc)" "YES" # stubs are automatically generated and compiled by GHC $1/$2/build/%_stub.$$($3_osuf): $1/$2/build/%.$$($3_osuf) @: +endif endef |