diff options
author | John Crispin <blogic@openwrt.org> | 2011-07-04 11:21:37 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2011-07-04 11:21:37 +0000 |
commit | 076d58c2cb6c9d0bb7c4e2fc6eb5f98286ab9b47 (patch) | |
tree | 85f25df0a728c4cfebaee3420c8ec98d693a2019 /scripts | |
parent | 51d389209766e1e9b0dde7ec70c90dbacb820553 (diff) | |
download | master-187ad058-076d58c2cb6c9d0bb7c4e2fc6eb5f98286ab9b47.tar.gz master-187ad058-076d58c2cb6c9d0bb7c4e2fc6eb5f98286ab9b47.tar.bz2 master-187ad058-076d58c2cb6c9d0bb7c4e2fc6eb5f98286ab9b47.zip |
allow targets to define a default subtarget when using automatic subtarget detection from r27407
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27444 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/metadata.pl | 9 |
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) { |