Fix the annoying base-files autorebuild bug.
[openwrt-10.03/.git] / scripts / gen_package_config.pl
index 9c705af563b3113cf5692f46fc9b0efacb337d52..51031a898a80d71c7c19b6438ab4d7723bc602c5 100755 (executable)
@@ -66,6 +66,8 @@ sub print_category($) {
                        }
                        $menus{$menu} or $menus{$menu} = [];
                        push @{$menus{$menu}}, $pkg;
+                       print "\tconfig DEFAULT_".$pkg->{name}."\n";
+                       print "\t\tbool\n\n";
                }
        }
        my @menus = sort {
@@ -93,6 +95,7 @@ sub print_category($) {
                        $pkg->{menu} and print "menu";
                        print "config PACKAGE_".$pkg->{name}."\n";
                        print "\t\ttristate \"$title\"\n";
+                       print "\t\tdefault y if DEFAULT_".$pkg->{name}."\n";
                        foreach my $default (split /\s*,\s*/, $pkg->{default}) {
                                print "\t\tdefault $default\n";
                        }