build: suppress conditional dependencies if there are unconditional dependencies...
[15.05/openwrt.git] / scripts / metadata.pl
index f26d8fa..28ddefc 100755 (executable)
@@ -177,6 +177,7 @@ sub target_config_features(@) {
                /powerpc64/ and $ret .= "\tselect powerpc64\n";
                /nommu/ and $ret .= "\tselect NOMMU\n";
                /mips16/ and $ret .= "\tselect HAS_MIPS16\n";
+               /rfkill/ and $ret .= "\tselect RFKILL_SUPPORT\n";
        }
        return $ret;
 }
@@ -453,6 +454,7 @@ sub mconf_depends {
 
                next if $condition eq $depend;
                next if $seen->{"$parent_condition:$depend"};
+               next if $seen->{":$depend"};
                $seen->{"$parent_condition:$depend"} = 1;
                if ($depend =~ /^(.+):(.+)$/) {
                        if ($1 ne "PACKAGE_$pkgname") {
@@ -762,7 +764,7 @@ sub gen_package_mk() {
                                        $idx = $subdir{$dep}.$dep;
                                }
                                $idx .= $suffix;
-                               undef $idx if $idx =~ /^(kernel\/linux)|(base-files)$/;
+                               undef $idx if $idx eq 'base-files';
                                if ($idx) {
                                        my $depline;
                                        next if $pkg->{src} eq $pkg_dep->{src}.$suffix;