From 9c829dd8290bdf97c55487a8869018b4c7103849 Mon Sep 17 00:00:00 2001 From: Freeyorp Date: Wed, 5 Jun 2024 13:31:09 +0000 Subject: version.mk: Always generate version.hpp --- Makefile.in | 3 ++- version.mk | 7 ++++++- 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' \ -- cgit v1.2.3-70-g09d2