Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d89773c authored by Doug Zongker's avatar Doug Zongker
Browse files

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
parent 84c25328
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -162,8 +162,9 @@ define _expand-inherited-values
          $(call uniq-word,$($(_eiv_tv)),$(INHERIT_TAG)$(i))) \
          $(call uniq-word,$($(_eiv_tv)),$(INHERIT_TAG)$(i))) \
      $(eval ### "Expand the inherit tag") \
      $(eval ### "Expand the inherit tag") \
      $(eval $(_eiv_tv) := \
      $(eval $(_eiv_tv) := \
          $(strip \
              $(patsubst $(INHERIT_TAG)$(i),$($(1).$(i).$(v)), \
              $(patsubst $(INHERIT_TAG)$(i),$($(1).$(i).$(v)), \
              $($(_eiv_tv)))) \
                  $($(_eiv_tv))))) \
      $(eval ### "Clear the child so DAGs don't create duplicate entries" ) \
      $(eval ### "Clear the child so DAGs don't create duplicate entries" ) \
      $(eval $(1).$(i).$(v) :=) \
      $(eval $(1).$(i).$(v) :=) \
      $(eval ### "If we just inherited ourselves, it's a cycle.") \
      $(eval ### "If we just inherited ourselves, it's a cycle.") \