Reword the copyright notices to match what's suggested in GPLv3.
[automake/plouj.git] / tests / nobase.test
blob24d39dae00de49f5fab21e28dc4c4e777daaacf4
1 #! /bin/sh
2 # Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3, or (at your option)
7 # any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Make sure nobase_* works.
19 required='libtoolize gcc'
20 . ./defs || exit 1
22 set -e
24 cat >> configure.in <<'EOF'
25 AC_PROG_CC
26 AC_PROG_LIBTOOL
27 AC_OUTPUT
28 EOF
30 cat > Makefile.am << 'EOF'
31 foodir = $(prefix)/foo
32 fooexecdir = $(prefix)/foo
34 foo_HEADERS = sub/base.h
35 nobase_foo_HEADERS = sub/nobase.h
37 dist_foo_DATA = sub/base.dat
38 nobase_dist_foo_DATA = sub/nobase.dat
40 dist_fooexec_SCRIPTS = sub/base.sh
41 nobase_dist_fooexec_SCRIPTS = sub/nobase.sh
43 fooexec_PROGRAMS = sub/base
44 nobase_fooexec_PROGRAMS = sub/nobase
45 sub_base_SOURCES = source.c
46 sub_nobase_SOURCES = source.c
48 fooexec_LIBRARIES = sub/libbase.a
49 nobase_fooexec_LIBRARIES = sub/libnobase.a
50 sub_libbase_a_SOURCES = source.c
51 sub_libnobase_a_SOURCES = source.c
53 fooexec_LTLIBRARIES = sub/libbase.la
54 nobase_fooexec_LTLIBRARIES = sub/libnobase.la
55 sub_libbase_la_SOURCES = source2.c
56 sub_libnobase_la_SOURCES = source2.c
58 test-install-data: install-data
59 test -f inst/foo/sub/nobase.h
60 test ! -f inst/foo/nobase.h
61 test -f inst/foo/base.h
62 test -f inst/foo/sub/nobase.dat
63 test ! -f inst/foo/nobase.dat
64 test -f inst/foo/base.dat
65 test ! -f inst/foo/sub/pnobase.sh
66 test ! -f inst/foo/pbase.sh
67 test ! -f inst/foo/sub/pnobase$(EXEEXT)
68 test ! -f inst/foo/pbase$(EXEEXT)
69 test ! -f inst/foo/sub/libnobase.a
70 test ! -f inst/foo/libbase.a
71 test ! -f inst/foo/sub/libnobase.la
72 test ! -f inst/foo/libbase.la
74 test-install-exec: install-exec
75 test -f inst/foo/sub/pnobase.sh
76 test ! -f inst/foo/pnobase.sh
77 test -f inst/foo/pbase.sh
78 test -f inst/foo/sub/pnobase$(EXEEXT)
79 test ! -f inst/foo/pnobase$(EXEEXT)
80 test -f inst/foo/pbase$(EXEEXT)
81 test -f inst/foo/sub/libnobase.a
82 test ! -f inst/foo/libnobase.a
83 test -f inst/foo/libbase.a
84 test -f inst/foo/sub/libnobase.la
85 test ! -f inst/foo/libnobase.la
86 test -f inst/foo/libbase.la
87 EOF
89 mkdir sub
91 : > sub/base.h
92 : > sub/nobase.h
93 : > sub/base.dat
94 : > sub/nobase.dat
95 : > sub/base.sh
96 : > sub/nobase.sh
98 cat >source.c <<'EOF'
99 int
100 main (int argc, char *argv[])
102 return 0;
105 cp source.c source2.c
107 rm -f install-sh
109 libtoolize
110 $ACLOCAL
111 $AUTOCONF
112 $AUTOMAKE -a --copy
113 ./configure --prefix "`pwd`/inst" --program-prefix=p
115 $MAKE
116 $MAKE test-install-data
117 $MAKE test-install-exec
118 $MAKE uninstall
120 test `find inst/foo -type f -print | wc -l` = 0
122 $MAKE install-strip
124 # Likewise, in a VPATH build.
126 $MAKE uninstall
127 $MAKE distclean
128 mkdir build
129 cd build
130 ../configure --prefix "`pwd`/inst" --program-prefix=p
131 $MAKE
132 $MAKE test-install-data
133 $MAKE test-install-exec
134 $MAKE uninstall
135 test `find inst/foo -type f -print | wc -l` = 0