Merge branch 'test-protocols' into testsuite-work
[platform/upstream/automake.git] / tests / primary-prefix-valid-couples.test
1 #! /bin/sh
2 # Copyright (C) 2011 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 # Test for valid prefix/primary combinations.
18 # See also test `primary-prefix-invalid-couples.test'.
19
20 . ./defs || Exit 1
21
22 cat >> configure.in <<'END'
23 AC_PROG_CC
24 AC_PROG_RANLIB
25 AC_PROG_LIBTOOL
26 AM_PATH_PYTHON
27 AM_PATH_LISPDIR
28 END
29
30 # Fake libtool availability.
31 : > ltmain.sh
32 : > config.sub
33 : > config.guess
34 cat > acinclude.m4 <<'END'
35 AC_DEFUN([AC_PROG_LIBTOOL],
36          [AC_SUBST([LIBTOOL], [:])])
37 END
38
39 # Other required files.
40 echo '@setfilename foo' > foo.texi
41 : > texinfo.tex
42 : > py-compile
43 : > elisp-comp
44
45 # Setup Makefile.am.
46
47 : > Makefile.am
48
49 for p in bin sbin libexec pkglibexec; do
50   echo "${p}_PROGRAMS = prog-$p" >> Makefile.am
51 done
52
53 for p in lib pkglib; do
54   echo "${p}_LIBRARIES = libs-$p.a" >> Makefile.am
55   echo "${p}_LTLIBRARIES = libd-$p.la" >> Makefile.am
56 done
57
58 for p in bin sbin libexec pkgdata; do
59   echo "${p}_SCRIPTS = $p.sh" >> Makefile.am
60 done
61
62 for p in data dataroot pkgdata doc html dvi pdf ps sysconf \
63          sharedstate localstate lisp; do
64   echo "${p}_DATA = $p.dat" >> Makefile.am
65 done
66
67 for p in include oldinclude pkginclude; do
68   echo "${p}_HEADERS = $p.h" >> Makefile.am
69 done
70
71 for p in man man1 man2 man3 man4 man5 man6 man7 man8 man9; do
72   echo "${p}_MANS = bar.$p"
73 done
74
75 echo "info_TEXINFOS = foo.texi" >> Makefile.am
76 echo "lisp_LISP = foo.el" >> Makefile.am
77 echo "python_PYTHON = foo.py" >> Makefile.am
78
79 awk '{print NR ":" $0}' Makefile.am # For debugging.
80
81 # Go with the tests.
82
83 $ACLOCAL
84 $AUTOMAKE
85
86 :