3 # Copyright (C) 2006 OpenWrt.org
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
21 while ($opt = shift @ARGV) {
22 $opt =~ /^-s/ and $options{SDK
} = 1;
28 $line =~ /^Source-Makefile: \s*(.+\/([^\
/]+)\/Makefile
)\s
*$/ and do {
32 $line =~ /^Package: \s*(.+)\s*$/ and do {
34 defined $pkg{$name} or $pkg{$name} = {};
35 $pkg{$name}->{src
} = $src;
37 $line =~ /^Prereq-Check:/ and !defined $prereq{$src} and do {
38 $pkg{$name}->{prereq
} = 1;
40 $line =~ /^(Build-)?Depends: \s*(.+)\s*$/ and do {
41 $pkg{$name}->{depends
} ||= [];
42 foreach my $v (split /\s+/, $2) {
43 next if $v =~ /^[\+]?@/;
45 push @
{$pkg{$name}->{depends
}}, $v;
52 foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) {
56 $conf{$pkg{$name}->{src
}} or do {
58 $conf{$pkg{$name}->{src
}} = 1;
61 $config = "\$(CONFIG_PACKAGE_$name)"
64 print "package-$config += $pkg{$name}->{src}\n";
65 $pkg{$name}->{prereq
} and print "prereq-$config += $pkg{$name}->{src}\n";
70 foreach my $dep (@
{$pkg{$name}->{depends
}}) {
72 if (defined $pkg{$dep}->{src
}) {
73 ($pkg{$name}->{src
} ne $pkg{$dep}->{src
}) and $idx = $pkg{$dep}->{src
};
74 } elsif (defined($pkg{$dep}) && !$options{SDK
}) {
77 undef $idx if $idx =~ /^(kernel)|(base-files)$/;
79 next if $dep{$pkg{$name}->{src
}."->".$idx};
80 $depline .= " $idx\-compile";
81 $dep{$pkg{$name}->{src
}."->".$idx} = 1;
85 $line .= "$pkg{$name}->{src}-compile: $depline\n";
This page took 0.057889 seconds and 5 git commands to generate.