functions.mk: allow setting to an empty value
set() is a function of two variables but the and() check for *both* is incorrect as one might need to override a previously set variable with empty string; this has manifested itself with a case like this: @$(call set,ROOTPW_EMPTY,1) # ... @$(call set,ROOTPW_EMPTY,)
This commit is contained in:
parent
2fa7259510
commit
a3ddce7a81
@ -22,7 +22,8 @@ endef
|
||||
|
||||
# ...set() comments out any previous definition
|
||||
# and then appends an assigning rule...
|
||||
set = $(and $(1),$(2),$(set_body))
|
||||
# NB: $(2) could be empty
|
||||
set = $(and $(1),$(set_body))
|
||||
define set_body
|
||||
{ $(log_body); \
|
||||
sed -i 's|^$(1)[ ]*[+?]*=.*$$|#& # overridden by $@|' "$(CONFIG)"; \
|
||||
|
Loading…
Reference in New Issue
Block a user