[asterisk-commits] branch group/autoconf_and_menuselect r11061 - in
/team/group/autoconf_and_men...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Feb 24 21:32:58 MST 2006
Author: russell
Date: Fri Feb 24 22:32:56 2006
New Revision: 11061
URL: http://svn.digium.com/view/asterisk?rev=11061&view=rev
Log:
add the ability to be able to disable a module being built by default
by adding a tag into MODULEINFO
Modified:
team/group/autoconf_and_menuselect/apps/app_ivrdemo.c
team/group/autoconf_and_menuselect/apps/app_skel.c
team/group/autoconf_and_menuselect/build_tools/menuselect.c
Modified: team/group/autoconf_and_menuselect/apps/app_ivrdemo.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/apps/app_ivrdemo.c?rev=11061&r1=11060&r2=11061&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/apps/app_ivrdemo.c (original)
+++ team/group/autoconf_and_menuselect/apps/app_ivrdemo.c Fri Feb 24 22:32:56 2006
@@ -142,3 +142,7 @@
{
return ASTERISK_GPL_KEY;
}
+
+/*** MODULEINFO
+ <defaultbuild>no</defaultbuild>
+ ***/
Modified: team/group/autoconf_and_menuselect/apps/app_skel.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/apps/app_skel.c?rev=11061&r1=11060&r2=11061&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/apps/app_skel.c (original)
+++ team/group/autoconf_and_menuselect/apps/app_skel.c Fri Feb 24 22:32:56 2006
@@ -160,3 +160,7 @@
{
return ASTERISK_GPL_KEY;
}
+
+/*** MODULEINFO
+ <defaultbuild>no</defaultbuild>
+ ***/
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=11061&r1=11060&r2=11061&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/build_tools/menuselect.c (original)
+++ team/group/autoconf_and_menuselect/build_tools/menuselect.c Fri Feb 24 22:32:56 2006
@@ -116,7 +116,8 @@
char *output_makeopts = OUTPUT_MAKEOPTS_DEFAULT;
-int existing_config_exists = 0;
+/*! This is set to 1 if menuselect.makeopts pre-existed the execution of this app */
+int existing_config = 0;
/*! \brief a wrapper for calloc() that generates an error message if the allocation fails */
static inline void *my_calloc(size_t num, size_t len)
@@ -250,6 +251,10 @@
mem->enabled = 1;
mem->name = mxmlElementGetAttr(cur2, "name");
+ cur3 = mxmlFindElement(cur2, cur2, "defaultbuild", NULL, NULL, MXML_DESCEND);
+ if (cur3 && cur3->child && !strcmp("no", cur3->child->value.opaque))
+ mem->enabled = 0;
+
for (cur3 = mxmlFindElement(cur2, cur2, "depend", NULL, NULL, MXML_DESCEND);
cur3 && cur3->child;
cur3 = mxmlFindElement(cur3, cur2, "depend", NULL, NULL, MXML_DESCEND))
@@ -328,7 +333,7 @@
break; /* This dependency is not met, so we can stop now */
}
if (mem->depsfailed) {
- if (existing_config_exists && mem->enabled) {
+ if (existing_config && mem->enabled) {
/* Config already existed, but this module was not disabled.
* However, according to our current list of dependencies that
* have been met, this can not be built. */
@@ -426,7 +431,7 @@
return;
}
- existing_config_exists = 1;
+ existing_config = 1;
while (fgets(buf, sizeof(buf), f)) {
lineno++;
More information about the asterisk-commits
mailing list