aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/metadata.pl
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2011-07-04 11:21:37 +0000
committerJohn Crispin <john@openwrt.org>2011-07-04 11:21:37 +0000
commitad250089aa5d3152774f87941606837c3534f6bd (patch)
tree13fd06291a8501af5a7a3ef97a429a2a620f850e /scripts/metadata.pl
parent04fefa4a2860d33c16434859a7a2b182eb8406e5 (diff)
downloadupstream-ad250089aa5d3152774f87941606837c3534f6bd.tar.gz
upstream-ad250089aa5d3152774f87941606837c3534f6bd.tar.bz2
upstream-ad250089aa5d3152774f87941606837c3534f6bd.zip
allow targets to define a default subtarget when using automatic subtarget detection from r27407
SVN-Revision: 27444
Diffstat (limited to 'scripts/metadata.pl')
-rwxr-xr-xscripts/metadata.pl9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/metadata.pl b/scripts/metadata.pl
index 3acdb16a82..0f4ae9fe0a 100755
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -56,6 +56,7 @@ sub parse_target_metadata() {
/^Linux-Version:\s*(.+)\s*$/ and $target->{version} = $1;
/^Linux-Release:\s*(.+)\s*$/ and $target->{release} = $1;
/^Linux-Kernel-Arch:\s*(.+)\s*$/ and $target->{karch} = $1;
+ /^Default-Subtarget:\s*(.+)\s*$/ and $target->{def_subtarget} = $1;
/^Default-Packages:\s*(.+)\s*$/ and $target->{packages} = [ split(/\s+/, $1) ];
/^Target-Profile:\s*(.+)\s*$/ and do {
$profile = {
@@ -282,6 +283,14 @@ endchoice
choice
prompt "Subtarget" if HAS_SUBTARGETS
+EOF
+ foreach my $target (@target) {
+ next unless $target->{def_subtarget};
+ print <<EOF;
+ default TARGET_$target->{conf}_$target->{def_subtarget} if TARGET_$target->{conf}
+EOF
+ }
+ print <<EOF;
EOF
foreach my $target (@target) {