0.9.12:
[sbcl/lichteblau.git] / make-target-contrib.sh
blob6d10ca3d3561e46d5d394edb74f0e8c1718c323b
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 # usually SBCL_HOME refers to the installed root of SBCL, not the
25 # build directory. Right now, however, where there are dependencies
26 # between contrib packages, we want the _uninstalled_ versions to be
27 # found
28 if [ "$OSTYPE" = "cygwin" ] ; then
29 SBCL_BASE=`cygpath -m $(pwd)`
30 else
31 SBCL_BASE=`pwd`
33 SBCL_HOME=$SBCL_BASE/contrib
34 export SBCL_HOME
37 SBCL="$SBCL_BASE/src/runtime/sbcl --noinform --core $SBCL_BASE/output/sbcl.core --disable-debugger --no-sysinit --no-userinit"
38 SBCL_BUILDING_CONTRIB=1
39 export SBCL SBCL_BUILDING_CONTRIB
41 # deleting things here lets us not worry about interaction with stale
42 # fasls. This is not good, but is better than :FORCE on each asdf
43 # operation, because that causes multiple builds of base systems such
44 # as SB-RT and SB-GROVEL, but FIXME: there's probably a better
45 # solution. -- CSR, 2003-05-30
47 find contrib/ \( -name '*.fasl' -o \
48 -name '*.FASL' -o \
49 -name 'foo.c' -o \
50 -name 'FOO.C' -o \
51 -name 'a.out' -o \
52 -name 'A.OUT' -o \
53 -name 'alien.so' -o \
54 -name 'ALIEN.SO' -o \
55 -name '*.o' -o \
56 -name '*.O' \) \
57 -print | xargs rm -f
59 for i in contrib/*; do
60 test -d $i && test -f $i/Makefile || continue;
61 # export INSTALL_DIR=$SBCL_HOME/`basename $i `
62 test -f $i/test-passed && rm $i/test-passed
63 $GNUMAKE -C $i test && touch $i/test-passed
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 echo "Failed contribs:"
76 HEADER_HAS_BEEN_PRINTED=true
78 echo " `basename $dir`"
80 done