Ignore:
Timestamp:
Feb 23, 2004, 10:11:06 AM (15 years ago)
Author:
jkh
Message:

Make the arch portion of a platforms call actually work.
Bug: 1393
Submitted by: Paul Guyot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portutil.tcl

    r5309 r5555  
    386386   
    387387    # Set the variant if this platform matches the platform we're on
     388    set matches 1
    388389    if {[info exists os.platform] && ${os.platform} == $os} {
    389390        set sel_platform $os
     
    391392            regexp {([0-9]*)[0-9\.]?} ${os.version} match major
    392393            if {$major == $release } {
    393                 set sel_platform ${sel_platform}_${release}
    394             }
    395         }
    396         if {[info exists os.arch] && [info exists arch] && ${os.arch} == $arch} {
    397             set sel_platform $arch
    398         }
    399         variant_set $sel_platform
    400     }
    401    
     394                set sel_platform ${sel_platform}_${release}
     395            } else {
     396                    set matches 0
     397            }
     398        }
     399        if {$matches == 1 && [info exists arch] && [info exists os.arch]} {
     400                if {${os.arch} == $arch} {
     401                        set sel_platform ${sel_platform}_${arch}
     402                } else {
     403                        set matches 0
     404                }
     405    }
     406    if {$matches == 1} {
     407        variant_set $sel_platform
     408    }
     409    }
    402410}
    403411
Note: See TracChangeset for help on using the changeset viewer.