aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/package.mk3
-rw-r--r--include/prereq.mk1
-rw-r--r--package/Makefile2
-rwxr-xr-xscripts/gen_deps.pl8
4 files changed, 11 insertions, 3 deletions
diff --git a/include/package.mk b/include/package.mk
index 709bb44155..3f2f7d41be 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -163,13 +163,14 @@ define BuildPackage
endif
DUMPINFO += \
+ if [ "$$$$PREREQ_CHECK" = 1 ]; then echo "Prereq-Check: 1"; fi; \
echo "Version: $(VERSION)"; \
echo "Depends: $$(IDEPEND_$(1))"; \
echo "Build-Depends: $(PKG_BUILDDEP)"; \
echo "Category: $(CATEGORY)"; \
echo "Title: $(TITLE)"; \
echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g';
-
+
ifneq ($(URL),)
DUMPINFO += \
echo; \
diff --git a/include/prereq.mk b/include/prereq.mk
index c9b82d2947..eda7ca35a6 100644
--- a/include/prereq.mk
+++ b/include/prereq.mk
@@ -22,6 +22,7 @@ prereq:
.SILENT: $(TMP_DIR) prereq
define Require
+ export PREREQ_CHECK=1
ifeq ($$(CHECK_$(1)),)
prereq: prereq-$(1)
diff --git a/package/Makefile b/package/Makefile
index b9392c0490..b6165b8567 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
include $(TOPDIR)/.config
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))
COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y))
diff --git a/scripts/gen_deps.pl b/scripts/gen_deps.pl
index 70c07b70a8..e7daf18866 100755
--- a/scripts/gen_deps.pl
+++ b/scripts/gen_deps.pl
@@ -13,6 +13,8 @@ my $src;
my $makefile;
my %conf;
my %pkg;
+my %prereq;
+my $prereq;
my %dep;
my %options;
my $opt;
@@ -33,6 +35,10 @@ while ($line = <>) {
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) {
@@ -75,5 +81,5 @@ foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) {
}
if ($line ne "") {
- print "\n$line";
+ print "\n$line\n$prereq";
}