Fix comment typos.
[automake/ericb.git] / tests / fn99subdir.test
blobf0a7928634e24c6baeaa285f86b9f0667e107864
1 #! /bin/sh
2 # Copyright (C) 2006, 2008 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 # PR 507: Check the filename-length-max=99 option
18 # in conjunction with AC_CONFIG_SUBDIRS.
20 . ./defs || Exit 1
22 set -e
24 # The name is so that 99 is exactly hit (including final \0).
25 subdirname='cnfsubdir'
27 cat >>configure.in <<END
28 AC_CONFIG_SUBDIRS([${subdirname}])
29 AC_OUTPUT
30 END
32 cat >Makefile.am <<END
33 AUTOMAKE_OPTIONS = filename-length-max=99
34 SUBDIRS = ${subdirname}
35 END
37 mkdir ${subdirname} || Exit 1
39 cat >> ${subdirname}/configure.in <<EOF
40 AC_INIT([${subdirname}], [1.0])
41 AM_INIT_AUTOMAKE
42 AC_CONFIG_FILES([Makefile])
43 AC_OUTPUT
44 EOF
46 cat >${subdirname}/Makefile.am <<'END'
47 AUTOMAKE_OPTIONS = filename-length-max=99
48 EXTRA_DIST = 12345678
49 END
51 (cd ${subdirname}; for i in 1 2 3 4 5 6 7 8
53 mkdir -p 12345678 || Exit 77
54 cd 12345678
55 touch x
56 done)
58 for init_dir in ${subdirname} .; do
60 cd ${init_dir} || Exit 1
61 $ACLOCAL
62 $AUTOCONF
63 $AUTOMAKE
64 ) || Exit 1
65 done
66 ./configure
67 $MAKE distcheck
69 (cd ${subdirname}; for i in 1 2 3 4 5 6 7 8 9
71 mkdir -p 12345678 || Exit 77
72 cd 12345678
73 touch x
74 done)
76 $MAKE dist 2>stderr && { cat stderr >&2; Exit 1; }
77 cat stderr >&2
78 grep 'filenames are too long' stderr
79 test 1 = `grep 12345678 stderr | wc -l`