summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2016-04-06 21:47:04 +0200
committerJo-Philipp Wich <jo@mein.io>2016-04-06 21:47:04 +0200
commit7322cca9fab00163778d5e44615ed05f01097851 (patch)
tree0d20fdc221a7c39539210b65bf8e1fdfdad5dd8f /scripts
parenta8d4d71c41ff0158c2026cac5981e39702167da9 (diff)
downloadmaster-31e0f0ae-7322cca9fab00163778d5e44615ed05f01097851.tar.gz
master-31e0f0ae-7322cca9fab00163778d5e44615ed05f01097851.tar.bz2
master-31e0f0ae-7322cca9fab00163778d5e44615ed05f01097851.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>
Diffstat (limited to 'scripts')
-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