add support for build-only packages which do not appear in menuconfig
authorFelix Fietkau <nbd@openwrt.org>
Tue, 13 Jan 2009 02:02:56 +0000 (02:02 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 13 Jan 2009 02:02:56 +0000 (02:02 +0000)
SVN-Revision: 14009

include/package-defaults.mk
include/package-dumpinfo.mk
scripts/metadata.pl
scripts/metadata.pm

index 99371a2241411e2bb2607cfbc3090341bf0da542..e0cb6e89959700f33f05db08b9ac1d405b387244 100644 (file)
@@ -31,6 +31,7 @@ define Package/Default
   SUBMENUDEP:=
   TITLE:=
   KCONFIG:=
+  BUILDONLY:=
 endef
 
 Build/Patch:=$(Build/Patch/Default)
index e29e113241890655e0923fa0abe0639dac6e7129..6f1624aeb133837d83fb74e8d736fd01da4a9264 100644 (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)";) \
index f000e9db9a5877cb04069998698a1d6544cb788a..da29fdd895c26d86cac0f2e4b608886428d46bdc 100755 (executable)
@@ -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";
                }
index a527d68f8f4254044f01c3911c2be605211ccafc..9486c66cb315960ccaa9f46f6910ba4930106b64 100644 (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;