Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 86 lines (77 sloc) 2.546 kB
a530bbe Initial revision
William Harold Newman authored
1 #!/bin/sh
2
3 # The make-config.sh script uses information about the target machine
4 # to set things up for compilation. It's vaguely like a stripped-down
5 # version of autoconf. It's intended to be run as part of make.sh. The
6 # only time you'd want to run it by itself is if you're trying to
7 # cross-compile the system or if you're doing some kind of
8 # troubleshooting.
9
10 # This software is part of the SBCL system. See the README file for
11 # more information.
12 #
13 # This software is derived from the CMU CL system, which was
14 # written at Carnegie Mellon University and released into the
15 # public domain. The software is in the public domain and is
16 # provided with absolutely no warranty. See the COPYING and CREDITS
17 # files for more information.
18
19 echo //entering make-config.sh
20
21 ltf=`pwd`/local-target-features.lisp-expr
22 echo //initializing $ltf
672ac58 0.6.12.6:
William Harold Newman authored
23 echo ';;;; This is a machine-generated file.' > $ltf
24 echo ';;;; Please do not edit it by hand.' > $ltf
25 echo ';;;; See make-config.sh.' > $ltf
a530bbe Initial revision
William Harold Newman authored
26 echo -n '(' >> $ltf
27
672ac58 0.6.12.6:
William Harold Newman authored
28 echo //setting up CPU-architecture-dependent information
dfa55a8 0.6.12.3:
William Harold Newman authored
29 # Currently supported: x86 alpha
672ac58 0.6.12.6:
William Harold Newman authored
30 sbcl_arch=${SBCL_ARCH:-x86}
dfa55a8 0.6.12.3:
William Harold Newman authored
31 echo -n ":$sbcl_arch" >> $ltf
a530bbe Initial revision
William Harold Newman authored
32 for d in src/compiler src/assembly; do
33 echo //setting up symlink $d/target
34 original_dir=`pwd`
35 cd $d
36 if [ -L target ] ; then
37 rm target
38 elif [ -e target ] ; then
39 echo "I'm afraid to replace non-symlink $d/target with a symlink."
40 exit 1
41 fi
42 if [ -d $sbcl_arch ] ; then
43 ln -s $sbcl_arch target
44 else
45 echo "missing sbcl_arch directory $PWD/$sbcl_arch"
46 exit 1
47 fi
48 cd $original_dir
49 done
50
51 echo //setting up OS-dependent information
eaf8fba tidied up OpenBSD-vs.-FreeBSD stuff, and src/runtime/Config.x86-*
William Harold Newman authored
52 original_dir=`pwd`
a530bbe Initial revision
William Harold Newman authored
53 cd src/runtime/
54 rm -f Config
55 if [ `uname` = Linux ]; then
56 echo -n ' :linux' >> $ltf
dfa55a8 0.6.12.3:
William Harold Newman authored
57 ln -s Config.$sbcl_arch-linux Config
a530bbe Initial revision
William Harold Newman authored
58 elif uname | grep BSD; then
eaf8fba tidied up OpenBSD-vs.-FreeBSD stuff, and src/runtime/Config.x86-*
William Harold Newman authored
59 echo -n ' :bsd' >> $ltf
a530bbe Initial revision
William Harold Newman authored
60 if [ `uname` = FreeBSD ]; then
61 echo -n ' :freebsd' >> $ltf
dfa55a8 0.6.12.3:
William Harold Newman authored
62 ln -s Config.$sbcl_arch-freebsd Config
a530bbe Initial revision
William Harold Newman authored
63 elif [ `uname` = OpenBSD ]; then
64 echo -n ' :openbsd' >> $ltf
dfa55a8 0.6.12.3:
William Harold Newman authored
65 ln -s Config.$sbcl_arch-openbsd Config
a530bbe Initial revision
William Harold Newman authored
66 else
67 echo unsupported BSD variant: `uname`
68 exit 1
69 fi
70 else
71 echo unsupported OS type: `uname`
72 exit 1
73 fi
eaf8fba tidied up OpenBSD-vs.-FreeBSD stuff, and src/runtime/Config.x86-*
William Harold Newman authored
74 cd $original_dir
a530bbe Initial revision
William Harold Newman authored
75
76 echo //finishing $ltf
77 echo ')' >> $ltf
78
79 # FIXME: The version system should probably be redone along these lines:
80 #
81 # echo //setting up version information.
82 # versionfile=version.txt
83 # cp base-version.txt $versionfile
84 # echo " (built `date -u` by `whoami`@`hostname`)" >> $versionfile
85 # echo 'This is a machine-generated file and should not be edited by hand.' >> $versionfile
Something went wrong with that request. Please try again.