tests: work around strangeness in MSYS
[automake.git] / tests / man8.test
blob2257627ea43864cf8d7391d8e727c5c9773c00d3
1 #! /bin/sh
2 # Copyright (C) 2010, 2011 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 <http://www.gnu.org/licenses/>.
17 # Check for a bug in distcheck w.r.t. generated manpages.
19 . ./defs || Exit 1
21 cat > Makefile.am << 'END'
22 dist_man_MANS = foo.1
23 foo.1:
24 ## This 'rm' command will fail if $(srcdir) is unwritable.
25 rm -f $(srcdir)/$@
26 : > $(srcdir)/$@
27 END
29 cat >> configure.in <<'END'
30 AC_OUTPUT
31 END
33 $ACLOCAL
34 $AUTOMAKE
35 $AUTOCONF
37 mkdir build
38 cd build
39 ../configure
41 $MAKE
42 test -f ../foo.1
43 $MAKE distdir
44 test -f $me-1.0/foo.1
45 $MAKE distcheck
47 cd ..
48 rm -f foo.1
49 ./configure
51 $MAKE
52 test -f foo.1
53 $MAKE distdir
54 test -f $me-1.0/foo.1
55 $MAKE distcheck