Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 500fcbc4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'localmodconfig-v3.10' of...

Merge tag 'localmodconfig-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-kconfig

Pull localmodconfig changes from Steven Rostedt:
 "A bug was recently found in the make localmodconfig where it would
  miss dependencies of config files are include in other config files
  inside an if statement.

  Also added a debug print that helped in solving this bug."

* tag 'localmodconfig-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-kconfig:
  localmodconfig: Process source kconfig files as they are found
  localmodconfig: Add debug prints for dependencies of module configs
parents 56847d85 ced9cb1a
Loading
Loading
Loading
Loading
+16 −10
Original line number Diff line number Diff line
@@ -156,7 +156,6 @@ sub read_kconfig {

    my $state = "NONE";
    my $config;
    my @kconfigs;

    my $cont = 0;
    my $line;
@@ -190,7 +189,13 @@ sub read_kconfig {

	# collect any Kconfig sources
	if (/^source\s*"(.*)"/) {
	    $kconfigs[$#kconfigs+1] = $1;
	    my $kconfig = $1;
	    # prevent reading twice.
	    if (!defined($read_kconfigs{$kconfig})) {
		$read_kconfigs{$kconfig} = 1;
		read_kconfig($kconfig);
	    }
	    next;
	}

	# configs found
@@ -250,14 +255,6 @@ sub read_kconfig {
	}
    }
    close($kinfile);

    # read in any configs that were found.
    foreach my $kconfig (@kconfigs) {
	if (!defined($read_kconfigs{$kconfig})) {
	    $read_kconfigs{$kconfig} = 1;
	    read_kconfig($kconfig);
	}
    }
}

if ($kconfig) {
@@ -396,6 +393,15 @@ foreach my $module (keys(%modules)) {
	foreach my $conf (@arr) {
	    $configs{$conf} = $module;
	    dprint "$conf added by direct ($module)\n";
	    if ($debugprint) {
		my $c=$conf;
		$c =~ s/^CONFIG_//;
		if (defined($depends{$c})) {
		    dprint " deps = $depends{$c}\n";
		} else {
		    dprint " no deps\n";
		}
	    }
	}
    } else {
	# Most likely, someone has a custom (binary?) module loaded.