error-error: don't print to *terminal-io*.
[sbcl.git] / make-target-1.sh
blob0428ae8686371df71a9dca024b6b60f688ee46ba
1 #!/bin/sh
2 set -em
4 # This is a script to be run as part of make.sh. The only time you'd
5 # want to run it by itself is if you're trying to cross-compile the
6 # system or if you're doing some kind of troubleshooting.
8 # This software is part of the SBCL system. See the README file for
9 # more information.
11 # This software is derived from the CMU CL system, which was
12 # written at Carnegie Mellon University and released into the
13 # public domain. The software is in the public domain and is
14 # provided with absolutely no warranty. See the COPYING and CREDITS
15 # files for more information.
17 echo //entering make-target-1.sh
19 LANG=C
20 LC_ALL=C
21 export LANG LC_ALL
23 # Load our build configuration
24 . output/build-config
26 if [ -n "$SBCL_HOST_LOCATION" ]; then
27 echo //copying host-1 output files to target
28 rsync -a "$SBCL_HOST_LOCATION/output/" output/
29 rsync -a "$SBCL_HOST_LOCATION/src/runtime/genesis" src/runtime
32 # Build the runtime system
34 # (This C build has to come after the first genesis in order to get
35 # 'sbcl.h' which the C build. It could come either before or after running
36 # the cross compiler; that doesn't matter.)
37 echo //building runtime system and symbol table file
39 $GNUMAKE -C src/runtime clean
40 $GNUMAKE $SBCL_MAKE_JOBS -C src/runtime all
42 # Use a little C program to grab stuff from the C header files and
43 # smash it into Lisp source code.
44 # -C tools-for-build is broken on some gnu make versions.
45 if $android
46 then
47 ( cd tools-for-build; $CC -I../src/runtime -ldl -o grovel-headers grovel-headers.c)
48 . ./tools-for-build/android_run.sh
49 android_run tools-for-build/grovel-headers > output/stuff-groveled-from-headers.lisp
50 else
51 ( cd tools-for-build; $GNUMAKE -I../src/runtime grovel-headers )
52 tools-for-build/grovel-headers > output/stuff-groveled-from-headers.lisp
54 touch -r tools-for-build/grovel-headers.c output/stuff-groveled-from-headers.lisp
56 if [ -n "$SBCL_HOST_LOCATION" ]; then
57 echo //copying target-1 output files to host
58 rsync -a output/stuff-groveled-from-headers.lisp "$SBCL_HOST_LOCATION/output"