X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rules%2Fbuild-package.mk;h=7e2ce68471980edc2eb267ddee899221e5f00c1f;hb=5775d5142da227d65fb86994d363eb16841ee642;hp=ab73ebeefb756620896c0d185f6bb0067cf0f5d6;hpb=29c7945166be73aa70453d14dc2a334d16a434f2;p=ghc-hetmet.git diff --git a/rules/build-package.mk b/rules/build-package.mk index ab73ebe..7e2ce68 100644 --- a/rules/build-package.mk +++ b/rules/build-package.mk @@ -64,6 +64,18 @@ define build-package-helper $(call package-config,$1,$2,$3) +# Bootstrapping libs are only built one way +ifeq "$3" "0" +$1_$2_WAYS = v +else +$1_$2_WAYS = $$(GhcLibWays) +endif + +# We must use a different dependency file if $(GhcLibWays) changes, so +# encode the ways into the name of the file. +$1_$2_WAYS_DASHED = $$(subst $$(space),,$$(patsubst %,-%,$$(strip $$($1_$2_WAYS)))) +$1_$2_depfile_base = $1/$2/build/.depend$$($1_$2_WAYS_DASHED) + ######################################## ifeq "$$($1_$2_CONFIGURE_PHASE)" "" $$(error No configure phase for $1_$2) @@ -125,24 +137,12 @@ endif ifeq "$$(phase_$$($1_$2_CONFIGURE_PHASE)_done)" "YES" -# Bootstrapping libs are only built one way -ifeq "$3" "0" -$1_$2_WAYS = v -else -$1_$2_WAYS = $$(GhcLibWays) -endif - $(call hs-sources,$1,$2) $(call c-sources,$1,$2) $(call includes-sources,$1,$2) # --- DEPENDENCIES -# We must use a different dependency file if $(GhcLibWays) changes, so -# encode the ways into the name of the file. -$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,$3) # --- BUILDING