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

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Mar 2 11:27:50 MST 2006


Author: russell
Date: Thu Mar  2 12:27:43 2006
New Revision: 11560

URL: http://svn.digium.com/view/asterisk?rev=11560&view=rev
Log:
add some CFLAGS to the menu

Added:
    team/group/autoconf_and_menuselect/build_tools/cflags.xml   (with props)
Modified:
    team/group/autoconf_and_menuselect/Makefile
    team/group/autoconf_and_menuselect/build_tools/menuselect.c
    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=11560&r1=11559&r2=11560&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/Makefile (original)
+++ team/group/autoconf_and_menuselect/Makefile Thu Mar  2 12:27:43 2006
@@ -85,13 +85,6 @@
 
 # Uncomment next one to enable ast_frame tracing (for debugging)
 TRACE_FRAMES = #-DTRACE_FRAMES
-
-# Uncomment next one to enable malloc debugging
-# You can view malloc debugging with:
-#   *CLI> show memory allocations [filename]
-#   *CLI> show memory summary [filename]
-#
-MALLOC_DEBUG = #-include $(PWD)/include/asterisk/astmm.h
 
 # Where to install asterisk after compiling
 # Default -> leave empty
@@ -189,6 +182,14 @@
 
 ifneq ($(wildcard autoconf/menuselect-deps),)
   include autoconf/menuselect-deps
+endif
+
+ASTCFLAGS+=$(MENUSELECT_CFLAGS)
+
+#   *CLI> show memory allocations [filename]
+#   *CLI> show memory summary [filename]
+ifneq ($(findstring -DMALLOC_DEBUG,$(ASTCFLAGS)),)
+  AST_CFLAGS+=-include $(PWD)/include/asterisk/astmm.h
 endif
 
 ifeq ($(OSARCH),Linux)

Added: team/group/autoconf_and_menuselect/build_tools/cflags.xml
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/build_tools/cflags.xml?rev=11560&view=auto
==============================================================================
--- team/group/autoconf_and_menuselect/build_tools/cflags.xml (added)
+++ team/group/autoconf_and_menuselect/build_tools/cflags.xml Thu Mar  2 12:27:43 2006
@@ -1,0 +1,11 @@
+	<category name="MENUSELECT_CFLAGS" displayname="Compiler Flags" positive_output="yes">
+		<member name="-DDEBUG_SCHEDULER"/>
+		<member name="-DDEBUG_THREADS"/>
+		<member name="-DDETECT_DEADLOCKS"/>
+		<member name="-DDUMP_SCHEDULER"/>
+		<member name="-DLOW_MEMORY"/>
+		<member name="-DMALLOC_DEBUG"/>
+		<member name="-DMUFFIN_POWER"/>
+		<member name="-DRADIO_RELAX"/>
+		<member name="-DTRACE_FRAMES"/>
+	</category>

Propchange: team/group/autoconf_and_menuselect/build_tools/cflags.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/group/autoconf_and_menuselect/build_tools/cflags.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/group/autoconf_and_menuselect/build_tools/cflags.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

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=11560&r1=11559&r2=11560&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/build_tools/menuselect.c (original)
+++ team/group/autoconf_and_menuselect/build_tools/menuselect.c Thu Mar  2 12:27:43 2006
@@ -81,6 +81,8 @@
 	const char *name;
 	/*! the name displayed in the menu */
 	const char *displayname;
+	/*! Display what is selected, as opposed to not selected */
+	int positive_output;
 	/*! the list of possible values to be set in this variable */
 	AST_LIST_HEAD_NOLOCK(, member) members;
 	/*! for linking */
@@ -197,6 +199,7 @@
 	mxml_node_t *cur2;
 	mxml_node_t *cur3;
 	mxml_node_t *menu;
+	const char *tmp;
 
 	if (!(f = fopen(makeopts_xml, "r"))) {
 		fprintf(stderr, "Unable to open '%s' for reading!\n", makeopts_xml);
@@ -237,6 +240,8 @@
 
 		cat->name = mxmlElementGetAttr(cur, "name");
 		cat->displayname = mxmlElementGetAttr(cur, "displayname");
+		if ((tmp = mxmlElementGetAttr(cur, "positive_output")))
+			cat->positive_output = !strcasecmp(tmp, "yes");
 
 		if (add_category(cat)) {
 			free(cat);
@@ -250,8 +255,9 @@
 			if (!(mem = my_calloc(1, sizeof(*mem))))
 				return -1;
 			
-			/* Enabled by default */
-			mem->enabled = 1;
+			if (!cat->positive_output)
+				mem->enabled = 1; /* Enabled by default */
+
 			mem->name = mxmlElementGetAttr(cur2, "name");
 
 			cur3 = mxmlFindElement(cur2, cur2, "defaultbuild", NULL, NULL, MXML_DESCEND);
@@ -379,8 +385,8 @@
 	return res;
 }
 
-/*! \brief Given the string representation of a member and category, find it and mark it as disabled */
-void mark_as_disabled(const char *member, const char *category)
+/*! \brief Given the string representation of a member and category, mark it as present in a given input file */
+void mark_as_present(const char *member, const char *category)
 {
 	struct category *cat;
 	struct member *mem;
@@ -390,7 +396,7 @@
 			continue;
 		AST_LIST_TRAVERSE(&cat->members, mem, list) {
 			if (!strcmp(member, mem->name)) {
-				mem->enabled = 0;
+				mem->enabled = cat->positive_output;
 				break;
 			}
 		}
@@ -460,7 +466,7 @@
 			if (strlen_zero(member))
 				continue;
 
-			mark_as_disabled(member, category);
+			mark_as_present(member, category);
 		}
 	}
 
@@ -483,7 +489,8 @@
 	AST_LIST_TRAVERSE(&categories, cat, list) {
 		fprintf(f, "%s=", cat->name);
 		AST_LIST_TRAVERSE(&cat->members, mem, list) {
-			if (!mem->enabled || mem->depsfailed) /* We're listing everything *not* to build */
+			if ( (!cat->positive_output && (!mem->enabled || mem->depsfailed)) 
+				|| (cat->positive_output && mem->enabled && !mem->depsfailed) )
 				fprintf(f, "%s ", mem->name);
 		}
 		fprintf(f, "\n");

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=11560&r1=11559&r2=11560&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/build_tools/prep_moduledeps (original)
+++ team/group/autoconf_and_menuselect/build_tools/prep_moduledeps Thu Mar  2 12:27:43 2006
@@ -28,4 +28,5 @@
 process_dir funcs func FUNCS "Diaplan Functions"
 process_dir pbx pbx PBX "PBX Modules"
 process_dir res res RES "Resource Modules"
+cat build_tools/cflags.xml
 echo "</menu>"



More information about the asterisk-commits mailing list