Skip to contentSkip to conversation

Makefile: fix autotools pre ./configure version regression

PATCH New Luis R. Rodriguez 3 participants 3 messages Sep 3, 2015 Kbuild

lore
Share & tools
lore
#0 lore raw

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
index 1564f7197ee1..f706cb86e255 100644
@@ -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