Skip to content

Commit

Permalink
Provide defines for canonical parts _cpu, _vendor, and _os
Browse files Browse the repository at this point in the history
  • Loading branch information
gahr authored and msteveb committed Aug 23, 2017
1 parent ec5c4b4 commit e43f9b6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/system.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,17 @@ if {$host eq ""} {
}
define cross [get-env CROSS $cross]

# build/host _cpu, _vendor and _os
foreach type {build host} {
set v [get-define $type]
if {![regexp {^([^-]+)-([^-]+)-(.*)$} $v -> cpu vendor os]} {
user-error "Invalid canonical $type: $v"
}
define ${type}_cpu $cpu
define ${type}_vendor $vendor
define ${type}_os $os
}

set prefix [lindex [opt-val prefix $defaultprefix] end]

# These are for compatibility with autoconf
Expand Down

0 comments on commit e43f9b6

Please sign in to comment.