0.9.11:
[sbcl/simd.git] / make-target-contrib.sh
blob9823d3708eac5fda0163ac59b9c4113d4069f436
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 SBCL_HOME=`pwd`/contrib
29 export SBCL_HOME
31 SBCL="`pwd`/src/runtime/sbcl --noinform --core `pwd`/output/sbcl.core --userinit /dev/null --sysinit /dev/null --disable-debugger"
32 SBCL_BUILDING_CONTRIB=1
33 export SBCL SBCL_BUILDING_CONTRIB
35 # deleting things here lets us not worry about interaction with stale
36 # fasls. This is not good, but is better than :FORCE on each asdf
37 # operation, because that causes multiple builds of base systems such
38 # as SB-RT and SB-GROVEL, but FIXME: there's probably a better
39 # solution. -- CSR, 2003-05-30
41 find contrib/ \( -name '*.fasl' -o \
42 -name '*.FASL' -o \
43 -name 'foo.c' -o \
44 -name 'FOO.C' -o \
45 -name 'a.out' -o \
46 -name 'A.OUT' -o \
47 -name 'alien.so' -o \
48 -name 'ALIEN.SO' -o \
49 -name '*.o' -o \
50 -name '*.O' \) \
51 -print | xargs rm -f
53 for i in contrib/*; do
54 test -d $i && test -f $i/Makefile || continue;
55 # export INSTALL_DIR=$SBCL_HOME/`basename $i `
56 test -f $i/test-passed && rm $i/test-passed
57 $GNUMAKE -C $i test && touch $i/test-passed
58 done
60 # Sometimes people used to see the "No tests failed." output from the last
61 # DEFTEST in contrib self-tests and think that's all that is. So...
62 HEADER_HAS_BEEN_PRINTED=false
63 for dir in contrib/*
65 if [ -d "$dir" -a -f "$dir/Makefile" -a ! -f "$dir/test-passed" ]; then
66 if $HEADER_HAS_BEEN_PRINTED; then
67 echo > /dev/null
68 else
69 echo "Failed contribs:"
70 HEADER_HAS_BEEN_PRINTED=true
72 echo " `basename $dir`"
74 done