Merge git://spitspat.com/git/factor

db4
Doug Coleman 2007-12-18 22:12:22 -06:00
commit 109e3d77d4
2 changed files with 23 additions and 5 deletions

View File

@ -67,10 +67,12 @@ IN: bootstrap.stage2
[ [
boot boot
do-init-hooks do-init-hooks
[ parse-command-line ] try [
[ run-user-init ] try parse-command-line
[ "run" get run ] try run-user-init
stdio get [ stream-flush ] when* "run" get run
stdio get [ stream-flush ] when*
] [ print-error 1 exit ] recover
] set-boot-quot ] set-boot-quot
: count-words all-words swap subset length pprint ; : count-words all-words swap subset length pprint ;

View File

@ -152,6 +152,7 @@ echo_build_info() {
echo FACTOR_BINARY=$FACTOR_BINARY echo FACTOR_BINARY=$FACTOR_BINARY
echo MAKE_TARGET=$MAKE_TARGET echo MAKE_TARGET=$MAKE_TARGET
echo BOOT_IMAGE=$BOOT_IMAGE echo BOOT_IMAGE=$BOOT_IMAGE
echo MAKE_IMAGE_TARGET=$MAKE_IMAGE_TARGET
} }
set_build_info() { set_build_info() {
@ -164,11 +165,18 @@ set_build_info() {
fi fi
MAKE_TARGET=$OS-$ARCH-$WORD MAKE_TARGET=$OS-$ARCH-$WORD
MAKE_IMAGE_TARGET=$ARCH.$WORD
BOOT_IMAGE=boot.$ARCH.$WORD.image BOOT_IMAGE=boot.$ARCH.$WORD.image
if [[ $OS == macosx && $ARCH == ppc ]] ; then if [[ $OS == macosx && $ARCH == ppc ]] ; then
MAKE_IMAGE_TARGET=$OS-$ARCH
MAKE_TARGET=$OS-$ARCH MAKE_TARGET=$OS-$ARCH
BOOT_IMAGE=boot.macosx-ppc.image BOOT_IMAGE=boot.macosx-ppc.image
fi fi
if [[ $OS == linux && $ARCH == ppc ]] ; then
MAKE_IMAGE_TARGET=$OS-$ARCH
MAKE_TARGET=$OS-$ARCH
BOOT_IMAGE=boot.linux-ppc.image
fi
} }
find_build_info() { find_build_info() {
@ -266,7 +274,14 @@ update_bootstrap() {
} }
refresh_image() { refresh_image() {
./$FACTOR_BINARY -e="refresh-all save 0 USE: system exit" ./$FACTOR_BINARY -script -e="refresh-all save 0 USE: system exit"
check_ret factor
}
make_boot_image() {
./$FACTOR_BINARY -script -e="\"$MAKE_IMAGE_TARGET\" USE: bootstrap.image make-image save 0 USE: system exit"
check_ret factor
} }
install_libraries() { install_libraries() {
@ -276,6 +291,7 @@ install_libraries() {
case "$1" in case "$1" in
install) install ;; install) install ;;
install-x11) install_libraries; install ;; install-x11) install_libraries; install ;;
self-update) update; make_boot_image; bootstrap;;
quick-update) update; refresh_image ;; quick-update) update; refresh_image ;;
update) update; update_bootstrap ;; update) update; update_bootstrap ;;
*) usage ;; *) usage ;;