From 1b744ab14b54f7be631e11b1daff300bb103d589 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Fri, 7 Nov 2008 21:09:42 -0600 Subject: [PATCH] Updating code for boot image renaming --- basis/bootstrap/image/image.factor | 10 ++++++++-- build-support/factor.sh | 20 ++++++++++---------- extra/mason/platform/platform.factor | 4 ++-- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/basis/bootstrap/image/image.factor b/basis/bootstrap/image/image.factor index 3816b930e0..c556ee660f 100644 --- a/basis/bootstrap/image/image.factor +++ b/basis/bootstrap/image/image.factor @@ -12,9 +12,15 @@ io.encodings.binary math.order math.private accessors slots.private compiler.units ; IN: bootstrap.image +: arch ( os cpu -- arch ) + { + { "ppc" [ name>> "-ppc" append ] } + { "x86.64" [ name>> "winnt" = "winnt" "unix" ? "-x86.64" append ] } + [ nip ] + } case ; + : my-arch ( -- arch ) - cpu name>> - dup "ppc" = [ >r os name>> "-" r> 3append ] when ; + os name>> cpu name>> arch ; : boot-image-name ( arch -- string ) "boot." swap ".image" 3append ; diff --git a/build-support/factor.sh b/build-support/factor.sh index 5cbc1e96e3..07d05e29b5 100755 --- a/build-support/factor.sh +++ b/build-support/factor.sh @@ -271,18 +271,18 @@ check_os_arch_word() { set_build_info() { check_os_arch_word MAKE_TARGET=$OS-$ARCH-$WORD - MAKE_IMAGE_TARGET=$ARCH.$WORD - BOOT_IMAGE=boot.$ARCH.$WORD.image if [[ $OS == macosx && $ARCH == ppc ]] ; then - MAKE_IMAGE_TARGET=$OS-$ARCH - MAKE_TARGET=$OS-$ARCH - BOOT_IMAGE=boot.macosx-ppc.image - fi - if [[ $OS == linux && $ARCH == ppc ]] ; then - MAKE_IMAGE_TARGET=$OS-$ARCH - MAKE_TARGET=$OS-$ARCH - BOOT_IMAGE=boot.linux-ppc.image + MAKE_IMAGE_TARGET=macosx-ppc + elif [[ $OS == linux && $ARCH == ppc ]] ; then + MAKE_IMAGE_TARGET=linux-ppc + elif [[ $OS == winnt && $ARCH == x86 && $WORD == 64 ]] ; then + MAKE_IMAGE_TARGET=winnt-x86.64 + elif [[ $ARCH == x86 && $WORD == 64 ]] ; then + MAKE_IMAGE_TARGET=unix-x86.64 + else + MAKE_IMAGE_TARGET=$ARCH.$WORD fi + BOOT_IMAGE_NAME=boot.$MAKE_IMAGE_TARGET.image } parse_build_info() { diff --git a/extra/mason/platform/platform.factor b/extra/mason/platform/platform.factor index cd7d3f3836..59c525f5ea 100644 --- a/extra/mason/platform/platform.factor +++ b/extra/mason/platform/platform.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: kernel system accessors namespaces splitting sequences -mason.config ; +mason.config bootstrap.image ; IN: mason.platform : platform ( -- string ) @@ -11,7 +11,7 @@ IN: mason.platform target-os get { "freebsd" "openbsd" "netbsd" } member? "gmake" "make" ? ; : boot-image-arch ( -- string ) - target-cpu get dup "ppc" = [ target-os get "-" append prepend ] when ; + target-os get target-cpu get arch ; : boot-image-name ( -- string ) "boot." boot-image-arch ".image" 3append ;