/[cmucl]/src/tools/cross-build-world.sh
ViewVC logotype

Diff of /src/tools/cross-build-world.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by rtoy, Thu Jun 11 16:04:02 2009 UTC revision 1.4 by rtoy, Wed Sep 9 15:51:28 2009 UTC
# Line 2  Line 2 
2    
3  usage() {  usage() {
4      echo "cross-build-world.sh [-crl] target-dir cross-dir cross-compiler-script [build-binary [flags]]"      echo "cross-build-world.sh [-crl] target-dir cross-dir cross-compiler-script [build-binary [flags]]"
5      echo "  -c     Clean target and cross directories before compiling"      echo "  -c      Clean target and cross directories before compiling"
6      echo "  -r     Recompile lisp runtime"      echo "  -r      Recompile lisp runtime"
7      echo "  -l     Load cross-compiled kernel to make a new lisp kernel"      echo "  -l      Load cross-compiled kernel to make a new lisp kernel"
8        echo "  -B file Use this as the cross bootstrap file."
9  }  }
10    
11  while getopts "crl" arg  while getopts "crlB:" arg
12  do  do
13      case $arg in      case $arg in
14        c) CLEAN_DIR=yes ;;        c) CLEAN_DIR=yes ;;
15        r) BUILD_RUNTIME=yes ;;        r) BUILD_RUNTIME=yes ;;
16        l) LOAD_KERNEL=yes ;;        l) LOAD_KERNEL=yes ;;
17          B) BOOTSTRAP=$OPTARG ;;
18        h | \?) usage; exit 1 ;;        h | \?) usage; exit 1 ;;
19      esac      esac
20  done  done
# Line 47  CROSS="`echo $2 | sed 's:/*$::'`" Line 49  CROSS="`echo $2 | sed 's:/*$::'`"
49  SCRIPT="$3"  SCRIPT="$3"
50  LISP="${4:-lisp}"  LISP="${4:-lisp}"
51    
52    if [ -z "$BOOTSTRAP" ]; then
53        CROSSBOOT="$TARGET/cross-boootstrap.lisp"
54    else
55        CROSSBOOT=$BOOTSTRAP
56    fi
57    
58  if [ $# -ge 4 ]  if [ $# -ge 4 ]
59  then  then
60          shift 4          shift 4
# Line 66  then Line 74  then
74                  sed "s:^src:$CROSS:g" | xargs mkdir                  sed "s:^src:$CROSS:g" | xargs mkdir
75  fi  fi
76    
77    echo cross boot = $CROSSBOOT
78  $LISP "$@" -noinit -nositeinit <<EOF  $LISP "$@" -noinit -nositeinit <<EOF
79  (in-package :cl-user)  (in-package :cl-user)
80    
# Line 74  $LISP "$@" -noinit -nositeinit <<EOF Line 83  $LISP "$@" -noinit -nositeinit <<EOF
83  (setf (ext:search-list "target:")  (setf (ext:search-list "target:")
84        '("$CROSS/" "src/"))        '("$CROSS/" "src/"))
85    
86  (when (probe-file "$TARGET/cross-bootstrap.lisp")  (print "$CROSSBOOT")
87    (load "$TARGET/cross-bootstrap.lisp"))  (load "$CROSSBOOT" :if-does-not-exist nil)
88    
89  (load "target:code/exports")  (load "target:code/exports")
90  (load "target:tools/setup" :if-source-newer :load-source)  (load "target:tools/setup" :if-source-newer :load-source)

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.5