Skip to content

Commit 7322cca

Browse files
committed
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 <[email protected]>
1 parent a8d4d71 commit 7322cca

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

scripts/metadata.pl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,18 @@ ()
321321
$target->{subtarget} or print "\t\tdefault \"".$target->{board}."\" if TARGET_".$target->{conf}."\n";
322322
}
323323
print <<EOF;
324+
config TARGET_SUBTARGET
325+
string
326+
default "generic" if !HAS_SUBTARGETS
327+
328+
EOF
329+
330+
foreach my $target (@target) {
331+
foreach my $subtarget (@{$target->{subtargets}}) {
332+
print "\t\tdefault \"$subtarget\" if TARGET_".$target->{conf}."_$subtarget\n";
333+
}
334+
}
335+
print <<EOF;
324336
config TARGET_ARCH_PACKAGES
325337
string
326338

0 commit comments

Comments
 (0)