summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir@cohens.org.il>2010-03-24 18:02:58 +0200
committerTzafrir Cohen <tzafrir@cohens.org.il>2010-03-24 18:02:58 +0200
commitc7c3e1ec3577226d359198072a9a5bbcef285e63 (patch)
tree876ab0b83678d1e82fcd7401c19e0ef8479bb6c8
parent131a56d91273dadfd24e58987c5fb4e8365fbf29 (diff)
support cflags-devmode if dev-mode enabled
* Read makeopts to check if devmode was enabled by the configure script. * If so, also use cflags-devmode.xml .
-rwxr-xr-xmenuselect/menuselect25
1 files changed, 25 insertions, 0 deletions
diff --git a/menuselect/menuselect b/menuselect/menuselect
index 32ba175..20daead 100755
--- a/menuselect/menuselect
+++ b/menuselect/menuselect
@@ -71,6 +71,9 @@ my %ModInfo = ();
# 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 @@ sub get_autoconf_deps() {
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 @@ sub check_dependencies() {
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();