make/Makefile is responsible to generate $(TOPDIR)/cache-projects.mk. The variables are taken from .cache-project.mk, with some variables intentionally omitted, but their ifndef / endif blocks remain in place. Not harmful but ugly. Make sed range-delete the left-over blocks entirely.
Signed-off-by: Jan Lindemann <jan@janware.com>
31 lines
912 B
Makefile
31 lines
912 B
Makefile
TOPDIR = ..
|
|
CACHED_FILES := defs.mk projects.mk platform.mk Makefile
|
|
MKFILES += $(CACHE_PROJECTS_MK)
|
|
|
|
include $(TOPDIR)/make/proj.mk
|
|
include $(JWBDIR)/make/make.mk
|
|
|
|
ifneq ($(MAKECMDGOALS),install-links)
|
|
ifneq ($(MAKECMDGOALS),do-install-links)
|
|
include $(JWBDIR)/make/dirs.mk
|
|
endif
|
|
endif
|
|
|
|
include $(JWBDIR)/make/dev-utils.mk
|
|
|
|
all: cache-projects
|
|
clean: clean-cache-projects
|
|
|
|
ifeq ($(TARGET),mingw)
|
|
install: $(INSTALL_MAKEDIR)/winres.rc.tmpl
|
|
endif
|
|
|
|
grep-vars:
|
|
$(Q)sed '/^ *[A-Z]/!d; s/^[ ]*//g; s/[=+?:].*//g; s/[ ]*//g' *.mk | sort -u
|
|
|
|
cache-projects: $(CACHE_PROJECTS_MK)
|
|
clean-cache-projects:
|
|
rm -f $(CACHE_PROJECTS_MK)
|
|
$(CACHE_PROJECTS_MK): $(CACHE_PROJECT_MK)
|
|
sed -E '/^[[:blank:]]*ifndef[[:blank:]]+($(subst $(space),|,$(CACHED_VARS_ONLY_PROJECT)))[[:blank:]]*$$/,/^[[:blank:]]*endif[[:blank:]]*$$/d' $< > $@.tmp
|
|
mv $@.tmp $@
|