30f27bd09a
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r80330 | qwell | 2007-08-22 13:53:18 -0500 (Wed, 22 Aug 2007) | 7 lines Fix a few build issues in Solaris (and likely others). Use GREP and ID variables from autoconf. Reported to me in #asterisk-dev I forgot who reported this - sorry. :( ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
49 lines
1.4 KiB
Bash
Executable file
49 lines
1.4 KiB
Bash
Executable file
#!/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>"
|