Commit 6b715274 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Move some make variables around

parent e6635fe6
...@@ -64,6 +64,18 @@ define build-package-helper ...@@ -64,6 +64,18 @@ define build-package-helper
$(call package-config,$1,$2,$3) $(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)" "" ifeq "$$($1_$2_CONFIGURE_PHASE)" ""
$$(error No configure phase for $1_$2) $$(error No configure phase for $1_$2)
...@@ -125,24 +137,12 @@ endif ...@@ -125,24 +137,12 @@ endif
ifeq "$$(phase_$$($1_$2_CONFIGURE_PHASE)_done)" "YES" 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 hs-sources,$1,$2)
$(call c-sources,$1,$2) $(call c-sources,$1,$2)
$(call includes-sources,$1,$2) $(call includes-sources,$1,$2)
# --- DEPENDENCIES # --- 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) $(call build-dependencies,$1,$2,$3)
# --- BUILDING # --- BUILDING
......
...@@ -54,6 +54,8 @@ endif ...@@ -54,6 +54,8 @@ endif
$(call package-config,$1,$2,$3) $(call package-config,$1,$2,$3)
$1_$2_depfile_base = $1/$2/build/.depend
ifeq "$$($1_$2_INSTALL_INPLACE)" "NO" ifeq "$$($1_$2_INSTALL_INPLACE)" "NO"
ifeq "$(findstring clean,$(MAKECMDGOALS))" "" ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
$1_$2_INPLACE = $$(error $1_$2 should not be installed inplace, but INPLACE var evaluated) $1_$2_INPLACE = $$(error $1_$2 should not be installed inplace, but INPLACE var evaluated)
...@@ -156,8 +158,6 @@ $(call c-sources,$1,$2) ...@@ -156,8 +158,6 @@ $(call c-sources,$1,$2)
# --- DEPENDENCIES # --- DEPENDENCIES
$1_$2_depfile_base = $1/$2/build/.depend
$(call build-dependencies,$1,$2,$3) $(call build-dependencies,$1,$2,$3)
# --- IMPLICIT RULES # --- IMPLICIT RULES
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment