1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-19 06:25:55 +02:00

speed up package prereq check (only run make on those directories that actually contain prereq checks)

git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4927 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2006-10-05 12:39:52 +00:00
parent 2347229ddd
commit cf807efd13
4 changed files with 11 additions and 3 deletions

View File

@ -163,6 +163,7 @@ define BuildPackage
endif endif
DUMPINFO += \ DUMPINFO += \
if [ "$$$$PREREQ_CHECK" = 1 ]; then echo "Prereq-Check: 1"; fi; \
echo "Version: $(VERSION)"; \ echo "Version: $(VERSION)"; \
echo "Depends: $$(IDEPEND_$(1))"; \ echo "Depends: $$(IDEPEND_$(1))"; \
echo "Build-Depends: $(PKG_BUILDDEP)"; \ echo "Build-Depends: $(PKG_BUILDDEP)"; \

View File

@ -22,6 +22,7 @@ prereq:
.SILENT: $(TMP_DIR) prereq .SILENT: $(TMP_DIR) prereq
define Require define Require
export PREREQ_CHECK=1
ifeq ($$(CHECK_$(1)),) ifeq ($$(CHECK_$(1)),)
prereq: prereq-$(1) prereq: prereq-$(1)

View File

@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
include $(TOPDIR)/.config include $(TOPDIR)/.config
include $(TOPDIR)/.pkgdeps include $(TOPDIR)/.pkgdeps
PREREQ_PACKAGES:=$(patsubst %,%-prereq,$(package-y) $(package-m)) PREREQ_PACKAGES:=$(patsubst %,%-prereq,$(package-prereq))
DOWNLOAD_PACKAGES:=$(patsubst %,%-download,$(package-y) $(package-m)) DOWNLOAD_PACKAGES:=$(patsubst %,%-download,$(package-y) $(package-m))
COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m)) COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y)) INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y))

View File

@ -13,6 +13,8 @@ my $src;
my $makefile; my $makefile;
my %conf; my %conf;
my %pkg; my %pkg;
my %prereq;
my $prereq;
my %dep; my %dep;
my %options; my %options;
my $opt; my $opt;
@ -33,6 +35,10 @@ while ($line = <>) {
defined $pkg{$name} or $pkg{$name} = {}; defined $pkg{$name} or $pkg{$name} = {};
$pkg{$name}->{src} = $src; $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 { $line =~ /^(Build-)?Depends: \s*(.+)\s*$/ and do {
$pkg{$name}->{depends} ||= []; $pkg{$name}->{depends} ||= [];
foreach my $v (split /\s+/, $2) { foreach my $v (split /\s+/, $2) {
@ -75,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";
} }