aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuka Perkov <luka@openwrt.org>2016-05-10 22:36:13 +0000
committerLuka Perkov <luka@openwrt.org>2016-06-19 19:27:02 +0200
commit7036eb32e7af931127e7565941d49e1ad405afe6 (patch)
treee315a4b3ed2b7de9321ac5effc622a223224db27
parent7553c7eec0d1d8eeb61e1b01732ad3ecfbcb97d3 (diff)
downloadmaster-187ad058-7036eb32e7af931127e7565941d49e1ad405afe6.tar.gz
master-187ad058-7036eb32e7af931127e7565941d49e1ad405afe6.tar.bz2
master-187ad058-7036eb32e7af931127e7565941d49e1ad405afe6.zip
scripts: metadata: add CONFIG_TARGET_SUBTARGET symbol
Add a new string symbol "CONFIG_TARGET_SUBTARGET" which contains the name of the chosen subtarget or "generic" if there are no subtargets available. Signed-off-by: Jo-Philipp Wich <jo@mein.io> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49323 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-xscripts/metadata.pl12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/metadata.pl b/scripts/metadata.pl
index 99fdba1c81..6ad3c39f00 100755
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -321,6 +321,18 @@ EOF
$target->{subtarget} or print "\t\tdefault \"".$target->{board}."\" if TARGET_".$target->{conf}."\n";
}
print <<EOF;
+config TARGET_SUBTARGET
+ string
+ default "generic" if !HAS_SUBTARGETS
+
+EOF
+
+ foreach my $target (@target) {
+ foreach my $subtarget (@{$target->{subtargets}}) {
+ print "\t\tdefault \"$subtarget\" if TARGET_".$target->{conf}."_$subtarget\n";
+ }
+ }
+ print <<EOF;
config TARGET_ARCH_PACKAGES
string