summaryrefslogtreecommitdiff
path: root/build_tools
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2007-12-17 07:25:35 +0000
committerKevin P. Fleming <kpfleming@digium.com>2007-12-17 07:25:35 +0000
commit100ef27af920de05dec41cdf281c3a9b8172d68f (patch)
treedfc78c051a3faabab03ba235d18d6e5ec1204ec6 /build_tools
parentf483cf28bbde151d07a1e14dd885b5c63e137a33 (diff)
Merged revisions 93180 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r93180 | kpfleming | 2007-12-16 22:44:51 -0800 (Sun, 16 Dec 2007) | 23 lines In http://lists.digium.com/pipermail/asterisk-dev/2007-December/031145.html, rizzo brought up some issues related to the way that the metadata required for menuselect and the rest of the build system is extracted from the source files. Since I had a few hours to kill on an airplane today, I decided to improve this situation... so now the system caches the extracted metadata and uses it to build the menuselect 'tree' as much as it can. The result of this is that when a single source file is changed, only the metadata for that file needs to be extracted again, and the rest is used from the cache files. I also reduced the number of forked processes required to do the metadata extraction; it was actually possible to do most of what we needed in the Makefiles themselves without using any shell scripts at all! On my laptop, these changes resulted in an 80% decrease in the time required for the 'menuselect.makeopts' automatic check to occur after editing a single source file. While doing this work I also cleaned up a few minor things in the Makefiles, adding a check for 'awk' to the configure script and changed all remaining places we use 'grep' or 'awk' to use the ones found by the configure script, and changed the 'prep_tarball' script to build the menuselect metadata so that tarballs of Asterisk will include it and won't require the user to wait while it is extracted after unpacking. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'build_tools')
-rw-r--r--build_tools/embed_modules.xml16
-rwxr-xr-xbuild_tools/make_version2
-rwxr-xr-xbuild_tools/prep_moduledeps48
-rwxr-xr-xbuild_tools/prep_tarball3
4 files changed, 11 insertions, 58 deletions
diff --git a/build_tools/embed_modules.xml b/build_tools/embed_modules.xml
index e22cc7e19..054e1dfad 100644
--- a/build_tools/embed_modules.xml
+++ b/build_tools/embed_modules.xml
@@ -1,26 +1,26 @@
<category name="MENUSELECT_EMBED" displayname="Module Embedding" positive_output="yes" remove_on_change="main/asterisk">
- <member name="apps" displayname="Applications" remove_on_change="apps/*.o">
+ <member name="APPS" displayname="Applications" remove_on_change="apps/*.o">
<depend>gnu_ld</depend>
</member>
- <member name="cdr" displayname="Call Detail Recording" remove_on_change="cdr/*.o">
+ <member name="CDR" displayname="Call Detail Recording" remove_on_change="cdr/*.o">
<depend>gnu_ld</depend>
</member>
- <member name="channels" displayname="Channels" remove_on_change="channels/*.o channels/misdn/*.o">
+ <member name="CHANNELS" displayname="Channels" remove_on_change="channels/*.o channels/misdn/*.o">
<depend>gnu_ld</depend>
</member>
- <member name="codecs" displayname="Coders/Decoders" remove_on_change="codecs/*.o codecs/gsm/src/*.o codecs/ilbc/*.o codecs/lpc10/*.o codecs/gsm/lib/libgsm.a codecs/lpc10/liblpc10.a codecs/ilbc/libilbc.a codecs/g722/libg722.a">
+ <member name="CODECS" displayname="Coders/Decoders" remove_on_change="codecs/*.o codecs/gsm/src/*.o codecs/ilbc/*.o codecs/lpc10/*.o codecs/gsm/lib/libgsm.a codecs/lpc10/liblpc10.a codecs/ilbc/libilbc.a codecs/g722/libg722.a">
<depend>gnu_ld</depend>
</member>
- <member name="formats" displayname="File Formats" remove_on_change="formats/*.o">
+ <member name="FORMATS" displayname="File Formats" remove_on_change="formats/*.o">
<depend>gnu_ld</depend>
</member>
- <member name="funcs" displayname="Dialplan Functions" remove_on_change="funcs/*.o">
+ <member name="FUNCS" displayname="Dialplan Functions" remove_on_change="funcs/*.o">
<depend>gnu_ld</depend>
</member>
- <member name="pbx" displayname="PBX Functionality" remove_on_change="pbx/*.o pbx/ael/*.o">
+ <member name="PBX" displayname="PBX Functionality" remove_on_change="pbx/*.o pbx/ael/*.o">
<depend>gnu_ld</depend>
</member>
- <member name="res" displayname="Resource Modules" remove_on_change="res/*.o res/snmp/*.o">
+ <member name="RES" displayname="Resource Modules" remove_on_change="res/*.o res/snmp/*.o">
<depend>gnu_ld</depend>
</member>
</category>
diff --git a/build_tools/make_version b/build_tools/make_version
index b06044e1e..4e9901dc5 100755
--- a/build_tools/make_version
+++ b/build_tools/make_version
@@ -3,7 +3,7 @@
if [ -f ${1}/.version ]; then
cat ${1}/.version
elif [ -d .svn ]; then
- PARTS=`LANG=C svn info ${1} | grep URL | awk '{print $2;}' | sed -e 's:^.*/svn/asterisk/::' | sed -e 's:/: :g'`
+ PARTS=`LANG=C svn info ${1} | ${GREP} URL | ${AWK} '{print $2;}' | sed -e 's:^.*/svn/asterisk/::' | sed -e 's:/: :g'`
BRANCH=0
TEAM=0
TAG=0
diff --git a/build_tools/prep_moduledeps b/build_tools/prep_moduledeps
deleted file mode 100755
index 333e8853e..000000000
--- a/build_tools/prep_moduledeps
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/sh
-
-get_description() {
- TDESC=`${GREP} -e AST_MODULE_INFO ${1} | head -n 1 | cut -d '"' -f 2`
-}
-
-process_dir() {
- dir=${1}
- prefix=${2}_
- catsuffix=${3}
- displayname=${4}
-
- printf "\t<category name=\"MENUSELECT_${catsuffix}\" displayname=\"${displayname}\" remove_on_change=\"${dir}/modules.link\">\n"
- for file in `ls ${dir}/${prefix}*.c ${dir}/${prefix}*.cc 2> /dev/null | sort`
- do
- if [ ! -f ${file} ]; then
- continue
- fi
- fname=`basename ${file} .c`
- fname=`basename ${fname} .cc`
- get_description ${file}
- desc=${TDESC}
- printf "\t\t<member name=\"${fname}\" displayname=\"${desc}\" remove_on_change=\"${dir}/${fname}.o ${dir}/${fname}.oo ${dir}/${fname}.so\">\n"
- awk -f build_tools/get_moduleinfo ${file}
- printf "\t\t</member>\n"
- awk -f build_tools/get_makeopts ${file} >> .makeoptstmp
- done
- printf "\t</category>\n"
-}
-
-echo "<?xml version=\"1.0\"?>"
-echo
-echo "<menu name=\"Asterisk Module Selection\">"
-rm -f .makeoptstmp
-process_dir apps app APPS Applications
-process_dir cdr cdr CDR "Call Detail Recording"
-process_dir channels chan CHANNELS "Channel Drivers"
-process_dir codecs codec CODECS "Codec Translators"
-process_dir formats format FORMATS "Format Interpreters"
-process_dir funcs func FUNCS "Dialplan Functions"
-process_dir pbx pbx PBX "PBX Modules"
-process_dir res res RES "Resource Modules"
-cat .makeoptstmp
-cat build_tools/cflags.xml
-cat build_tools/embed_modules.xml
-cat sounds/sounds.xml
-rm -f .makeoptstmp
-echo "</menu>"
diff --git a/build_tools/prep_tarball b/build_tools/prep_tarball
index 9c0dd22c0..5353bb4bf 100755
--- a/build_tools/prep_tarball
+++ b/build_tools/prep_tarball
@@ -5,7 +5,8 @@
#
# It will be executed from the top-level directory of the project.
-make -C sounds all MENUSELECT_CORE_SOUNDS=CORE-SOUNDS-EN-GSM MENUSELECT_MOH=MOH-FREEPLAY-WAV WGET=wget DOWNLOAD=wget
+make -C sounds MENUSELECT_CORE_SOUNDS=CORE-SOUNDS-EN-GSM MENUSELECT_MOH=MOH-FREEPLAY-WAV WGET=wget DOWNLOAD=wget all
+make AWK=awk GREP=grep menuselect-tree
VERSION=`cat .version`
sed -i -e "s/ASTERISKVERSION/${VERSION}/" doc/tex/asterisk.tex