]> mj.ucw.cz Git - libucw.git/blob - build/check-customs
Switched to the new config mechanism. Greatly simplified.
[libucw.git] / build / check-customs
1 #!/bin/bash
2 # A script for testing compilability of different configurations
3 # (c) 2004--2005 Martin Mares <mj@ucw.cz>
4
5 set -e
6
7 TEST=0
8
9 function try
10 {
11         TEST=$(($TEST+1))
12         TDIR=tests/$TEST
13         mkdir $TDIR
14         echo "### Test $TEST: $@ ###" | tee $TDIR/log
15
16         (
17                 cd $TDIR
18                 if ! ../../configure $@ CC=gcc-3.0 >>log 2>&1 ; then
19                         echo "  CANNOT CONFIGURE"
20                         exit 1
21                 fi
22                 if ! make NEWCONFIG=1 >>log 2>&1 ; then
23                         echo "  FAILED"
24                         exit 1
25                 fi
26                 echo "  PASSED"
27         )
28 }
29
30 rm -rf tests
31 mkdir tests
32 if [ -n "$1" ] ; then
33         try "$@"
34 else
35         try free                                                                        # the free version
36         try bare -CONFIG_INDEXER -CONFIG_SEARCH                                         # absolutely stripped version
37         try bare                                                                        # the bare version
38         try debug/matcher-test                                                          # bare + custom stats and matchers
39         try centrum/cz ROLE=search                                                      # various Centrum.cz configurations
40         try centrum/cz ROLE=indexer
41         try centrum/cz ROLE=gather
42         try centrum/cz ROLE=reap
43         try centrum/cz ROLE=all
44         try debug CONFIG_SHARED                                                         # debugging configuration with shared libs
45         try debug                                                                       # debugging configuration
46 fi