aboutsummaryrefslogtreecommitdiffstats
path: root/build_tools/make_version_h
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-12-14 21:15:08 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-12-14 21:15:08 +0000
commit73e2741f9378ee6a971b893aa66f5af354f17b8f (patch)
treea604570601236b24dac8f09d57655bc274090df9 /build_tools/make_version_h
parente02dc3c7367a84a9f73e14774871e70623c99ac6 (diff)
Merged revisions 234700 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r234700 | tilghman | 2009-12-14 15:13:18 -0600 (Mon, 14 Dec 2009) | 12 lines 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: http://svn.digium.com/svn/asterisk/branches/1.6.1@234702 f38db490-d61c-443f-a65b-d21fe96a405b
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`