summaryrefslogtreecommitdiff
path: root/build_tools
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2008-02-26 20:19:03 +0000
committerRussell Bryant <russell@russellbryant.com>2008-02-26 20:19:03 +0000
commit8d90438b42f68e8bbdf5e16a2ea7cf90eea20c4d (patch)
treee566783302b426590b203a9900d716fe1aeb383e /build_tools
parent0036cde5f3139a85d42448c1167808d22ccf0e76 (diff)
Re-add the automatically generated version.h, so that modules can include for
making build time decisions for cross asterisk version compatibility git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'build_tools')
-rwxr-xr-xbuild_tools/make_version_h25
1 files changed, 25 insertions, 0 deletions
diff --git a/build_tools/make_version_h b/build_tools/make_version_h
new file mode 100755
index 000000000..0b651ad00
--- /dev/null
+++ b/build_tools/make_version_h
@@ -0,0 +1,25 @@
+#!/bin/sh
+if [ ! -f ../.flavor ]; then
+ cat << END
+/*
+ * version.h
+ * Automatically generated
+ */
+#define ASTERISK_VERSION "${ASTERISKVERSION}"
+#define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}
+
+END
+else
+ aadkver=`cat ../.version`
+ aadkflavor=`cat ../.flavor`
+ cat << END
+/*
+ * version.h
+ * Automatically generated
+ */
+#define ASTERISK_VERSION "${ASTERISKVERSION} (${aadkflavor} ${aadkver})"
+#define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}
+
+END
+fi
+