Makefile: fix autotools pre ./configure version regression
PATCH 1/1 Makefile: fix autotools pre ./configure version regression
From: "Luis R. Rodriguez" <[email protected]>
The change to fold version information into a single helper removed access to the VERSION variable before ./configure was run. We have a slew of dependencies on this variable though, users of this variable are typically only used for release purpose so when the user hasn't yet run ./configure simply assume we want the version information as if we're making a release and don't want any dirty tree annotations.
--- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+)
Makefile +10 -0
@@ -18,6 +18,16 @@ endif -include Makefile.override # local customizations, if any -include /etc/Makefile.coccinelle # local customizations, if any +# We inherit the version information *after* the user has run +# ./configure but in the absence of that the build system has +# a few dependencies on the version information, we need a default +# setting then prior to the user running ./configure, this provides +# that, but will only be set if the user hasn't already run ./configure +# +# The only thing we can do is assume that the user relying on this +# variable then was going to make a release, this means we don't +# tell them that the tree is dirty. +VERSION?=$(shell MAKE_COCCI_RELEASE="y" ./version.sh) CCVERSION=$(shell cat scripts/coccicheck/README | egrep -o '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+' | head -n1) PKGVERSION=$(shell dpkg-parsechangelog -ldebian/changelog.$(DISTRIB_CODENAME) 2> /dev/null \
Signature · 1 line
2.4.3
PATCH 1/1 Makefile: fix autotools pre ./configure version regression
Quoted 1 line · Luis R. Rodriguez
+VERSION?=$(shell MAKE_COCCI_RELEASE="y" ./version.sh)
To be clear usage of
FOO ?= bar
is equivalent to using:
ifeq ($(origin FOO), undefined)
FOO = bar
endif
So once the user has run ./configure the right version will be set.
https://www.gnu.org/software/make/manual/html_node/Flavors.html#Flavors
Luis
PATCH 1/1 Makefile: fix autotools pre ./configure version regression
In reply to Luis R. RodriguezDear luis,
Thanks for your patch that has just been applied.
S?bastien.