0.pre8.53:
[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 # the GNU dialect of "make" -- easier to find or port it than to
19 # try to figure out how to port to the local dialect...
20 if [ "$GNUMAKE" != "" ] ; then
21   # The user is evidently trying to tell us something.
22   gnumake="$GNUMAKE"
23 elif [ -x "`which gmake`" ] ; then
24   # "gmake" is the preferred name in *BSD.
25   gnumake=gmake
26 else
27   # All the world's a Linux, and all its users weary of cautious
28   # BSDish worries that "make" might not be GNU make; and at this
29   # point we've already spent quite a while in make-host-1.sh, so
30   # they're naturally unamused when we bail out complaining we don't
31   # know where GNU make is. So since it's not really any worse to guess
32   # wrong here than to fail by not trying, just guess that "make" is
33   # GNU make and hope for the best.
34   gnumake=make
35 fi
36
37 # Build the runtime system and symbol table (.nm) file.
38 #
39 # (This C build has to come after the first genesis in order to get
40 # the sbcl.h the C build needs, and come before the second genesis in
41 # order to produce the symbol table file that second genesis needs. It 
42 # could come either before or after running the cross compiler; that
43 # doesn't matter.)
44 echo //building runtime system and symbol table file
45 cd src/runtime
46 $gnumake clean  || exit 1
47 $gnumake depend || exit 1
48 $gnumake all    || exit 1
49 cd ../..
50
51 # Use a little C program to grab stuff from the C header files and
52 # smash it into Lisp source code.
53 cd tools-for-build
54 $gnumake grovel_headers || exit 1
55 cd ..
56 tools-for-build/grovel_headers > output/stuff-groveled-from-headers.lisp