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