mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-24 17:23:36 +02:00
.cache-projects.mk is not installed / packaged, which makes builds against an installed jw-pkg considerably slower. Change that, at the risk of making the installed jw-pkg-devel less versatile. This commit installs a cache file cache-projects.mk, renamed from .cache-projects.mk, because there's no justification for hiding an installed makefile. At least I can't think of one. Signed-off-by: Jan Lindemann <jan@janware.com>
29 lines
762 B
Makefile
29 lines
762 B
Makefile
# ----- define these variables
|
|
# CACHED_FILES = $(TOPDIR)/VERSION
|
|
# CACHED_VARS = VERSION
|
|
.PHONY: cache clean-cache clean-cache-projects
|
|
|
|
CACHE_PROJECT_MK ?= .cache-project.mk
|
|
CACHED_VARS_ONLY_PROJECT ?= \
|
|
PROJECT \
|
|
PREREQ \
|
|
VERSION \
|
|
HEX_VERSION \
|
|
FULL_NAME \
|
|
JW_PKG_LD_LIBRARY_PATH \
|
|
JW_PKG_EXE_PATH \
|
|
JW_PKG_PYTHON_PATH
|
|
all: cache
|
|
clean: clean-cache
|
|
clean-cache:
|
|
rm -f $(CACHE_PROJECT_MK)
|
|
|
|
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|$(realpath $(TOPDIR))|$$(TOPDIR)|g' | \
|
|
$(SED) 's|$(realpath $(PROJECTS_DIR))|$$(PROJECTS_DIR)|g' | \
|
|
$(GREP) . | \
|
|
tee $@.tmp
|
|
mv $@.tmp $@
|