[asterisk-commits] branch group/autoconf_and_menuselect r21773 -
/team/group/autoconf_and_menuse...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Apr 20 15:24:56 MST 2006
Author: kpfleming
Date: Thu Apr 20 17:24:55 2006
New Revision: 21773
URL: http://svn.digium.com/view/asterisk?rev=21773&view=rev
Log:
this still needs -D_GNU_SOURCE
don't treat global/user makeopts files as 'existing_config', and don't treat non-existent menuselect.makeopts as 'existing_config' either
Modified:
team/group/autoconf_and_menuselect/build_tools/Makefile
team/group/autoconf_and_menuselect/build_tools/menuselect.c
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=21773&r1=21772&r2=21773&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/build_tools/Makefile (original)
+++ team/group/autoconf_and_menuselect/build_tools/Makefile Thu Apr 20 17:24:55 2006
@@ -2,7 +2,7 @@
$(CC) -g -o menuselect menuselect.o ../mxml/libmxml.a -lcurses
menuselect.o: menuselect.c menuselect.h
- $(CC) -g -o menuselect.o -c -I../ -I../include/ menuselect.c
+ $(CC) -D_GNU_SOURCE -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=21773&r1=21772&r2=21773&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/build_tools/menuselect.c (original)
+++ team/group/autoconf_and_menuselect/build_tools/menuselect.c Thu Apr 20 17:24:55 2006
@@ -479,7 +479,7 @@
}
/*! \brief Parse an existing output makeopts file and enable members previously selected */
-void parse_existing_config(const char *infile)
+int parse_existing_config(const char *infile)
{
FILE *f;
char buf[2048];
@@ -491,10 +491,8 @@
/* This isn't really an error, so only print the message in debug mode */
fprintf(stderr, "Unable to open '%s' for reading existing config.\n", infile);
#endif
- return;
- }
-
- existing_config = 1;
+ return -1;
+ }
while (fgets(buf, sizeof(buf), f)) {
lineno++;
@@ -529,6 +527,8 @@
}
fclose(f);
+
+ return 0;
}
/*! \brief Create the output makeopts file that results from the user's selections */
@@ -904,8 +904,11 @@
for (x = 1; x < argc; x++) {
if (!strcmp(argv[x], "--check-deps"))
check_deps = 1;
- else
- parse_existing_config(argv[x]);
+ else {
+ res = parse_existing_config(argv[x]);
+ if (!res && !strcasecmp(argv[x], OUTPUT_MAKEOPTS_DEFAULT))
+ existing_config = 1;
+ }
}
/* Process module dependencies */
More information about the asterisk-commits
mailing list