[asterisk-commits] branch group/autoconf_and_menuselect r11043 - in /team/group/autoconf_and_men...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Feb 24 18:57:23 MST 2006


Author: russell
Date: Fri Feb 24 19:57:21 2006
New Revision: 11043

URL: http://svn.digium.com/view/asterisk?rev=11043&view=rev
Log:
automatically generate makeopts.xml if it does not exist when running menuselect

Modified:
    team/group/autoconf_and_menuselect/Makefile
    team/group/autoconf_and_menuselect/build_tools/Makefile
    team/group/autoconf_and_menuselect/build_tools/menuselect.c
    team/group/autoconf_and_menuselect/build_tools/menuselect.h
    team/group/autoconf_and_menuselect/build_tools/prep_moduledeps

Modified: team/group/autoconf_and_menuselect/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/Makefile?rev=11043&r1=11042&r2=11043&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/Makefile (original)
+++ team/group/autoconf_and_menuselect/Makefile Fri Feb 24 19:57:21 2006
@@ -963,7 +963,7 @@
 	rm -rf $(DESTDIR)$(ASTETCDIR)
 	rm -rf $(DESTDIR)$(ASTLOGDIR)
 
-menuselect: mxml/libmxml.a _menuselect
+menuselect: mxml/libmxml.a _menuselect makeopts.xml
 	@echo "Running menuselect ... "
 	@./build_tools/menuselect && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
 
@@ -973,3 +973,6 @@
 mxml/libmxml.a: FORCE
 	@cd mxml && unset CFLAGS && test -f config.h || ./configure
 	$(MAKE) -C mxml libmxml.a
+
+makeopts.xml:
+	@test -f makeopts.xml || ( echo "Generating makeopts.xml ..." && ./build_tools/prep_moduledeps > makeopts.xml )

Modified: team/group/autoconf_and_menuselect/build_tools/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/build_tools/Makefile?rev=11043&r1=11042&r2=11043&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/build_tools/Makefile (original)
+++ team/group/autoconf_and_menuselect/build_tools/Makefile Fri Feb 24 19:57:21 2006
@@ -1,8 +1,8 @@
 _menuselect: menuselect.o
-	$(CC) -o menuselect menuselect.o ../mxml/libmxml.a -lcurses
+	$(CC) -g -o menuselect menuselect.o ../mxml/libmxml.a -lcurses
 
 menuselect.o: menuselect.c menuselect.h
-	$(CC) -o menuselect.o -c -I../ -I../include/ menuselect.c
+	$(CC) -g -o menuselect.o -c -I../ -I../include/ menuselect.c
 
 clean:
 	rm -f menuselect menuselect.o

Modified: team/group/autoconf_and_menuselect/build_tools/menuselect.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/build_tools/menuselect.c?rev=11043&r1=11042&r2=11043&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/build_tools/menuselect.c (original)
+++ team/group/autoconf_and_menuselect/build_tools/menuselect.c Fri Feb 24 19:57:21 2006
@@ -192,6 +192,7 @@
 	mxml_node_t *cur;
 	mxml_node_t *cur2;
 	mxml_node_t *cur3;
+	mxml_node_t *menu;
 
 	if (!(f = fopen(makeopts_xml, "r"))) {
 		fprintf(stderr, "Unable to open '%s' for reading!\n", makeopts_xml);
@@ -222,10 +223,10 @@
 	 * category.  For every member found, we find its name and store it in
 	 * the member list for the category.
 	 */
-
-	for (cur = mxmlFindElement(tree->root, tree->root, "category", NULL, NULL, MXML_DESCEND);
+	menu = mxmlFindElement(tree->root, tree->root, "menu", NULL, NULL, MXML_DESCEND);
+	for (cur = mxmlFindElement(menu, menu, "category", NULL, NULL, MXML_DESCEND);
 	     cur;
-	     cur = mxmlFindElement(cur, tree->root, "category", NULL, NULL, MXML_DESCEND))
+	     cur = mxmlFindElement(cur, menu, "category", NULL, NULL, MXML_DESCEND))
 	{
 		if (!(cat = my_calloc(1, sizeof(*cat))))
 			return -1;
@@ -823,7 +824,7 @@
 	dump_member_list();
 #endif
 
-	if (argc == 2 || !strcmp(argv[1], "--check-deps")) {
+	if (argc == 2 && !strcmp(argv[1], "--check-deps")) {
 		/* Set to greater than 0 so that we won't run the menu
 		   or write out a new file, but we will still exit with
 		   a return code of 0 */

Modified: team/group/autoconf_and_menuselect/build_tools/menuselect.h
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/build_tools/menuselect.h?rev=11043&r1=11042&r2=11043&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/build_tools/menuselect.h (original)
+++ team/group/autoconf_and_menuselect/build_tools/menuselect.h Fri Feb 24 19:57:21 2006
@@ -45,11 +45,5 @@
 };
 
 const char * const makeopts_files[] = {
-	/*"apps/makeopts.xml",
-	"cdr/makeopts.xml",
-	"channels/makeopts.xml",
-	"formats/makeopts.xml",
-	"pbx/makeopts.xml",
-	"res/makeopts.xml",*/
-	"utils/makeopts.xml"
+	"makeopts.xml"
 };

Modified: team/group/autoconf_and_menuselect/build_tools/prep_moduledeps
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/build_tools/prep_moduledeps?rev=11043&r1=11042&r2=11043&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/build_tools/prep_moduledeps (original)
+++ team/group/autoconf_and_menuselect/build_tools/prep_moduledeps Fri Feb 24 19:57:21 2006
@@ -4,8 +4,9 @@
 	dir=${1}
 	prefix=${2}_
 	catsuffix=${3}
+	displayname=${4}
 
-	echo -e "\t<category name=\"MENUSELECT_${catsuffix}\">"
+	echo -e "\t<category name=\"MENUSELECT_${catsuffix}\" displayname=\"${displayname}\">"
 	for file in ${dir}/${prefix}*.c
 	do
 		fname=${file##${dir}/}
@@ -16,13 +17,15 @@
 	echo -e "\t</category>"
 }
 
+echo "<?xml version="1.0"?>"
+echo
 echo "<menu>"
-process_dir apps app APPS
-process_dir cdr cdr CDR
-process_dir channels chan CHANNELS
-process_dir codecs codec CODECS
-process_dir formats format FORMATS
-process_dir funcs func FUNCS
-process_dir pbx pbx PBX
-process_dir res res RES
+process_dir apps app APPS Applications
+process_dir cdr cdr CDR "Call Detail Recording Modules"
+process_dir channels chan CHANNELS "Channel Drivers"
+process_dir codecs codec CODECS "Codec Translators"
+process_dir formats format FORMATS "Format Interpretors"
+process_dir funcs func FUNCS "Diaplan Functions"
+process_dir pbx pbx PBX "PBX Modules"
+process_dir res res RES "Resource Modules"
 echo "</menu>"



More information about the asterisk-commits mailing list