Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / tests / distcom5.test
blobbb14f86cdac78eba8ac6e8581dbfcc6e8380d718
1 #! /bin/sh
2 # Copyright (C) 2003, 2006 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 # Test to make sure config files are distributed, and only once.
18 # This tries to distribute a file from a subdirectory, with
19 # a Makefile in that directory. distcom4.test performs the same
20 # test without Makefile in the directory.
22 . ./defs || Exit 1
24 set -e
26 cat >> configure.in << 'END'
27 AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
28 [chmod +x tests/autoconf])
29 AC_CONFIG_FILES([tests/autoheader:tests/wrapper.in],
30 [chmod +x tests/autoheader])
31 AC_CONFIG_FILES([tests/autom4te:tests/wrapper.in],
32 [chmod +x tests/autom4te])
33 AC_CONFIG_FILES([tests/autoreconf:tests/wrapper.in],
34 [chmod +x tests/autoreconf])
35 AC_CONFIG_FILES([tests/autoscan:tests/wrapper.in],
36 [chmod +x tests/autoscan])
37 AC_CONFIG_FILES([tests/autoupdate:tests/wrapper.in],
38 [chmod +x tests/autoupdate])
39 AC_CONFIG_FILES([tests/ifnames:tests/wrapper.in],
40 [chmod +x tests/ifnames])
41 AC_CONFIG_FILES([tests/Makefile])
42 AC_OUTPUT
43 END
45 mkdir tests
46 : > tests/wrapper.in
47 : > tests/Makefile.am
48 cat > Makefile.am << 'END'
49 SUBDIRS = tests
50 test: distdir
51 test -f $(distdir)/tests/wrapper.in
52 END
54 $ACLOCAL
55 $AUTOCONF
56 $AUTOMAKE --add-missing
57 ./configure
58 $MAKE test
60 sed -n -e '/^DIST_COMMON =.*\\$/ {
61 :loop
64 t clear
65 :clear
66 s/\\$/\\/
67 t loop
70 }' -e '/^DIST_COMMON =/ p' Makefile.in > top.txt
72 sed -n -e '/^DIST_COMMON =.*\\$/ {
73 :loop
76 t clear
77 :clear
78 s/\\$/\\/
79 t loop
82 }' -e '/^DIST_COMMON =/ p' tests/Makefile.in > inner.txt
84 test 0 = `grep tests top.txt | wc -l`
85 test 1 = `grep wrapper inner.txt | wc -l`