projects.mk: ?= -assign VERSION_FILE

If VERSION_FILE is not found, trying to include makefile snippets
triggers the attempt to regenerate it. This happened for installed
Makefiles of jw-docker-images: It defines TOPDIR to
/opt/jw-docker-images, projects.mk looks there, but the version file
is installed under /usr/share/doc/packages/jw-docker-images/VERSION.

Allow VERSION_FILE to be overridden including code to keep that from
happening.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-02-08 08:07:48 +01:00
commit 4932c6816c

View file

@ -3,7 +3,7 @@
include $(JWBDIR)/make/platform.mk
# -- What do I know about myself?
VERSION_FILE := $(firstword $(wildcard VERSION) $(TOPDIR)/VERSION)
VERSION_FILE ?= $(firstword $(wildcard VERSION) $(TOPDIR)/VERSION)
ifndef DEVELOPMENT
ifeq ($(wildcard $(VERSION_FILE)),)
DEVELOPMENT := true