summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreeyorp <TheFreeYorp+git@gmail.com>2024-06-05 13:31:09 +0000
committerFreeyorp <TheFreeYorp+git@gmail.com>2024-06-05 19:09:16 +0000
commit9c829dd8290bdf97c55487a8869018b4c7103849 (patch)
treebea604a19fd4e2178e6b3a6a4926020cb41eed15
parent08d98f6cb2255db6c92f184ecb6efcca079f706a (diff)
downloadtmwa-9c829dd8290bdf97c55487a8869018b4c7103849.tar.gz
tmwa-9c829dd8290bdf97c55487a8869018b4c7103849.tar.bz2
tmwa-9c829dd8290bdf97c55487a8869018b4c7103849.tar.xz
tmwa-9c829dd8290bdf97c55487a8869018b4c7103849.zip
version.mk: Always generate version.hpp
-rw-r--r--Makefile.in3
-rw-r--r--version.mk7
2 files changed, 8 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index df8a2df..587382e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -683,7 +683,8 @@ conf-raw/bool-%.h: FORCE
conf-raw/str-%.h: FORCE
$(MKDIR_FIRST)
@echo '#define $* "$(value $*)"_s' | maybe-replace $@
-FORCE: ;
+
+FORCE:: ;
.PHONY: FORCE
override CPPFLAGS += -I . -I ${SRC_DIR}/include
diff --git a/version.mk b/version.mk
index 6d9a7ca..23bd071 100644
--- a/version.mk
+++ b/version.mk
@@ -50,13 +50,18 @@ SO_SHORT := so.${ABI_VERSION}
SO_LONG := ${SO_SHORT}.${VERSION_DOTS}
# and thanks for all the fish
+# This is a phony target, so that it always runs.
+# Targets which depend on this will always have their recipes run.
+FORCE:: ;
+.PHONY: FORCE
+
# Fully generate version.hpp here, where we have all the relevant information.
# version.mk is included by the top level Makefile, so simply explaning how to
# make it here will let it be built later, when needed.
# Note that some variable substitutions are slightly different here to use the
# name used by standard CMake macros, such as PROJECT_VERSION_TWEAK instead of
# VERSION_DEVEL.
-src/conf/version.hpp: src/conf/version.hpp.in
+src/conf/version.hpp: src/conf/version.hpp.in FORCE
sed -e 's/@VERSION_FULL@/${VERSION_FULL}/g' \
-e 's/@VERSION_HASH@/${VERSION_HASH}/g' \
-e 's/@VERSION_STRING@/${VERSION_STRING}/g' \