summaryrefslogtreecommitdiffstats
path: root/core/node_fns.mk
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2010-02-18 11:43:04 -0800
committerDoug Zongker <dougz@android.com>2010-02-18 12:23:35 -0800
commit1d89773c1dd0e433a2dbd0ef8aedaf4c20f6ff74 (patch)
tree6faf09c9949c87c5a96125ca6205120048438841 /core/node_fns.mk
parent84c253286ff07f94d2074ce8602e598e3ff3db55 (diff)
downloadbuild-1d89773c1dd0e433a2dbd0ef8aedaf4c20f6ff74.zip
build-1d89773c1dd0e433a2dbd0ef8aedaf4c20f6ff74.tar.gz
build-1d89773c1dd0e433a2dbd0ef8aedaf4c20f6ff74.tar.bz2
fix makefile inheritance system
The variable inheritance system can leave extra spaces in a variable when multiple levels of inheritance are used. It can expand: "@inherit:foo @inherit:bar @inherit:baz" to "value @inherit:bar @inherit:baz" and then "value @inherit:baz" (if bar has no value for the variable) and then "value " (if baz also has no value). Call strip to remove excess spaces between words after each replacement pass. Change-Id: Ic4cfc6fed1865066a6353a522e4bdcb68ec875d3
Diffstat (limited to 'core/node_fns.mk')
-rw-r--r--core/node_fns.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/node_fns.mk b/core/node_fns.mk
index 31b8543..38ecea7 100644
--- a/core/node_fns.mk
+++ b/core/node_fns.mk
@@ -162,8 +162,9 @@ define _expand-inherited-values
$(call uniq-word,$($(_eiv_tv)),$(INHERIT_TAG)$(i))) \
$(eval ### "Expand the inherit tag") \
$(eval $(_eiv_tv) := \
- $(patsubst $(INHERIT_TAG)$(i),$($(1).$(i).$(v)), \
- $($(_eiv_tv)))) \
+ $(strip \
+ $(patsubst $(INHERIT_TAG)$(i),$($(1).$(i).$(v)), \
+ $($(_eiv_tv))))) \
$(eval ### "Clear the child so DAGs don't create duplicate entries" ) \
$(eval $(1).$(i).$(v) :=) \
$(eval ### "If we just inherited ourselves, it's a cycle.") \