summaryrefslogtreecommitdiff
path: root/openwrt/scripts/gen_menuconfig.pl
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-05-30 18:55:52 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-05-30 18:55:52 +0000
commit5b05f4a5ee5fa1dd3246350b6672d05a1aaa7f4d (patch)
treeb9f40012c0fbad8c3123e42d0ec5439224a0f6fd /openwrt/scripts/gen_menuconfig.pl
parent10152c5c0752e6e514999056142dacbc8de71d95 (diff)
downloadmtk-20170518-5b05f4a5ee5fa1dd3246350b6672d05a1aaa7f4d.zip
mtk-20170518-5b05f4a5ee5fa1dd3246350b6672d05a1aaa7f4d.tar.gz
mtk-20170518-5b05f4a5ee5fa1dd3246350b6672d05a1aaa7f4d.tar.bz2
improve dependency handling, fix some package makefile bugs
SVN-Revision: 3843
Diffstat (limited to 'openwrt/scripts/gen_menuconfig.pl')
-rwxr-xr-xopenwrt/scripts/gen_menuconfig.pl9
1 files changed, 7 insertions, 2 deletions
diff --git a/openwrt/scripts/gen_menuconfig.pl b/openwrt/scripts/gen_menuconfig.pl
index e282ee3..a7f939f 100755
--- a/openwrt/scripts/gen_menuconfig.pl
+++ b/openwrt/scripts/gen_menuconfig.pl
@@ -26,7 +26,12 @@ sub print_category($) {
print "\t\ttristate \"$title\"\n";
print "\t\tdefault ".$pkg->{default}."\n";
foreach my $depend (@{$pkg->{depends}}) {
- print "\t\tdepends PACKAGE_$depend\n";
+ my $m = "depends";
+ $depend =~ s/^([@\+])//;
+ my $flags = $1;
+ $flags =~ /@/ or $depend = "PACKAGE_$depend";
+ $flags =~ /\+/ and $m = "select";
+ print "\t\t$m $depend\n";
}
print "\t\thelp\n";
print $pkg->{description};
@@ -60,7 +65,7 @@ while ($line = <>) {
$line =~ /^Menu: \s*(.+)\s*$/ and $pkg->{menu} = $1;
$line =~ /^Default: \s*(.+)\s*$/ and $pkg->{default} = $1;
$line =~ /^Depends: \s*(.+)\s*$/ and do {
- my @dep = split /,\s*/, $1;
+ my @dep = split /\s+/, $1;
$pkg->{depends} = \@dep;
};
$line =~ /^Category: \s*(.+)\s*$/ and do {