Ignore:
Timestamp:
Apr 11, 2014, 12:12:36 AM (5 years ago)
Author:
sean@…
Message:

compilers-1.0: move enforce procs into pre-fetch to avoid parse errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/compilers-1.0.tcl

    r116311 r118763  
    4747default compilers.require_fortran 0
    4848default compilers.setup_done 0
     49default compilers.required_c {}
     50default compilers.required_f {}
    4951
    5052set compilers.list {cc cxx cpp objc fc f77 f90}
     
    455457# for the c compiler
    456458proc compilers.enforce_c {args} {
     459    global compilers.required_c
     460    set compilers.required_c $args
     461}
     462
     463proc compilers.action_enforce_c {args} {
    457464    foreach portname $args {
    458465        if {![catch {set result [active_variants $portname "" ""]}]} {
     
    471478
    472479proc compilers.enforce_fortran {args} {
     480    global compilers.required_f
     481    set compilers.required_f $args
     482}
     483
     484proc compilers.action_enforce_f {args} {
    473485    foreach portname $args {
    474486        if {![catch {set result [active_variants $portname "" ""]}]} {
     
    569581}
    570582
     583# this might also need to be in pre-archivefetch
    571584pre-fetch {
    572585    if {${compilers.require_fortran} && [fortran_variant_name] eq ""} {
    573586        return -code error "must set at least one fortran variant"
    574587    }
    575 }
     588    eval compilers.action_enforce_c ${compilers.required_c}
     589    eval compilers.action_enforce_f ${compilers.required_f}
     590}
Note: See TracChangeset for help on using the changeset viewer.