1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-04 23:08:26 +02:00

add support for build-only packages which do not appear in menuconfig

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14009 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2009-01-13 02:02:56 +00:00
parent e5f989a56a
commit d1a6e09c1b
4 changed files with 6 additions and 0 deletions

View File

@ -31,6 +31,7 @@ define Package/Default
SUBMENUDEP:=
TITLE:=
KCONFIG:=
BUILDONLY:=
endef
Build/Patch:=$(Build/Patch/Default)

View File

@ -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)";) \

View File

@ -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";
}

View File

@ -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;