From: Tilghman Lesher Date: Mon, 14 Dec 2009 21:09:56 +0000 (+0000) Subject: Deal with the situation where .flavor exists but .version does not. X-Git-Tag: 1.4.29-rc1~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44ffc646b3a5ea117b8ffa6d9dd4521d49742a16;p=thirdparty%2Fasterisk.git 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/branches/1.4@234699 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/build_tools/make_version_h b/build_tools/make_version_h index 834a3c391c..5c74716f20 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 @@ -8,6 +8,17 @@ if [ ! -f .flavor ]; then #define ASTERISK_VERSION "${ASTERISKVERSION}" #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`