cache.mk: Don't overwrite defined variables
Check with ifndef if a variable is defined before hard defining it in cache.mk. This gives more flexibility when overriding variables with local.mk.
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
38076c951b
commit
262be57741
1 changed files with 3 additions and 2 deletions
|
|
@ -21,7 +21,8 @@ clean-cache:
|
|||
cache: $(CACHE_PROJECT_MK)
|
||||
$(CACHE_PROJECT_MK): $(CACHED_FILES) $(JWBDIR)/make/cache.mk
|
||||
@echo $(foreach v,$(CACHED_VARS),$v = $(value $(v)) EOL) | \
|
||||
$(SED) 's/EOL */\n/g;' | \
|
||||
$(SED) 's/\s\+EOL/\n/g;' | \
|
||||
$(SED) 's/\s*\(\S\+\)\s*=\s*\(.*\)\s*/ifndef \1\n \1 = \2\nendif\n/g;' | \
|
||||
$(SED) 's|$(realpath $(TOPDIR))|$$(TOPDIR)|g' | \
|
||||
$(SED) 's|$(realpath $(PROJECTS_DIR))|$$(PROJECTS_DIR)|g' | \
|
||||
$(GREP) . | \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue