SQLite User Forum

[PATCH] configure.ac: fix VERSION_NUMBER, now consistent with release file names
Login

[PATCH] configure.ac: fix VERSION_NUMBER, now consistent with release file names

(1) By Jannick on 2020-11-24 12:07:27 [source]

diff --git a/configure.ac b/configure.ac
index 446be2f27..33781eeb3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -155,9 +155,8 @@ AC_SUBST(VERSION)
 RELEASE=`cat $srcdir/VERSION`
 AC_MSG_NOTICE(Release set to $RELEASE)
 AC_SUBST(RELEASE)
-VERSION_NUMBER=[`cat $srcdir/VERSION \
-                           | sed 's/[^0-9]/ /g' \
-                | awk '{printf "%d%03d%03d",$1,$2,$3}'`]
+VERSION_NUMBER=[`sed 's/[^0-9]/ /g' $srcdir/VERSION \
+                | awk '{printf "%d%02d%02d%02d",$1,$2,$3,NF<=3?0:$4}'`]
 AC_MSG_NOTICE(Version number set to $VERSION_NUMBER)
 AC_SUBST(VERSION_NUMBER)

(2) By Richard Hipp (drh) on 2020-11-24 13:16:05 in reply to 1 [link] [source]

Alternative fix is to simply remove VERSION_NUMBER as it is unused. See check-in 5466dd55d4aa15fd.