test: protect more yacc declarations against C vs. C++ linkage.
[automake.git] / t / distcom4.sh
blob540119a7a606e7991deae213f467166dc4437748
1 #! /bin/sh
2 # Copyright (C) 2003-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 # Test to make sure config files are distributed, and only once.
18 # This tries to distribute a file from a subdirectory, without
19 # Makefile in that directory. 'distcom5.sh' performs the same
20 # test with a Makefile in the directory.
22 . test-init.sh
24 cat >> configure.ac << 'END'
25 AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
26 [chmod +x tests/autoconf])
27 AC_CONFIG_FILES([tests/autoheader:tests/wrapper.in],
28 [chmod +x tests/autoheader])
29 AC_CONFIG_FILES([tests/autom4te:tests/wrapper.in],
30 [chmod +x tests/autom4te])
31 AC_CONFIG_FILES([tests/autoreconf:tests/wrapper.in],
32 [chmod +x tests/autoreconf])
33 AC_CONFIG_FILES([tests/autoscan:tests/wrapper.in],
34 [chmod +x tests/autoscan])
35 AC_CONFIG_FILES([tests/autoupdate:tests/wrapper.in],
36 [chmod +x tests/autoupdate])
37 AC_CONFIG_FILES([tests/ifnames:tests/wrapper.in],
38 [chmod +x tests/ifnames])
39 AC_OUTPUT
40 END
42 mkdir tests
43 : > README
44 : > tests/wrapper.in
45 cat > Makefile.am << 'END'
46 .PHONY: test1 test 2
47 test1:
48 for x in $(DIST_COMMON); do echo $$x; done \
49 | grep 'tests/' > lst
50 cat lst # For debugging.
51 test `wc -l <lst` -eq 1
52 test2: distdir
53 test -f $(distdir)/tests/wrapper.in
54 END
56 $ACLOCAL
57 $AUTOCONF
58 $AUTOMAKE --add-missing
59 ./configure
60 $MAKE test1 test2