summaryrefslogtreecommitdiff
path: root/build_tools/make_version_h
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2009-12-14 21:13:18 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2009-12-14 21:13:18 +0000
commitdbd68f2f66e77f68ccd7738df6c9297a3faa3ecd (patch)
tree0c64177f9412ff2b0678a41de7b9b11709a67eb8 /build_tools/make_version_h
parent7ab15342ac110a21057808c506f1e58ad44c31b9 (diff)
Merged revisions 234699 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r234699 | tilghman | 2009-12-14 15:09:56 -0600 (Mon, 14 Dec 2009) | 5 lines Deal with the situation where .flavor exists but .version does not. Also make the script slightly more portable, in keeping with autoconf syntax. (closes issue #14737) Reported by: davidw ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@234700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'build_tools/make_version_h')
-rwxr-xr-xbuild_tools/make_version_h13
1 files changed, 12 insertions, 1 deletions
diff --git a/build_tools/make_version_h b/build_tools/make_version_h
index 834a3c391..5c74716f2 100755
--- a/build_tools/make_version_h
+++ b/build_tools/make_version_h
@@ -1,5 +1,5 @@
#!/bin/sh
-if [ ! -f .flavor ]; then
+if test ! -f .flavor ; then
cat << END
/*
* version.h
@@ -9,6 +9,17 @@ if [ ! -f .flavor ]; then
#define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}
END
+elif test ! -f .version ; then
+ aadkflavor=`cat .flavor`
+ cat << END
+/*
+ * version.h
+ * Automatically generated
+ */
+#define ASTERISK_VERSION "${ASTERISKVERSION} (${aadkflavor})"
+#define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}
+
+END
else
aadkver=`cat .version`
aadkflavor=`cat .flavor`