/[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.2 by toy, Mon Jan 12 20:09:29 2004 UTC revision 1.2.26.1 by rtoy, Wed Apr 15 19:58:10 2009 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2    
3    usage() {
4        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"
6        echo "  -r     Recompile lisp runtime"
7        echo "  -l     Load cross-compiled kernel to make a new lisp kernel"
8    }
9    
10    while getopts "crl" arg
11    do
12        case $arg in
13          c) CLEAN_DIR=yes ;;
14          r) BUILD_RUNTIME=yes ;;
15          l) LOAD_KERNEL=yes ;;
16          h | \?) usage; exit 1 ;;
17        esac
18    done
19    
20    shift `expr $OPTIND - 1`
21    
22  if [ "$1" = "" -o "$2" = "" ]  if [ "$1" = "" -o "$2" = "" ]
23  then  then
24          echo "Usage: $0 target-directory cross-directory cross-compiler-script [build-binary] [build-flags...]"      usage
25          exit 1      exit 1
26  fi  fi
27    
28  if [ ! -d "$1" ]  if [ ! -d "$1" ]
# Line 27  TARGET="`echo $1 | sed 's:/*$::'`" Line 46  TARGET="`echo $1 | sed 's:/*$::'`"
46  CROSS="`echo $2 | sed 's:/*$::'`"  CROSS="`echo $2 | sed 's:/*$::'`"
47  SCRIPT="$3"  SCRIPT="$3"
48  LISP="${4:-lisp}"  LISP="${4:-lisp}"
49    
50  if [ $# -ge 4 ]  if [ $# -ge 4 ]
51  then  then
52          shift 4          shift 4
# Line 34  else Line 54  else
54          shift 3          shift 3
55  fi  fi
56    
57    if [ "$CLEAN_DIR" = "yes" ]; then
58        echo "Cleaning directories:  $TARGET $CROSS"
59        src/tools/clean-target.sh $TARGET $CROSS
60    fi
61    
62  if [ ! -d "$CROSS" ]  if [ ! -d "$CROSS" ]
63  then  then
64          # Create a directory tree that mirrors the source directory tree          # Create a directory tree that mirrors the source directory tree
# Line 86  $LISP "$@" -noinit -nositeinit <<EOF Line 111  $LISP "$@" -noinit -nositeinit <<EOF
111  (load "target:tools/worldbuild")  (load "target:tools/worldbuild")
112  (ext:quit)  (ext:quit)
113  EOF  EOF
114    
115    if [ "$BUILD_RUNTIME" = "yes" ]; then
116        echo Building runtime
117        (cd $TARGET/lisp; make)
118    fi
119    
120    if [ "$LOAD_KERNEL" = "yes" ]; then
121        echo Load kernel.core
122        src/tools/load-world.sh -p $TARGET cross-compiled
123    fi

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.2.26.1

  ViewVC Help
Powered by ViewVC 1.1.5