summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-01-19 22:15:45 +0000
committerIan Lynagh <igloo@earth.li>2011-01-19 22:15:45 +0000
commit6b715274be0003cf94a5e8f46e3d0baca773452f (patch)
treef3f9924073de266b14b48492e4e9acc6c99ae416 /rules
parente6635fe65db524c5ea55295049560e39264712dd (diff)
downloadhaskell-6b715274be0003cf94a5e8f46e3d0baca773452f.tar.gz
Move some make variables around
Diffstat (limited to 'rules')
-rw-r--r--rules/build-package.mk24
-rw-r--r--rules/build-prog.mk4
2 files changed, 14 insertions, 14 deletions
diff --git a/rules/build-package.mk b/rules/build-package.mk
index ab73ebeefb..7e2ce68471 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
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index b910e7834c..baa8beda67 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -54,6 +54,8 @@ endif
$(call package-config,$1,$2,$3)
+$1_$2_depfile_base = $1/$2/build/.depend
+
ifeq "$$($1_$2_INSTALL_INPLACE)" "NO"
ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
$1_$2_INPLACE = $$(error $1_$2 should not be installed inplace, but INPLACE var evaluated)
@@ -156,8 +158,6 @@ $(call c-sources,$1,$2)
# --- DEPENDENCIES
-$1_$2_depfile_base = $1/$2/build/.depend
-
$(call build-dependencies,$1,$2,$3)
# --- IMPLICIT RULES