[svn-commits] jpeeler: branch 1.0 r465 - in /branches/1.0: menuselect.c menuselect.h

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Jan 30 17:37:30 CST 2009


Author: jpeeler
Date: Fri Jan 30 17:37:29 2009
New Revision: 465

URL: http://svn.digium.com/svn-view/menuselect?view=rev&rev=465
Log:
(closes issue #14137)
Reported by: jnemeth

Add the string "asterisk.makeopts" to search for valid makeopts configuration files in the arguments provided to menuselect. Previously, the existing_config flag was not getting set causing the defaults to load when a menuselect.makeopts file was not present, even though a valid /etc/asterisk.makeopts or ~/.asterisk.makeopts file existed. Technically the use of strstr is going to allow any valid file with the string "asterisk.makeopts" in it to work. I believe this is best though since it avoids any hardcoded paths and the encouraged method of invoking menuselect is through use of the menuselect makefile targets.


Modified:
    branches/1.0/menuselect.c
    branches/1.0/menuselect.h

Modified: branches/1.0/menuselect.c
URL: http://svn.digium.com/svn-view/menuselect/branches/1.0/menuselect.c?view=diff&rev=465&r1=464&r2=465
==============================================================================
--- branches/1.0/menuselect.c (original)
+++ branches/1.0/menuselect.c Fri Jan 30 17:37:29 2009
@@ -1237,8 +1237,9 @@
 			check_deps = 1;
 		else {
 			res = parse_existing_config(argv[x]);
-			if (!res && !strcasecmp(argv[x], OUTPUT_MAKEOPTS_DEFAULT))
+			if (!res && (!strcasecmp(argv[x], OUTPUT_MAKEOPTS_DEFAULT) || strstr(argv[x], SAVED_MAKEOPTS))) {
 				existing_config = 1;
+			}
 			res = 0;
 		}
 	}

Modified: branches/1.0/menuselect.h
URL: http://svn.digium.com/svn-view/menuselect/branches/1.0/menuselect.h?view=diff&rev=465&r1=464&r2=465
==============================================================================
--- branches/1.0/menuselect.h (original)
+++ branches/1.0/menuselect.h Fri Jan 30 17:37:29 2009
@@ -30,6 +30,7 @@
 
 #define OUTPUT_MAKEOPTS_DEFAULT "menuselect.makeopts"
 #define OUTPUT_MAKEDEPS_DEFAULT "menuselect.makedeps"
+#define SAVED_MAKEOPTS          "asterisk.makeopts"
 #define MENUSELECT_DEPS         "build_tools/menuselect-deps"
 
 struct member;




More information about the svn-commits mailing list