2006-04-24 17:11:45 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2006-05-09 08:45:37 +00:00
|
|
|
get_description() {
|
2007-08-22 18:54:30 +00:00
|
|
|
TDESC=`${GREP} -e AST_MODULE_INFO ${1} | head -n 1 | cut -d '"' -f 2`
|
2006-05-09 08:45:37 +00:00
|
|
|
}
|
|
|
|
|
2006-04-24 17:11:45 +00:00
|
|
|
process_dir() {
|
|
|
|
dir=${1}
|
|
|
|
prefix=${2}_
|
|
|
|
catsuffix=${3}
|
|
|
|
displayname=${4}
|
|
|
|
|
2007-06-18 16:15:44 +00:00
|
|
|
printf "\t<category name=\"MENUSELECT_${catsuffix}\" displayname=\"${displayname}\" remove_on_change=\"${dir}/modules.link\">\n"
|
2006-07-07 02:33:24 +00:00
|
|
|
for file in `ls ${dir}/${prefix}*.c ${dir}/${prefix}*.cc 2> /dev/null | sort`
|
2006-04-24 17:11:45 +00:00
|
|
|
do
|
2006-07-07 02:58:53 +00:00
|
|
|
if [ ! -f ${file} ]; then
|
2006-07-07 02:33:24 +00:00
|
|
|
continue
|
|
|
|
fi
|
2006-06-30 04:33:18 +00:00
|
|
|
fname=`basename ${file} .c`
|
2006-07-06 23:51:15 +00:00
|
|
|
fname=`basename ${fname} .cc`
|
2006-05-09 08:45:37 +00:00
|
|
|
get_description ${file}
|
|
|
|
desc=${TDESC}
|
2007-06-18 16:15:44 +00:00
|
|
|
printf "\t\t<member name=\"${fname}\" displayname=\"${desc}\" remove_on_change=\"${dir}/${fname}.o ${dir}/${fname}.oo ${dir}/${fname}.so\">\n"
|
2006-06-16 16:17:43 +00:00
|
|
|
awk -f build_tools/get_moduleinfo ${file}
|
2007-06-18 16:15:44 +00:00
|
|
|
printf "\t\t</member>\n"
|
2006-06-16 16:17:43 +00:00
|
|
|
awk -f build_tools/get_makeopts ${file} >> .makeoptstmp
|
|
|
|
done
|
2007-06-18 16:15:44 +00:00
|
|
|
printf "\t</category>\n"
|
2006-04-24 17:11:45 +00:00
|
|
|
}
|
|
|
|
|
2006-09-18 19:08:40 +00:00
|
|
|
echo "<?xml version=\"1.0\"?>"
|
2006-04-24 17:11:45 +00:00
|
|
|
echo
|
2006-06-24 04:10:41 +00:00
|
|
|
echo "<menu name=\"Asterisk Module Selection\">"
|
2006-06-16 16:17:43 +00:00
|
|
|
rm -f .makeoptstmp
|
2006-04-24 17:11:45 +00:00
|
|
|
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"
|
2006-04-28 17:17:46 +00:00
|
|
|
process_dir funcs func FUNCS "Dialplan Functions"
|
2006-04-24 17:11:45 +00:00
|
|
|
process_dir pbx pbx PBX "PBX Modules"
|
|
|
|
process_dir res res RES "Resource Modules"
|
2006-08-21 02:11:39 +00:00
|
|
|
cat .makeoptstmp
|
2006-04-24 17:11:45 +00:00
|
|
|
cat build_tools/cflags.xml
|
2006-08-21 02:11:39 +00:00
|
|
|
cat build_tools/embed_modules.xml
|
2006-06-07 20:54:30 +00:00
|
|
|
cat sounds/sounds.xml
|
2006-06-16 16:17:43 +00:00
|
|
|
rm -f .makeoptstmp
|
2006-04-24 17:11:45 +00:00
|
|
|
echo "</menu>"
|