global: introduce ALL_NONSHARED symbol
authorJo-Philipp Wich <jo@mein.io>
Wed, 13 Apr 2016 15:24:12 +0000 (17:24 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 13 Apr 2016 15:24:12 +0000 (17:24 +0200)
Introduce a new symbol ALL_NONSHARED which selects all non-sharable packages
by default. This option is mainly intented for buildbot setups to build the
target dependant software subset only.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
config/Config-build.in
scripts/diffconfig.sh
scripts/metadata.pl

index 5ad940ba6c235cc222557003640c8a4136b8f2dd..23cf83bc4045f9163bda12210e65c72fe50e764e 100644 (file)
@@ -1,4 +1,5 @@
 # Copyright (C) 2006-2013 OpenWrt.org
+# Copyright (C) 2016 LEDE Project
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -6,6 +7,10 @@
 
 menu "Global build settings"
 
+       config ALL_NONSHARED
+               bool "Select all target specific packages by default"
+               default ALL
+
        config ALL_KMODS
                bool "Select all kernel module packages by default"
                default ALL
index f195d1849bdc75561b56303554bc993e5bc87d33..9972a39132f53405938822b46a2bb7f1e32a4e96 100755 (executable)
@@ -2,6 +2,7 @@
 grep \^CONFIG_TARGET_ .config | head -n3 > tmp/.diffconfig.head
 grep '^CONFIG_ALL=y' .config >> tmp/.diffconfig.head
 grep '^CONFIG_ALL_KMODS=y' .config >> tmp/.diffconfig.head
+grep '^CONFIG_ALL_NONSHARED=y' .config >> tmp/.diffconfig.head
 grep '^CONFIG_DEVEL=y' .config >> tmp/.diffconfig.head
 grep '^CONFIG_TOOLCHAINOPTS=y' .config >> tmp/.diffconfig.head
 grep '^CONFIG_BUSYBOX_CUSTOM=y' .config >> tmp/.diffconfig.head
index a55b7990f71d8bdd9d1a4859f0bf90bd5619ef91..5695bda4a45bb31ed2cea3bd8d96152db473ea21 100755 (executable)
@@ -558,11 +558,14 @@ sub print_package_config_category($) {
                        print "\t\t".($pkg->{tristate} ? 'tristate' : 'bool')." $title\n";
                        print "\t\tdefault y if DEFAULT_".$pkg->{name}."\n";
                        unless ($pkg->{hidden}) {
+                               my @def = ("ALL");
+                               if (!exists($pkg->{repository})) {
+                                       push @def, "ALL_NONSHARED";
+                               }
                                if ($pkg->{name} =~ /^kmod-/) {
-                                       $pkg->{default} ||= "m if ALL_KMODS";
-                               } else {
-                                       $pkg->{default} ||= "m if ALL";
+                                       push @def, "ALL_KMODS";
                                }
+                               $pkg->{default} ||= "m if " . join("||", @def);
                        }
                        if ($pkg->{default}) {
                                foreach my $default (split /\s*,\s*/, $pkg->{default}) {