Regenerate xperfecthashN.lisp-expr from scratch via build-all-cores
[sbcl.git] / cross-make.sh
blob817776b7eeb9028aac22d00606c9479f945f40c4
1 #!/bin/sh
3 # This script is useful primarily when you have a target machine
4 # that can make its own 'local-target-features', but you'd rather run
5 # the bulk of the compilation on a different (presumably faster) machine.
7 # The script is to executed on the machine that compiles the Lisp tree.
8 # SSH is invoked to compile the C runtime.
9 # Passwordless login to the target machine is required.
11 #config_options="--without-gencgc --with-cheneygc"
12 if [ $1 = -p ]
13 then
14 ssh_port_opt="-p $2"
15 scp_port_opt="-P $2"
16 shift ; shift
17 else
18 ssh_port_opt=""
19 scp_port_opt=""
21 case $1 in
22 sync)
23 # Perform configuration on the target machine at the same git revision
24 local_rev=`git rev-parse HEAD`
25 checkout="git checkout $local_rev"
27 head)
28 checkout="git checkout master"
30 nosync)
31 checkout="echo not syncing remote"
34 echo "Usage error: cross-make.sh {sync|head|nosync} host dir [env]"
35 exit 1
36 esac
37 shift
38 host=$1 # can have the form 'user@host' if necessary
39 root=$2 # path to source directory on $host
40 ENV=$3 # if you need to set SBCL_ARCH,CFLAGS,etc remotely
42 set -ex
44 ./generate-version.sh
45 ssh $ssh_port_opt $host cd $root \; $checkout '&&' \
46 $ENV sh make-config.sh $config_options '&&' \
47 mv version.lisp-expr remote-version.lisp-expr
48 scp $scp_port_opt $host:$root/{remote-version.lisp-expr,local-target-features.lisp-expr,output/build-id.inc} .
49 mv build-id.inc output
50 #diff version.lisp-expr remote-version.lisp-expr || exit 1
52 # make-host-1 and copy the generated C headers to the target machine
53 sh make-host-1.sh
54 tar cf - src/runtime/genesis output/ucd | ssh $ssh_port_opt $host cd $root \; tar xf -
56 # make-target-1 and copy back the artifacts
57 ssh $ssh_port_opt $host cd $root \; $ENV sh make-target-1.sh
58 scp $scp_port_opt $host:$root/output/stuff-groveled-from-headers.lisp output
60 # make-host-2 and copy over the artifact
61 sh make-host-2.sh
62 scp $scp_port_opt -C output/cold-sbcl.core $host:$root/output
64 # make-target-2 and the two contribs required to execute 'core.test.sh'
65 ssh $ssh_port_opt $host cd $root \; sh make-target-2.sh '&&' \
66 sh make-target-contrib.sh sb-posix sb-bsd-sockets