cache.mk: Support JW_PKG_NO_CACHE
cache.mk generates .project-cache.mk, and this commit supports disabling the definitions in the generated cache by setting JW_PKG_NO_CACHE=true.
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
3833fb0988
commit
8712cbc7b5
1 changed files with 3 additions and 1 deletions
|
|
@ -20,11 +20,13 @@ clean-cache:
|
|||
|
||||
cache: $(CACHE_PROJECT_MK)
|
||||
$(CACHE_PROJECT_MK): $(CACHED_FILES) $(JWBDIR)/make/cache.mk
|
||||
@echo 'ifneq ($$(JW_PKG_NO_CACHE),true)' | tee $@.tmp
|
||||
@echo $(foreach v,$(CACHED_VARS),$v = $(value $(v)) EOL) | \
|
||||
$(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) . | \
|
||||
tee $@.tmp
|
||||
tee -a $@.tmp
|
||||
@echo 'endif # ifneq ($$(JW_PKG_NO_CACHE),true)' | tee -a $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue