Changeset 27444


Ignore:
Timestamp:
2011-07-04T13:21:37+02:00 (7 years ago)
Author:
blogic
Message:

allow targets to define a default subtarget when using automatic subtarget detection from r27407

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/target.mk

    r27407 r27444  
    216216         echo 'Linux-Release: $(LINUX_RELEASE)'; \ 
    217217         echo 'Linux-Kernel-Arch: $(LINUX_KARCH)'; \ 
     218        $(if $(SUBTARGET),,$(if $(DEFAULT_SUBTARGET), echo 'Default-Subtarget: $(DEFAULT_SUBTARGET)'; )) 
    218219         echo 'Target-Description:'; \ 
    219220         $(SH_FUNC) getvar $(call shvar,Target/Description); \ 
  • trunk/scripts/metadata.pl

    r27344 r27444  
    5757                /^Linux-Release:\s*(.+)\s*$/ and $target->{release} = $1; 
    5858                /^Linux-Kernel-Arch:\s*(.+)\s*$/ and $target->{karch} = $1; 
     59                /^Default-Subtarget:\s*(.+)\s*$/ and $target->{def_subtarget} = $1; 
    5960                /^Default-Packages:\s*(.+)\s*$/ and $target->{packages} = [ split(/\s+/, $1) ]; 
    6061                /^Target-Profile:\s*(.+)\s*$/ and do { 
     
    283284choice 
    284285        prompt "Subtarget" if HAS_SUBTARGETS 
     286EOF 
     287        foreach my $target (@target) { 
     288                next unless $target->{def_subtarget}; 
     289                print <<EOF; 
     290        default TARGET_$target->{conf}_$target->{def_subtarget} if TARGET_$target->{conf} 
     291EOF 
     292        } 
     293        print <<EOF; 
    285294 
    286295EOF 
Note: See TracChangeset for help on using the changeset viewer.