aboutsummaryrefslogtreecommitdiffstats
path: root/build_tools
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-12-14 21:09:56 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-12-14 21:09:56 +0000
commit23ecef3fe549947cab2edd7a6f47bac963299b06 (patch)
treece56aa9e9e4350308e65f5620ebd81598ff42c52 /build_tools
parent8638b7fcc5aa6efde80523cab06999eb0641788b (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@234699 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'build_tools')
-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`