]> gitweb.factorcode.org Git - factor.git/blob - extra/mason/platform/platform.factor
4564815cc0b671467f28e89bc656c9eadb99af50
[factor.git] / extra / mason / platform / platform.factor
1 ! Copyright (C) 2008, 2011 Eduardo Cavazos, Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel system accessors namespaces splitting sequences
4 mason.config bootstrap.image assocs ;
5 IN: mason.platform
6
7 : (platform) ( os cpu -- string )
8     { { CHAR: . CHAR: - } } substitute "-" glue ;
9
10 : platform ( -- string )
11     target-os get name>> target-cpu get name>> (platform)
12     target-variant get [ "-" glue ] when* ;
13
14 : gnu-make ( -- string )
15     target-os get { freebsd openbsd netbsd } member? "gmake" "make" ? ;
16
17 : boot-image-arch ( -- string )
18     target-os get target-cpu get arch ;
19
20 : boot-image-name ( -- string )
21     boot-image-arch "boot." ".image" surround ;