From a38ce9a37f67292ee1a966ed465f875c4d93e7c4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 8 Apr 2011 18:55:16 +0000 Subject: [PATCH] scripts/kconfig.pl: backport changes from trunk SVN-Revision: 26535 --- scripts/kconfig.pl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/kconfig.pl b/scripts/kconfig.pl index 7073e3b1ae..8113273538 100755 --- a/scripts/kconfig.pl +++ b/scripts/kconfig.pl @@ -80,13 +80,15 @@ sub config_add($$$) { return \%config; } -sub config_diff($$) { +sub config_diff($$$) { my $cfg1 = shift; my $cfg2 = shift; + my $new_only = shift; my %config; foreach my $config (keys %$cfg2) { if (!defined($cfg1->{$config}) or $cfg1->{$config} ne $cfg2->{$config}) { + next if $new_only and !defined($cfg1->{$config}) and $cfg2->{$config} eq '#undef'; $config{$config} = $cfg2->{$config}; } } @@ -146,7 +148,11 @@ sub parse_expr { } elsif ($arg eq '>') { my $arg1 = parse_expr($pos); my $arg2 = parse_expr($pos); - return config_diff($arg1, $arg2); + return config_diff($arg1, $arg2, 0); + } elsif ($arg eq '>+') { + my $arg1 = parse_expr($pos); + my $arg2 = parse_expr($pos); + return config_diff($arg1, $arg2, 1); } elsif ($arg eq '-') { my $arg1 = parse_expr($pos); my $arg2 = parse_expr($pos); -- 2.30.2