test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / t / primary-prefix-couples-documented-valid.sh
1 #! /bin/sh
2 # Copyright (C) 2011-2013 Free Software Foundation, Inc.
3 #
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 2, or (at your option)
7 # any later version.
8 #
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.
13 #
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/>.
16
17 # Check that the "uncommon" prefix/primary combinations used in
18 # examples in the Automake manual do not cause obvious errors.
19 # Please keep this test in sync with the automake manual.
20
21 . test-init.sh
22
23 cat >> configure.ac <<'END'
24 AC_PROG_CC
25 AM_PROG_AR
26 AC_PROG_RANLIB
27 AC_PROG_LIBTOOL
28 AM_PROG_GCJ
29 AM_PATH_PYTHON
30 END
31
32 # Fake libtool availability.
33 : > ltmain.sh
34 cat > acinclude.m4 <<'END'
35 AC_DEFUN([AC_PROG_LIBTOOL],
36          [AC_SUBST([LIBTOOL], [:])])
37 END
38
39 cat > Makefile.am <<'END'
40 xmldir = $(datadir)/xml
41 xml_DATA = file.xml
42
43 data_DATA = file1 file2 file3
44 data2dir = $(datadir)
45 data2_DATA = file4 file5 file6
46
47 aclocaldir = $(datadir)/aclocal
48 aclocal_DATA = mymacro.m4 myothermacro.m4
49
50 imagesdir = $(pkgdatadir)/images
51 soundsdir = $(pkgdatadir)/sounds
52 dist_images_DATA = images/vortex.pgm
53 dist_sounds_DATA = sounds/whirl.ogg
54
55 lisp_DATA = file1.el file2.el
56
57 javadir = $(datadir)/java
58 dist_java_JAVA = a.java b.java c.java
59
60 pkgpython_PYTHON = foo.py
61
62 pyexec_LTLIBRARIES = quaternion.la
63 quaternion_la_SOURCES = quaternion.c support.c support.h
64 quaternion_la_LDFLAGS = -avoid-version -module
65
66 myexecbindir = /exec
67 myexecbin_PROGRAMS = zardoz
68
69 foodir = $(prefix)/foo
70 barexecdir = $(prefix)/bar/binaries
71 foo_SCRIPTS = foo.sh
72 barexec_SCRIPTS = quux.pl
73
74 my_execbindir = $(pkglibdir)
75 my_doclibdir = $(docdir)
76 my_execbin_PROGRAMS = foo
77 my_doclib_LIBRARIES = libquux.a
78 END
79
80 $ACLOCAL
81
82 # Both these two invocations are meant.
83 # They exercise both code paths concerning auxiliary files.
84 $AUTOMAKE -a
85 $AUTOMAKE
86
87 :