scripts: change metadata.pm and metadata.pl to not emit "default m if ALL" Kconfig...
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 18 Jul 2013 13:11:46 +0000 (13:11 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 18 Jul 2013 13:11:46 +0000 (13:11 +0000)
SVN-Revision: 37397

scripts/metadata.pl
scripts/metadata.pm

index 41f4690..f26d8fa 100755 (executable)
@@ -548,8 +548,13 @@ sub print_package_config_category($) {
                        $pkg->{hidden} and $title = "";
                        print "\t\t".($pkg->{tristate} ? 'tristate' : 'bool')." $title\n";
                        print "\t\tdefault y if DEFAULT_".$pkg->{name}."\n";
-                       foreach my $default (split /\s*,\s*/, $pkg->{default}) {
-                               print "\t\tdefault $default\n";
+                       unless ($pkg->{hidden}) {
+                               $pkg->{default} ||= "m if ALL";
+                       }
+                       if ($pkg->{default}) {
+                               foreach my $default (split /\s*,\s*/, $pkg->{default}) {
+                                       print "\t\tdefault $default\n";
+                               }
                        }
                        print mconf_depends($pkg->{name}, $pkg->{depends}, 0);
                        print mconf_depends($pkg->{name}, $pkg->{mdepends}, 0);
index 5efef46..6f86e67 100644 (file)
@@ -64,7 +64,6 @@ sub parse_package_metadata($) {
                        $pkg->{makefile} = $makefile;
                        $pkg->{name} = $1;
                        $pkg->{title} = "";
-                       $pkg->{default} = "m if ALL";
                        $pkg->{depends} = [];
                        $pkg->{mdepends} = [];
                        $pkg->{builddepends} = [];