factor/extra/mason/platform/platform.factor

22 lines
616 B
Factor
Raw Normal View History

! 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.
2014-11-15 19:20:49 -05:00
USING: accessors assocs bootstrap.image kernel mason.config
namespaces sequences ;
2008-09-16 00:20:33 -04:00
IN: mason.platform
: (platform) ( os cpu -- string )
H{ { CHAR: . CHAR: - } } substitute "-" glue ;
2008-09-16 00:20:33 -04:00
: platform ( -- string )
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 )
"make" ;
2008-09-16 00:20:33 -04:00
2014-11-15 19:20:49 -05:00
: target-arch ( -- arch )
target-os get target-cpu get arch-name ;
2014-11-15 19:20:49 -05:00
: target-boot-image-name ( -- string )
target-arch boot-image-name ;