summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-01-13 02:02:56 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-01-13 02:02:56 +0000
commit7502d4bd61ff9a45948505ea56b4a57c7099721c (patch)
treebea62441b0a2e2456b884c6f358eaafcbbb93357
parent9b6691733e6c0f840ffaa83fe8fca5a026210e84 (diff)
downloadmtk-20170518-7502d4bd61ff9a45948505ea56b4a57c7099721c.zip
mtk-20170518-7502d4bd61ff9a45948505ea56b4a57c7099721c.tar.gz
mtk-20170518-7502d4bd61ff9a45948505ea56b4a57c7099721c.tar.bz2
add support for build-only packages which do not appear in menuconfig
SVN-Revision: 14009
-rw-r--r--include/package-defaults.mk1
-rw-r--r--include/package-dumpinfo.mk1
-rwxr-xr-xscripts/metadata.pl3
-rw-r--r--scripts/metadata.pm1
4 files changed, 6 insertions, 0 deletions
diff --git a/include/package-defaults.mk b/include/package-defaults.mk
index 99371a2..e0cb6e8 100644
--- a/include/package-defaults.mk
+++ b/include/package-defaults.mk
@@ -31,6 +31,7 @@ define Package/Default
SUBMENUDEP:=
TITLE:=
KCONFIG:=
+ BUILDONLY:=
endef
Build/Patch:=$(Build/Patch/Default)
diff --git a/include/package-dumpinfo.mk b/include/package-dumpinfo.mk
index e29e113..6f1624a 100644
--- a/include/package-dumpinfo.mk
+++ b/include/package-dumpinfo.mk
@@ -30,6 +30,7 @@ ifneq ($(DUMP),)
echo "Maintainer: $(MAINTAINER)"; \
echo "Type: $(if $(Package/$(1)/targets),$(Package/$(1)/targets),$(if $(PKG_TARGETS),$(PKG_TARGETS),ipkg))"; \
$(if $(KCONFIG),echo "Kernel-Config: $(KCONFIG)";) \
+ $(if $(BUILDONLY),echo "Build-Only: $(BUILDONLY)";) \
echo -n "Description: "; \
getvar $(call shvar,Package/$(1)/description); \
$(if $(URL),echo;echo "$(URL)";) \
diff --git a/scripts/metadata.pl b/scripts/metadata.pl
index f000e9d..da29fdd 100755
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -398,6 +398,7 @@ sub mconf_depends {
$depend = $2;
}
next if $seen->{$depend};
+ next if $package{$depend} and $package{$depend}->{buildonly};
$seen->{$depend} = 1;
if ($vdep = $package{$depend}->{vdepends}) {
$depend = join("||", map { "PACKAGE_".$_ } @$vdep);
@@ -442,6 +443,7 @@ sub print_package_config_category($) {
foreach my $spkg (sort {uc($a) cmp uc($b)} keys %spkg) {
foreach my $pkg (@{$spkg{$spkg}}) {
+ next if $pkg->{buildonly};
my $menu = $pkg->{submenu};
if ($menu) {
$menu_dep{$menu} or $menu_dep{$menu} = $pkg->{submenudep};
@@ -543,6 +545,7 @@ sub gen_package_mk() {
$config = "\$(CONFIG_PACKAGE_$name)"
}
if ($config) {
+ $pkg->{buildonly} and $config = "";
print "package-$config += $pkg->{subdir}$pkg->{src}\n";
$pkg->{prereq} and print "prereq-$config += $pkg->{subdir}$pkg->{src}\n";
}
diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index a527d68..9486c66 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -88,6 +88,7 @@ sub parse_package_metadata($) {
}
};
/^Depends: \s*(.+)\s*$/ and $pkg->{depends} = [ split /\s+/, $1 ];
+ /^Build-Only: \s*(.+)\s*$/ and $pkg->{buildonly} = 1;
/^Build-Depends: \s*(.+)\s*$/ and $pkg->{builddepends} = [ split /\s+/, $1 ];
/^Category: \s*(.+)\s*$/ and do {
$pkg->{category} = $1;