#! /bin/sh # # shellscript for use with the crosscompiling parts # # Documentation is at the end of README, not here! # ulimit -c 0 set -e if ! [ -d ../lisp ] ; then echo 'Not in lisp/' 1>&2 exit 1 fi for d in fasl-cross1 fasl-cross2 ; do if ! [ -d ../../"$d" ] ; then ../../crabuild/makedir "$d" fi done ../../crabuild/rmcompiled ALL # generate env-simple.lisp ../../crabuild/buildenv > ../../crabuild/env-simple.lisp # look for the age of these sources ../../crabuild/sourcedate > version.tmp touch Depends gmake clean rm -f ../../fasl-cross?/lisp/[a-z]* # Set version number echo 'Map file for lisp version 1' > lisp.nm # Build internals.h lisp -noinit -batch -eval \ '(load "../../crabuild/env")' -eval '(load "crabuild:build-int_h")' # Compile C startup code touch Depends gmake depend gmake all cp -f lisp lisp.nm internals.h ../../fasl-cross2/lisp/. echo '==> Step 1' sh ../../crabuild/runcross cp -f ../../fasl-cross2/lisp/internals.h . rm *.o lisp lisp.nm gmake cp -f version lisp lisp.nm internals.h ../../fasl-cross2/lisp/. echo '==> Step 2' sh ../../crabuild/runcross #worldload again # test: ./lisp -core ../../fasl-cross2/lisp/kernel.core # hopefully... echo '==> Step 3' cat << EOF | ./lisp -noinit -core ../../fasl-cross2/lisp/kernel.core (load "../../crabuild/env-simple") (setf (ext:search-list "target:") '("trunk:src/" "trunk:fasl-cross2/")) (pushnew :no-pcl *features*) (load "crabuild:build-core") `cat version.tmp` (quit) EOF mv lisp.core nopcl.clcore echo '==> Step 4' cat << EOF | ./lisp -noinit -core nopcl.clcore (load "../../crabuild/env") (setf (ext:search-list "target:") '("trunk:src/" "trunk:fasl-cross2/")) (load "target:tools/setup") (load "target:tools/pclcom") (quit) EOF cp -f ../../fasl-cross2/lisp/internals.h . rm *.o lisp gmake cp -f version lisp lisp.nm internals.h ../../fasl-cross2/lisp/. echo '==> Step 5' cat << EOF | ./lisp -noinit -core ../../fasl-cross2/lisp/kernel.core (load "../../crabuild/env-simple") (setf (ext:search-list "target:") '("trunk:src/" "trunk:fasl-cross2/")) (load "crabuild:build-core") `cat version.tmp` (quit) EOF echo '==> Step 6' mv lisp.core tmp.core ./lisp -noinit -core tmp.core -eval '(progn (load "/home/cracauer/usr_x86-linux/fasl/cralib.lisp") ; do not remove this! (compile-file "../../crabuild/to-be-compiled" :load t) (save-lisp "tmp2.clcore" :purify nil))' ./lisp -noinit -core tmp2.clcore -eval '(progn (load "/home/cracauer/usr_x86-linux/fasl/cralib.lisp") ; do not remove this! (in-package "COMMON-LISP-USER") (save-lisp "lisp.clcore" :purify t))'