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 41f4690f2d990dc79e056dbbd5385b78ca71d6fc..f26d8fa5e5db6cfb104f5f2ac29150d9b050bd4d 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 5efef46924f66b3042531fa55eafc6669a69d4f3..6f86e67eaf250aafb89d0d1b0935918af25790a1 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} = [];