cache.mk: Include from topdir.mk, not make.mk
During a topdir "make all", caching variables is currently not the first thing that happens. Instead, variables are cached as soon as a project recurses into the make subdirectory. That was necessary, because some makefiles were regenerated in the make subdirectory by autoconf, potentially contributing variables that needed to be cached. As of now, autoconf is long gone and this is no longer true. And for some variables, the two step process becomes involved, notably for PYTHONPATH, which coding agents would like to look at from the topdir very early on. This commit moves the .project-cache.mk creation to topdir.mk, and .projects-cache.mk creation to jw-pkg/Makefile to address that. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
193c2ee0bd
commit
d90c0ebf18
9 changed files with 46 additions and 34 deletions
14
Makefile
14
Makefile
|
|
@ -1,14 +1,24 @@
|
|||
TOPDIR = .
|
||||
PKG_UPLOAD_URLPREFIX ?= rsync_ssh://$(JANWARE_USER)@pkg.janware.com:/srv/dav/pub/packages/jw-foss/$(PKG_UPLOAD_OS_NAME)/$(PKG_UPLOAD_OS_VERSION)
|
||||
|
||||
all:
|
||||
all: cache-projects
|
||||
|
||||
include $(TOPDIR)/make/proj.mk
|
||||
include $(JWBDIR)/make/topdir.mk
|
||||
include $(JWBDIR)/make/srcdist.mk
|
||||
include $(JWBDIR)/make/git-cvs-bridge.mk
|
||||
include $(JWBDIR)/make/py-topdir.mk
|
||||
|
||||
all:
|
||||
clean: clean.pkgconfig
|
||||
|
||||
clean.pkgconfig:
|
||||
rm -rf pkgconfig
|
||||
|
||||
# -- Cache for all projects
|
||||
cache-projects: $(CACHE_PROJECTS_MK)
|
||||
clean.cache-projects:
|
||||
rm -f $(CACHE_PROJECTS_MK)
|
||||
topdir.clean: clean.cache-projects
|
||||
$(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 $@
|
||||
|
|
|
|||
Loading…
Reference in a new issue