]> mj.ucw.cz Git - libucw.git/blob - build/check-customs
Added an exclude file, symlink it to .git/info/exclude if you wish.
[libucw.git] / build / check-customs
1 #!/bin/bash
2 # A script for testing compilability of different configurations
3 # (c) 2004--2006 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.4 >>log 2>&1 ; then
19                         echo "  CANNOT CONFIGURE"
20                         exit 1
21                 fi
22                 if ! make >>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=search1-x                                                   # various Centrum.cz configurations
40         try centrum/cz ROLE=indexer
41         try centrum/cz ROLE=gather
42         try centrum/cz ROLE=reap+watson
43         try centrum/cz ROLE=all CONFIG_PARTMAP_IS_MMAP
44         try centrum/pl ROLE=all
45         try debug CONFIG_SHARED                                                         # debugging configuration with shared libs
46         try debug                                                                       # debugging configuration
47 fi