diff options
author | Corey Farrell <git@cfware.com> | 2015-10-30 23:57:58 -0400 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2015-11-04 09:15:51 -0500 |
commit | b0bf189908f929012de59ab9296687b8a5df7617 (patch) | |
tree | 384f3f5b75eda338a311bbce5d5a62ac0fa12ed2 /build_tools | |
parent | 0aef8e058fe7a21eb29136afab2fa600eef01bf6 (diff) |
Fix cli display of build options.
A previous commit reduced the AST_BUILDOPTS compiler define to
only include options that affected ABI. This included some options
that were previously displayed by cli "core show settings". This
change corrects the CLI display while still restricting buildopts.h
to ABI effecting options only.
ASTERISK-25434 #close
Reported by: Rusty Newton
Change-Id: Id07af6bedd1d7d325878023e403fbd9d3607e325
Diffstat (limited to 'build_tools')
-rwxr-xr-x | build_tools/make_version_c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/build_tools/make_version_c b/build_tools/make_version_c index 3fea6cea2..fcbd94ef2 100755 --- a/build_tools/make_version_c +++ b/build_tools/make_version_c @@ -1,4 +1,7 @@ #!/bin/sh + +GREP=${GREP:-grep} + if test ! -f .flavor ; then EXTRA="" elif test ! -f .version ; then @@ -9,6 +12,21 @@ else aadkflavor=`cat .flavor` EXTRA=" (${aadkflavor} ${aadkver})" fi + +if ${GREP} "AST_DEVMODE" makeopts | ${GREP} -q "yes" +then + BUILDOPTS="AST_DEVMODE" +fi + +TMP=`${GREP} -e "^MENUSELECT_CFLAGS" menuselect.makeopts | sed 's/MENUSELECT_CFLAGS\=//g' | sed 's/-D//g'` +for x in ${TMP}; do + if test "x${BUILDOPTS}" != "x" ; then + BUILDOPTS="${BUILDOPTS}, ${x}" + else + BUILDOPTS="${x}" + fi +done + cat << END /* * version.c @@ -23,6 +41,8 @@ static const char asterisk_version[] = "${ASTERISKVERSION}${EXTRA}"; static const char asterisk_version_num[] = "${ASTERISKVERSIONNUM}"; +static const char asterisk_build_opts[] = "${BUILDOPTS}"; + const char *ast_get_version(void) { return asterisk_version; @@ -33,4 +53,9 @@ const char *ast_get_version_num(void) return asterisk_version_num; } +const char *ast_get_build_opts(void) +{ + return asterisk_build_opts; +} + END |