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>
This commit is contained in:
Jo-Philipp Wich 2016-04-06 21:47:04 +02:00
parent a8d4d71c41
commit 7322cca9fa
1 changed files with 12 additions and 0 deletions

View File

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