[svn-commits] branch russell/autoconf_and_menuselect - r7997 in /team/russell/autoconf_and_...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Jan 11 20:44:59 CST 2006


Author: russell
Date: Wed Jan 11 20:44:56 2006
New Revision: 7997

URL: http://svn.digium.com/view/asterisk?rev=7997&view=rev
Log:
various cleanups ...

Modified:
    team/russell/autoconf_and_menuselect/Makefile
    team/russell/autoconf_and_menuselect/apps/makeopts.xml
    team/russell/autoconf_and_menuselect/autoconf/menuselect-deps.in
    team/russell/autoconf_and_menuselect/build_tools/menuselect.c
    team/russell/autoconf_and_menuselect/build_tools/menuselect.h

Modified: team/russell/autoconf_and_menuselect/Makefile
URL: http://svn.digium.com/view/asterisk/team/russell/autoconf_and_menuselect/Makefile?rev=7997&r1=7996&r2=7997&view=diff
==============================================================================
--- team/russell/autoconf_and_menuselect/Makefile (original)
+++ team/russell/autoconf_and_menuselect/Makefile Wed Jan 11 20:44:56 2006
@@ -921,11 +921,12 @@
 	fi
 
 menuselect: mxml/libmxml.a _menuselect
-	./build_tools/menuselect
+	@echo "Running menuselect ... "
+	@./build_tools/menuselect && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
 
 _menuselect:
 	$(MAKE) -C build_tools _menuselect
 	
 mxml/libmxml.a: FORCE
-	cd mxml && test -f config.h || ./configure
+	@cd mxml && test -f config.h || ./configure
 	$(MAKE) -C mxml libmxml.a

Modified: team/russell/autoconf_and_menuselect/apps/makeopts.xml
URL: http://svn.digium.com/view/asterisk/team/russell/autoconf_and_menuselect/apps/makeopts.xml?rev=7997&r1=7996&r2=7997&view=diff
==============================================================================
--- team/russell/autoconf_and_menuselect/apps/makeopts.xml (original)
+++ team/russell/autoconf_and_menuselect/apps/makeopts.xml Wed Jan 11 20:44:56 2006
@@ -210,6 +210,7 @@
 	</member>
 	<member>
 		<name>app_zapbarge.so</name>
+		<depend>zaptel</depend>
 	</member>
 	<member>
 		<name>app_zapras.so</name>

Modified: team/russell/autoconf_and_menuselect/autoconf/menuselect-deps.in
URL: http://svn.digium.com/view/asterisk/team/russell/autoconf_and_menuselect/autoconf/menuselect-deps.in?rev=7997&r1=7996&r2=7997&view=diff
==============================================================================
--- team/russell/autoconf_and_menuselect/autoconf/menuselect-deps.in (original)
+++ team/russell/autoconf_and_menuselect/autoconf/menuselect-deps.in Wed Jan 11 20:44:56 2006
@@ -1,29 +1,29 @@
-##modulesdependantfile
+<?xml version="1.0"?>
 
-zaptel=@PBX_ZAPTEL@
-unixodbc=@PBX_UNIXODBC@
-pgsql=@PBX_PGSQL@
-sqlite=@PBX_SQLITE@
-freetds=@PBX_FREETDS@
+<zaptel>@PBX_ZAPTEL@</zaptel>
+<unixodbc>@PBX_UNIXODBC@</unixodbc>
+<pgsql>@PBX_PGSQL@</pgsql>
+<sqlite>@PBX_SQLITE@</sqlite>
+<freetds>@PBX_FREETDS@</freetds>
 
-asound=@PBX_ASOUND@
+<asound>@PBX_ASOUND@</asound>
 
-vpbapi=@PBX_VPBAPI@
-nbs=@PBX_NBS@
+<vpbapi>@PBX_VPBAPI@</vpbapi>
+<nbs>@PBX_NBS@</nbs>
 
-ossaudio=@PBX_OSSAUDIO@
+<ossaudio>@PBX_OSSAUDIO@</ossaudio>
 
-libpri=@PBX_LIBPRI@
+<libpri>@PBX_LIBPRI@</libpri>
 
-libmfcr2=@PBX_LIBMFCR2@
+<libmfcr2>@PBX_LIBMFCR2@</libmfcr2>
 
-libspeex=@PBX_LIBSPEEX@
+<libspeex>@PBX_LIBSPEEX@</libspeex>
 
-libvorbis=@PBX_LIBVORBIS@
+<libvorbis>@PBX_LIBVORBIS@</libvorbis>
 
-libosptk=@PBX_LIBOSPTK@
+<libosptk>@PBX_LIBOSPTK@</libosptk>
 
-libpopt=@PBX_LIBPOPT@
-libnewt=@PBX_LIBNEWT@
+<libpopt>@PBX_LIBPOPT@</libpopt>
+<libnewt>@PBX_LIBNEWT@</libnewt>
 
-poll=@PBX_POLL@
+<poll>@PBX_POLL@</poll>

Modified: team/russell/autoconf_and_menuselect/build_tools/menuselect.c
URL: http://svn.digium.com/view/asterisk/team/russell/autoconf_and_menuselect/build_tools/menuselect.c?rev=7997&r1=7996&r2=7997&view=diff
==============================================================================
--- team/russell/autoconf_and_menuselect/build_tools/menuselect.c (original)
+++ team/russell/autoconf_and_menuselect/build_tools/menuselect.c Wed Jan 11 20:44:56 2006
@@ -192,22 +192,19 @@
 	mxml_node_t *cur2;
 	mxml_node_t *cur3;
 
-	f = fopen(makeopts_xml, "r");
-	if (!f) {
+	if (!(f = fopen(makeopts_xml, "r"))) {
 		fprintf(stderr, "Unable to open '%s' for reading!\n", makeopts_xml);
 		return -1;
 	}
 
-	tree = my_calloc(1, sizeof(struct tree));
-	if (!tree) {
+	if (!(tree = my_calloc(1, sizeof(*tree)))) {
 		close(f);
 		return -1;
 	}
 	tree->next = trees;
 	trees = tree;
 
-	tree->root = mxmlLoadFile(NULL, f, MXML_OPAQUE_CALLBACK);
-	if (!tree->root) {
+	if (!(tree->root = mxmlLoadFile(NULL, f, MXML_OPAQUE_CALLBACK))) {
 		close(f);
 		return -1;
 	}
@@ -228,8 +225,7 @@
 	     cur;
 	     cur = mxmlFindElement(cur, tree->root, "category", NULL, NULL, MXML_DESCEND))
 	{
-		cur2 = mxmlFindElement(cur, cur, "name", NULL, NULL, MXML_DESCEND);
-		if (!cur2) {
+		if (!(cur2 = mxmlFindElement(cur, cur, "name", NULL, NULL, MXML_DESCEND))) {
 			fprintf(stderr, "category specified with no name in '%s'!\n", makeopts_xml);
 			continue;
 		}
@@ -239,30 +235,24 @@
 		}
 		cat_name = cur2->child->value.opaque;
 	
-		cur2 = mxmlFindElement(cur, cur, "displayname", NULL, NULL, MXML_DESCEND);
-		if (cur2 && cur2->child) {
+		if ((cur2 = mxmlFindElement(cur, cur, "displayname", NULL, NULL, MXML_DESCEND)) && cur2->child)
 			cat_displayname = cur2->child->value.opaque;
-		} else {
+		else
 			cat_displayname = NULL;
-		}
-
-		cur2 = mxmlFindElement(cur, cur, "description", NULL, NULL, MXML_DESCEND);
-		if (cur2 && cur2->child) {
+
+		if ((cur2 = mxmlFindElement(cur, cur, "description", NULL, NULL, MXML_DESCEND)) && cur2->child)
 			cat_desc = cur2->child->value.opaque;
-		} else {
+		else
 			cat_desc = NULL;
-		}
-
-		cat = add_category(cat_name, cat_displayname, cat_desc);
-		if (!cat)
+
+		if (!(cat = add_category(cat_name, cat_displayname, cat_desc)))
 			continue;
 
 		for (cur2 = mxmlFindElement(cur, cur, "member", NULL, NULL, MXML_DESCEND);
 		     cur2;
 		     cur2 = mxmlFindElement(cur2, cur, "member", NULL, NULL, MXML_DESCEND))
 		{
-			cur3 = mxmlFindElement(cur2, cur2, "name", NULL, NULL, MXML_DESCEND);
-			if (!cur3) {
+			if (!(cur3 = mxmlFindElement(cur2, cur2, "name", NULL, NULL, MXML_DESCEND))) {
 				fprintf(stderr, "Member listed in category '%s' with no name!  Moving on ...\n", cat->name);
 				continue;	
 			}
@@ -272,19 +262,15 @@
 			}
 			mem_name = cur3->child->value.opaque;
 
-			cur3 = mxmlFindElement(cur2, cur2, "description", NULL, NULL, MXML_DESCEND);
-			if (!cur3 || !cur3->child) {
+			if ((cur3 = mxmlFindElement(cur2, cur2, "description", NULL, NULL, MXML_DESCEND)) && cur3->child)
+				mem_desc = cur3->child->value.opaque;
+			else
 				mem_desc = NULL;
-			} else {
-				mem_desc = cur3->child->value.opaque;
-			}
-
-			cur3 = mxmlFindElement(cur2, cur2, "displayname", NULL, NULL, MXML_DESCEND);
-			if (!cur3 || !cur3->child) {
+
+			if ((cur3 = mxmlFindElement(cur2, cur2, "displayname", NULL, NULL, MXML_DESCEND)) && cur3->child)
+				mem_displayname = cur3->child->value.opaque;
+			else
 				mem_displayname = NULL;
-			} else {
-				mem_displayname = cur3->child->value.opaque;
-			}
 
 			add_member(mem_name, mem_displayname, mem_desc, cat);
 		}
@@ -355,8 +341,7 @@
 	char *category, *parse, *member;
 	int lineno = 0;
 
-	f = fopen(output_makeopts, "r");
-	if (!f) {
+	if (!(f = fopen(output_makeopts, "r"))) {
 #ifdef MENUSELECT_DEBUG
 		fprintf(stderr, "Unable to open '%s' for reading exisiting config.\n", output_makeopts);
 #endif	
@@ -401,8 +386,7 @@
 	struct member *mem;
 	int print_cat = 1;
 
-	f = fopen(output_makeopts, "w");
-	if (!f) {
+	if (!(f = fopen(output_makeopts, "w"))) {
 		fprintf(stderr, "Unable to open build configuration file (%s) for writing!\n", output_makeopts);
 		return -1;
 	}
@@ -460,7 +444,8 @@
 
 	for (cat = categories; cat; cat = cat_next) {
 		cat_next = cat->next;
-		for (mem = cat->members; mem; mem = mem_next) { mem_next = mem->next;
+		for (mem = cat->members; mem; mem = mem_next) { 
+			mem_next = mem->next;
 			free(mem);
 		}
 		free(cat);
@@ -600,7 +585,6 @@
 		case KEY_DOWN:
 			if (curopt < maxopt) {
 				curopt++;
-				//if (curopt > start && maxopt > (max_y - TITLE_HEIGHT - 2)) {
 				if (curopt > end - 1) {
 					start++;
 					end++;

Modified: team/russell/autoconf_and_menuselect/build_tools/menuselect.h
URL: http://svn.digium.com/view/asterisk/team/russell/autoconf_and_menuselect/build_tools/menuselect.h?rev=7997&r1=7996&r2=7997&view=diff
==============================================================================
--- team/russell/autoconf_and_menuselect/build_tools/menuselect.h (original)
+++ team/russell/autoconf_and_menuselect/build_tools/menuselect.h Wed Jan 11 20:44:56 2006
@@ -25,6 +25,7 @@
 
 #define MENU_TITLE		"Asterisk Module Selection"
 #define OUTPUT_MAKEOPTS_DEFAULT "asterisk.makeopts"
+#define MENUSELECT_DEPS		"autoconf/menuselect-deps"
 
 const char *makeopts_files[] = {
 	"apps/makeopts.xml",



More information about the svn-commits mailing list