factor/extra/mason/platform/platform.factor

22 lines
641 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.
USING: kernel system accessors namespaces splitting sequences
mason.config bootstrap.image assocs ;
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
: boot-image-arch ( -- string )
2008-11-07 22:09:42 -05:00
target-os get target-cpu get arch ;
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 ;