projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hide .host.mk commands
[openwrt.git]
/
scripts
/
gen_deps.pl
diff --git
a/scripts/gen_deps.pl
b/scripts/gen_deps.pl
index
32bf1f5
..
e7daf18
100755
(executable)
--- a/
scripts/gen_deps.pl
+++ b/
scripts/gen_deps.pl
@@
-1,4
+1,11
@@
#!/usr/bin/perl
#!/usr/bin/perl
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
use strict;
my $name;
use strict;
my $name;
@@
-6,6
+13,8
@@
my $src;
my $makefile;
my %conf;
my %pkg;
my $makefile;
my %conf;
my %pkg;
+my %prereq;
+my $prereq;
my %dep;
my %options;
my $opt;
my %dep;
my %options;
my $opt;
@@
-26,6
+35,10
@@
while ($line = <>) {
defined $pkg{$name} or $pkg{$name} = {};
$pkg{$name}->{src} = $src;
};
defined $pkg{$name} or $pkg{$name} = {};
$pkg{$name}->{src} = $src;
};
+ $line =~ /^Prereq-Check:/ and !defined $prereq{$src} and do {
+ $prereq{$src} = 1;
+ $prereq .= "package-prereq += $src\n";
+ };
$line =~ /^(Build-)?Depends: \s*(.+)\s*$/ and do {
$pkg{$name}->{depends} ||= [];
foreach my $v (split /\s+/, $2) {
$line =~ /^(Build-)?Depends: \s*(.+)\s*$/ and do {
$pkg{$name}->{depends} ||= [];
foreach my $v (split /\s+/, $2) {
@@
-52,9
+65,10
@@
foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) {
my $idx;
if (defined $pkg{$dep}->{src}) {
($pkg{$name}->{src} ne $pkg{$dep}->{src}) and $idx = $pkg{$dep}->{src};
my $idx;
if (defined $pkg{$dep}->{src}) {
($pkg{$name}->{src} ne $pkg{$dep}->{src}) and $idx = $pkg{$dep}->{src};
- } elsif (defined
$pkg{$dep
}) {
+ } elsif (defined
($pkg{$dep}) && !$options{SDK
}) {
$idx = $dep;
}
$idx = $dep;
}
+ undef $idx if $idx =~ /^(kernel)|(base-files)$/;
if ($idx) {
next if $dep{$pkg{$name}->{src}."->".$idx};
$depline .= " $idx\-compile";
if ($idx) {
next if $dep{$pkg{$name}->{src}."->".$idx};
$depline .= " $idx\-compile";
@@
-67,5
+81,5
@@
foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) {
}
if ($line ne "") {
}
if ($line ne "") {
- print "\n$line";
+ print "\n$line
\n$prereq
";
}
}
This page took
0.023386 seconds
and
4
git commands to generate.