cosmetic change to standardize layout.
[openwrt.git] / scripts / gen_menuconfig.pl
index 3f4476a..e304f18 100755 (executable)
@@ -28,9 +28,14 @@ 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"
+                       print "\n";
+
+                       $pkg->{config} and print $pkg->{config}."\n";
                }
        }
        print "endmenu\n\n";
@@ -61,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} = {};
@@ -75,6 +84,15 @@ while ($line = <>) {
                        $desc .= "\t\t$line";
                }
                $pkg->{description} = $desc;
+       };
+       $line =~ /^Config: \s*(.*)\s*$/ and do {
+               my $conf = "$1\n";
+               my $line;
+               while ($line = <>) {
+                       last if $line =~ /^@@/;
+                       $conf .= "$line";
+               }
+               $pkg->{config} = $conf;
        }
 }
 
This page took 0.027383 seconds and 4 git commands to generate.