Ignore:
Timestamp:
Jan 23, 2014, 8:09:01 PM (5 years ago)
Author:
sean@…
Message:

compilers-1.0: add compilers.enforce_c proc

File:
1 edited

Legend:

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

    r116305 r116306  
    424424}
    425425
     426# for the c compiler
     427proc compilers.enforce_c {args} {
     428    foreach portname $args {
     429        if {![catch {set result [active_variants $portname "" ""]}]} {
     430            set otcomp  [c_active_variant_name $portname]
     431            set mycomp  [c_variant_name]
     432
     433            if {$otcomp ne "" && $mycomp eq ""} {
     434                default_variants +$otcomp
     435            } elseif {$otcomp ne $mycomp} {
     436                ui_error "Install $portname +$mycomp"
     437                return -code error "$portname +$mycomp not installed"
     438            }
     439        }
     440    }
     441}
     442
    426443proc compilers.setup {args} {
    427444    global cdb compilers.variants compilers.clang_variants compilers.gcc_variants
Note: See TracChangeset for help on using the changeset viewer.