[svn-commits] tzafrir: trunk r716 - /trunk/contrib/menuselect-dummy

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Mar 1 14:09:14 CST 2010


Author: tzafrir
Date: Mon Mar  1 14:09:10 2010
New Revision: 716

URL: http://svnview.digium.com/svn/menuselect?view=rev&rev=716
Log:
Allow using dev-mode with dummy-select

Modified:
    trunk/contrib/menuselect-dummy

Modified: trunk/contrib/menuselect-dummy
URL: http://svnview.digium.com/svn/menuselect/trunk/contrib/menuselect-dummy?view=diff&rev=716&r1=715&r2=716
==============================================================================
--- trunk/contrib/menuselect-dummy (original)
+++ trunk/contrib/menuselect-dummy Mon Mar  1 14:09:10 2010
@@ -70,6 +70,9 @@
 
 # extract configuration from kernel modules:
 my $AutoconfDepsFile = "build_tools/menuselect-deps";
+
+my $AutoconfOptsFile = "makeopts";
+my %ConfigureOpts = (); # 
 
 # configuration file to read for some directives:
 my $ConfFile = "build_tools/conf";
@@ -290,6 +293,23 @@
 	close DEPS;
 }
 
+# Get the available libraries that autoconf generated.
+sub get_autoconf_opts() {
+	open OPTS, $AutoconfOptsFile or
+		die "Failed to open $AutoconfOptsFile. Aborting: $!\n";
+
+	while (<OPTS>) {
+		chomp;
+		next if /^(#|$)/;
+		my ($var, $val) = split /\s*=\s*/, $_, 2;
+		$ConfigureOpts{$var} = $val;
+	}
+	close OPTS;
+	if (not exists $ConfigureOpts{AST_DEVMODE}) {
+		$ConfigureOpts{AST_DEVMODE} = 'no';
+	}
+}
+
 # Read our specific config file.
 #
 # Its format:
@@ -520,7 +540,12 @@
 
 	extract_subdirs(@Subdirs);
 
+	get_autoconf_opts();
+
 	parse_menuselect_xml_file('build_tools/cflags.xml');
+	if ($ConfigureOpts{AST_DEVMODE} eq 'yes') {
+		parse_menuselect_xml_file('build_tools/cflags-devmode.xml');
+	} 
 	parse_menuselect_xml_file('sounds/sounds.xml');
 
 	apply_random_drop();




More information about the svn-commits mailing list