make: Install cache-projects.mk

.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>
This commit is contained in:
Jan Lindemann 2026-02-01 09:50:49 +01:00
commit 741a3b6db2
4 changed files with 12 additions and 13 deletions

View file

@ -4,8 +4,6 @@
.PHONY: cache clean-cache clean-cache-projects
CACHE_PROJECT_MK ?= .cache-project.mk
CACHE_PROJECTS_MK ?= .cache-projects.mk
CACHE_FILES_MK = $(CACHE_PROJECT_MK) $(CACHE_PROJECTS_MK)
CACHED_VARS_ONLY_PROJECT ?= \
PROJECT \
PREREQ \
@ -29,11 +27,3 @@ $(CACHE_PROJECT_MK): $(CACHED_FILES) $(JWBDIR)/make/cache.mk
$(GREP) . | \
tee $@.tmp
mv $@.tmp $@
# -- Only used in jw-pkg
cache-projects: $(CACHE_PROJECTS_MK)
clean-cache-projects:
rm -f $(CACHE_PROJECTS_MK)
$(CACHE_PROJECTS_MK): $(CACHE_PROJECT_MK)
sed '/\($(subst $(space),\|,$(CACHED_VARS_ONLY_PROJECT))\)\s*[:?]\?=/ d' $< > $@.tmp
mv $@.tmp $@