1.0.4.21: merge redundant funcallN definitions in the runtime
[sbcl/lichteblau.git] / make-target-contrib.sh
blob42bd56f19030f0b913f59d900ddb8b353d2ac9e3
1 #!/bin/sh
2 set -e
4 # This is a script to be run as part of make.sh. The only time you'd
5 # probably want to run it by itself is if you're cross-compiling the
6 # system or 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 LANG=C
18 LC_ALL=C
19 export LANG LC_ALL
21 . ./find-gnumake.sh
22 find_gnumake
24 . ./sbcl-pwd.sh
25 sbcl_pwd
27 SBCL_HOME=$SBCL_PWD/contrib
28 export SBCL_HOME
30 SBCL="$SBCL_PWD/src/runtime/sbcl --noinform --core $SBCL_PWD/output/sbcl.core --disable-debugger --no-sysinit --no-userinit"
31 SBCL_BUILDING_CONTRIB=1
32 export SBCL SBCL_BUILDING_CONTRIB
34 # deleting things here lets us not worry about interaction with stale
35 # fasls. This is not good, but is better than :FORCE on each asdf
36 # operation, because that causes multiple builds of base systems such
37 # as SB-RT and SB-GROVEL, but FIXME: there's probably a better
38 # solution. -- CSR, 2003-05-30
40 find contrib/ \( -name '*.fasl' -o \
41 -name '*.FASL' -o \
42 -name 'foo.c' -o \
43 -name 'FOO.C' -o \
44 -name 'a.out' -o \
45 -name 'A.OUT' -o \
46 -name 'alien.so' -o \
47 -name 'ALIEN.SO' -o \
48 -name '*.o' -o \
49 -name '*.O' \) \
50 -print | xargs rm -f
52 find output -name 'building-contrib.*' -print | xargs rm -f
54 for i in contrib/*; do
55 test -d $i && test -f $i/Makefile || continue;
56 # export INSTALL_DIR=$SBCL_HOME/`basename $i `
57 test -f $i/test-passed && rm $i/test-passed
58 # hack to get exit codes right.
59 if $GNUMAKE -C $i test 2>&1 && touch $i/test-passed ; then
61 else
62 exit $?
63 fi | tee output/building-contrib.`basename $i`
64 done
66 # Sometimes people used to see the "No tests failed." output from the last
67 # DEFTEST in contrib self-tests and think that's all that is. So...
68 HEADER_HAS_BEEN_PRINTED=false
69 for dir in contrib/*
71 if [ -d "$dir" -a -f "$dir/Makefile" -a ! -f "$dir/test-passed" ]; then
72 if $HEADER_HAS_BEEN_PRINTED; then
73 echo > /dev/null
74 else
75 cat <<EOF
77 WARNING! Some of the contrib modules did not build successfully or pass
78 their self-tests. Failed contribs:"
79 EOF
80 HEADER_HAS_BEEN_PRINTED=true
82 echo " `basename $dir`"
84 done
86 if [ $HEADER_HAS_BEEN_PRINTED = true ]; then
87 exit 1