Added SILC Thread Queue API
[silc.git] / apps / autodist / tests / autodist6.test
1 #!/bin/sh
2
3 AUTODIST=../../autodist
4
5 rm -rf test
6 mkdir test
7
8 cd test || exit 1
9
10 chmod +x $AUTODIST || exit 1
11
12 cat << EOF > configure.ad
13 AD_INIT
14 #ifdef _DIST_DEFAULT
15 AC_CANONICAL_BUILD
16 AM_INIT_AUTOMAKE
17 AC_PREREQ(2.52)
18 AC_CONFIG_HEADERS(config.h)
19 AC_CONFIG_FILES(
20 Makefile
21 )
22 AC_OUTPUT
23 echo configure.ad ok
24 #else !_DIST_DEFAULT
25 echo "ERROR"
26 exit 1
27 #endif _DIST_DEFAULT
28 EOF
29
30 cat << EOF > Makefile.ad
31 SUBDIRS=        \\
32 #ifdef _DIST_NODEF
33         nodef   \\
34         poa     \\
35         paa     \\
36 #endif _DIST_NODEF
37         .       \\
38         .       \\
39         .       \\
40         .       \\
41
42 EOF
43
44 rm -rf distdir subdir
45 mkdir -p subdir || exit 1
46
47 $AUTODIST -i || exit 1
48 if test '!' -d distdir; then
49   echo "error: distdir/ does no exist"
50   exit 1
51 fi 
52
53 cp -p ../../default distdir || exit 1
54 cp -p ../../autodist.conf distdir || exit 1
55
56 touch README NEWS AUTHORS ChangeLog
57
58 $AUTODIST || exit 1
59
60 ./configure || exit 1
61 make || exit 1
62 echo make ok
63
64 echo test ok
65
66 # Cleanup
67 rm -rf subdir distdir
68