mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 16:31:13 +00:00
allow targets to define a default subtarget when using automatic subtarget detection from r27407
SVN-Revision: 27444
This commit is contained in:
parent
04fefa4a28
commit
ad250089aa
@ -215,6 +215,7 @@ define BuildTargets/DumpCurrent
|
|||||||
echo 'Linux-Version: $(LINUX_VERSION)'; \
|
echo 'Linux-Version: $(LINUX_VERSION)'; \
|
||||||
echo 'Linux-Release: $(LINUX_RELEASE)'; \
|
echo 'Linux-Release: $(LINUX_RELEASE)'; \
|
||||||
echo 'Linux-Kernel-Arch: $(LINUX_KARCH)'; \
|
echo 'Linux-Kernel-Arch: $(LINUX_KARCH)'; \
|
||||||
|
$(if $(SUBTARGET),,$(if $(DEFAULT_SUBTARGET), echo 'Default-Subtarget: $(DEFAULT_SUBTARGET)'; ))
|
||||||
echo 'Target-Description:'; \
|
echo 'Target-Description:'; \
|
||||||
$(SH_FUNC) getvar $(call shvar,Target/Description); \
|
$(SH_FUNC) getvar $(call shvar,Target/Description); \
|
||||||
echo '@@'; \
|
echo '@@'; \
|
||||||
|
@ -56,6 +56,7 @@ sub parse_target_metadata() {
|
|||||||
/^Linux-Version:\s*(.+)\s*$/ and $target->{version} = $1;
|
/^Linux-Version:\s*(.+)\s*$/ and $target->{version} = $1;
|
||||||
/^Linux-Release:\s*(.+)\s*$/ and $target->{release} = $1;
|
/^Linux-Release:\s*(.+)\s*$/ and $target->{release} = $1;
|
||||||
/^Linux-Kernel-Arch:\s*(.+)\s*$/ and $target->{karch} = $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) ];
|
/^Default-Packages:\s*(.+)\s*$/ and $target->{packages} = [ split(/\s+/, $1) ];
|
||||||
/^Target-Profile:\s*(.+)\s*$/ and do {
|
/^Target-Profile:\s*(.+)\s*$/ and do {
|
||||||
$profile = {
|
$profile = {
|
||||||
@ -282,6 +283,14 @@ endchoice
|
|||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Subtarget" if HAS_SUBTARGETS
|
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
|
EOF
|
||||||
foreach my $target (@target) {
|
foreach my $target (@target) {
|
||||||
|
Loading…
Reference in New Issue
Block a user