test: protect more yacc declarations against C vs. C++ linkage.
[automake.git] / t / instdir2.sh
blobb15ed644560d430945bd208ea779e6d53c4a4419
1 #! /bin/sh
2 # Copyright (C) 2009-2024 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 2, 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 <https://www.gnu.org/licenses/>.
17 # If $(foodir) is the empty string, then nothing should be installed there.
18 # This test ensures this also if $(foo_PRIMARY) is nonempty, see
19 # 'instdir.sh'.
21 . test-init.sh
23 cat >>configure.ac <<'END'
24 AC_SUBST([foodir], ['${datadir}'/foo])
25 AC_OUTPUT
26 END
28 mkdir sub
30 cat >Makefile.am <<'END'
31 bin_SCRIPTS = s
32 nobase_bin_SCRIPTS = ns sub/ns
33 data_DATA = d
34 nobase_data_DATA = nd sub/nd
35 include_HEADERS = h
36 nobase_include_HEADERS = nh sub/nh
37 foo_DATA = f
38 nobase_foo_DATA = nf sub/nf
39 bardir = $(datadir)/bar
40 bar_DATA = b
41 nobase_bar_DATA = nb sub/nb
42 man1_MANS = m1.1
43 man_MANS = m.2
44 notrans_man1_MANS = nm1.1
45 notrans_man_MANS = nm.2
46 END
48 : >s
49 : >ns
50 : >sub/ns
51 : >d
52 : >nd
53 : >sub/nd
54 : >h
55 : >nh
56 : >sub/nh
57 : >f
58 : >nf
59 : >sub/nf
60 : >b
61 : >nb
62 : >sub/nb
63 : >m1.1
64 : >m.2
65 : >nm1.1
66 : >nm.2
68 $ACLOCAL
69 $AUTOCONF
70 $AUTOMAKE --add-missing
72 cwd=$(pwd) || fatal_ "getting current working directory"
73 instdir=$cwd/inst
74 destdir=$cwd/dest
75 mkdir build
76 cd build
77 ../configure --prefix="$instdir"
78 $MAKE
80 nulldirs='bindir= datadir= includedir= foodir= bardir= man1dir= man2dir='
81 null_install