2011-09-09 22:13:06 -04:00
|
|
|
! Copyright (C) 2008, 2011 Eduardo Cavazos, Slava Pestov.
|
2008-09-16 00:20:33 -04:00
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2008-11-05 06:14:35 -05:00
|
|
|
USING: kernel system accessors namespaces splitting sequences
|
2009-05-13 20:47:00 -04:00
|
|
|
mason.config bootstrap.image assocs ;
|
2008-09-16 00:20:33 -04:00
|
|
|
IN: mason.platform
|
|
|
|
|
2009-05-13 20:47:00 -04:00
|
|
|
: (platform) ( os cpu -- string )
|
2012-07-13 22:06:38 -04:00
|
|
|
H{ { CHAR: . CHAR: - } } substitute "-" glue ;
|
2009-05-13 20:47:00 -04:00
|
|
|
|
2008-09-16 00:20:33 -04:00
|
|
|
: platform ( -- string )
|
2011-09-09 22:13:06 -04:00
|
|
|
target-os get name>> target-cpu get name>> (platform)
|
|
|
|
target-variant get [ "-" glue ] when* ;
|
2008-09-16 00:20:33 -04:00
|
|
|
|
|
|
|
: gnu-make ( -- string )
|
2011-11-02 20:13:31 -04:00
|
|
|
"make" ;
|
2008-09-16 00:20:33 -04:00
|
|
|
|
2008-11-05 06:14:35 -05:00
|
|
|
: boot-image-arch ( -- string )
|
2008-11-07 22:09:42 -05:00
|
|
|
target-os get target-cpu get arch ;
|
2008-11-05 06:14:35 -05:00
|
|
|
|
2008-09-16 00:20:33 -04:00
|
|
|
: boot-image-name ( -- string )
|
2009-11-12 04:01:09 -05:00
|
|
|
boot-image-arch "boot." ".image" surround ;
|