add Build/InstallDev template to install dev files in STAGING_DIR, introduce a NEEDS...
[openwrt/staging/mkresin.git] / openwrt / scripts / gen_menuconfig.pl
index e282ee3ed2d95a8b96f210af5af392eade2af32d..e304f188139fae83e495f441042d7a7f60a2b78f 100755 (executable)
@@ -28,6 +28,9 @@ sub print_category($) {
                        foreach my $depend (@{$pkg->{depends}}) {
                                print "\t\tdepends PACKAGE_$depend\n";
                        }
+                       foreach my $need (@{$pkg->{needs}}) {
+                               print "\t\tselect PACKAGE_$need\n";
+                       }
                        print "\t\thelp\n";
                        print $pkg->{description};
                        print "\n";
@@ -63,6 +66,10 @@ while ($line = <>) {
                my @dep = split /,\s*/, $1;
                $pkg->{depends} = \@dep;
        };
+       $line =~ /^Needs: \s*(.+)\s*$/ and do {
+               my @need = split /,\s*/, $1;
+               $pkg->{needs} = \@need;
+       };
        $line =~ /^Category: \s*(.+)\s*$/ and do {
                $pkg->{category} = $1;
                defined $category{$1} or $category{$1} = {};