0.8.8.2:
[sbcl.git] / make-target-1.sh
1 #!/bin/sh
2
3 # This is a script to be run as part of make.sh. The only time you'd
4 # want to run it by itself is if you're trying to cross-compile the
5 # system or if you're doing some kind of troubleshooting.
6
7 # This software is part of the SBCL system. See the README file for
8 # more information.
9 #
10 # This software is derived from the CMU CL system, which was
11 # written at Carnegie Mellon University and released into the
12 # public domain. The software is in the public domain and is
13 # provided with absolutely no warranty. See the COPYING and CREDITS
14 # files for more information.
15
16 echo //entering make-target-1.sh
17
18 # Use a little lisp to write LDSO stubs in correct format for the toolchain. 
19 echo //generating ldso-subs.S
20 $SBCL_XC_HOST <<-'EOF' || exit 1
21         (load "src/cold/shared.lisp")
22         (load "tools-for-build/ldso-stubs.lisp")
23         #+cmu (ext:quit)
24         #+clisp (ext:quit)
25 EOF
26
27 # Build the runtime system and symbol table (.nm) file.
28 #
29 # (This C build has to come after the first genesis in order to get
30 # the sbcl.h the C build needs, and come before the second genesis in
31 # order to produce the symbol table file that second genesis needs. It 
32 # could come either before or after running the cross compiler; that
33 # doesn't matter.)
34 echo //building runtime system and symbol table file
35 cd src/runtime
36 $GNUMAKE clean  || exit 1
37 $GNUMAKE depend || exit 1
38 $GNUMAKE all    || exit 1
39 cd ../..
40
41 # Use a little C program to grab stuff from the C header files and
42 # smash it into Lisp source code.
43 cd tools-for-build
44 $GNUMAKE -I../src/runtime grovel-headers || exit 1
45 cd ..
46 tools-for-build/grovel-headers > output/stuff-groveled-from-headers.lisp
47
48 # after-grovel-headers may not exist for all platforms (used for
49 # Darwin hacks)
50 cd src/runtime
51 $GNUMAKE after-grovel-headers || true
52 cd ..