]> granicus.if.org Git - mutt/commitdiff
Generate version string during make not configure
authorAaron Schrab <aaron+mutt@schrab.com>
Wed, 10 Apr 2019 23:44:46 +0000 (19:44 -0400)
committerKevin McCarthy <kevin@8t8.us>
Fri, 12 Apr 2019 01:56:53 +0000 (18:56 -0700)
Switch to generating the version string during make process rather than
at configure time.  This makes it easier to keep the detailed version
string accurate when doing development which doesn't require that the
configure script be rerun.

.gitignore
Makefile.am
commands.c
compose.c
configure.ac
dotlock.c
init.c
muttlib.c
sendlib.c
status.c

index a9827492f2821946de3a825b52b19780c1204ca6..f58259917382479e62ae0c56c89290c04c4c6c22 100644 (file)
@@ -45,6 +45,7 @@
 /smime_keys
 /txt2c
 /stamp-doc-rc
+/version.h
 /doc/instdoc
 /doc/manual.txt
 /doc/manual.xml
index c95c21a2ae39b5d970ec54c3b9e75e8da0dedbc9..92edce22183268ff1d2d85332cd8e6363f217d4a 100644 (file)
@@ -22,7 +22,7 @@ if BUILD_HCACHE
 HCVERSION = hcversion.h
 endif
 
-BUILT_SOURCES = keymap_defs.h patchlist.c reldate.h conststrings.c $(HCVERSION)
+BUILT_SOURCES = keymap_defs.h patchlist.c reldate.h conststrings.c version.h $(HCVERSION)
 
 bin_PROGRAMS = mutt $(DOTLOCK_TARGET) $(PGPAUX_TARGET)
 mutt_SOURCES = \
@@ -140,6 +140,11 @@ keymap_alldefs.h: $(srcdir)/OPS $(srcdir)/OPS.SIDEBAR $(srcdir)/OPS.PGP $(srcdir
                $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME \
                        > keymap_alldefs.h
 
+version.h: FORCE
+       echo '#define MUTT_VERSION "'`sh "$(srcdir)/version.sh"`'"' > $@.tmp
+       cmp -s $@ $@.tmp && rm -f $@.tmp || mv $@.tmp $@
+FORCE:
+
 reldate.h: $(srcdir)/mkreldate.sh $(srcdir)/ChangeLog
        echo 'const char *ReleaseDate = "'`(cd $(srcdir) && ./mkreldate.sh)`'";' > reldate.h
 
index e95cfc9db7b7f110e0af0aa1a3cdcbefde6ac034..6db23055d393f2191a6cc541b22b7f52e53bbeae 100644 (file)
@@ -21,6 +21,7 @@
 # include "config.h"
 #endif
 
+#include "version.h"
 #include "mutt.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
index 6574eca05306675877d41a718a705678f14a3e29..05ad4d47771ea7193c5a56fecc784b9b7ef0a831 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -21,6 +21,7 @@
 # include "config.h"
 #endif
 
+#include "version.h"
 #include "mutt.h"
 #include "mutt_curses.h"
 #include "mutt_idna.h"
index b07fade053c1dec86e5403ba8789f63ea4bcf0cc..bd8beb91a2810a9067367777ca885fed1c08c43d 100644 (file)
@@ -10,9 +10,6 @@ AC_CONFIG_HEADERS([config.h])
 
 AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/VERSION'])
 
-MUTT_VERSION=`env sh "$srcdir/version.sh"`
-AC_DEFINE_UNQUOTED(MUTT_VERSION,"$MUTT_VERSION", [Full textual version string.])
-
 AC_USE_SYSTEM_EXTENSIONS
 
 ALL_LINGUAS="de eu ru it es uk fr pl nl cs id sk ko el zh_TW zh_CN pt_BR eo gl sv da lt tr ja hu et ca bg ga fi"
index 5e3086f9dd56176e467b984374ada9222652886b..aa2c2b432f0ffd76fd1fb52641f0e7ddf55abea2 100644 (file)
--- a/dotlock.c
+++ b/dotlock.c
@@ -46,6 +46,7 @@
 #include <limits.h>
 #endif
 
+#include "version.h"
 #include "dotlock.h"
 
 #ifdef HAVE_GETOPT_H
diff --git a/init.c b/init.c
index 387fde15f58c64444765d1bd59d641774add8842..a4d754c078de981ec0e927aba60b5d7b1c6dc912 100644 (file)
--- a/init.c
+++ b/init.c
@@ -20,6 +20,7 @@
 # include "config.h"
 #endif
 
+#include "version.h"
 #include "mutt.h"
 #include "mapping.h"
 #include "mutt_curses.h"
index ba17f771ec478bd2fe7d80aa3c29a0d7630862c3..bd4f79599ede4ab047b94e30a80ed34070724c8b 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -21,6 +21,7 @@
 # include "config.h"
 #endif
 
+#include "version.h"
 #include "mutt.h"
 #include "mutt_curses.h"
 #include "mime.h"
index 984e05284659d7e2fd5d7197006be5449da7984b..0bf0b19415e909dbb8aa29294324e293b6309b19 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -22,6 +22,7 @@
 # include "config.h"
 #endif
 
+#include "version.h"
 #include "mutt.h"
 #include "mutt_curses.h"
 #include "rfc2047.h"
index f7c8f1aa4b040e89d1b1e6ed41d8442b785cf3be..cccf7eca888527452498dc4ae1670aeb95a7674e 100644 (file)
--- a/status.c
+++ b/status.c
@@ -20,6 +20,7 @@
 # include "config.h"
 #endif
 
+#include "version.h"
 #include "mutt.h"
 #include "mutt_menu.h"
 #include "mutt_curses.h"