1#! /bin/sh 2# Copyright (C) 2010-2021 Free Software Foundation, Inc. 3# 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. 8# 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. 13# 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/>. 16 17# Check for a bug in distcheck w.r.t. generated manpages. 18 19. test-init.sh 20 21# Avoid a spurious failure due to a known FreeBSD make incompatibility. 22useless_vpath_rebuild \ 23 && skip_ "VPATH useless rebuild detected (see bug#7884)" 24 25cat > Makefile.am << 'END' 26dist_man_MANS = foo.1 27foo.1: 28## This 'rm' command will fail if $(srcdir) is unwritable. 29 rm -f $(srcdir)/$@ 30 : > $(srcdir)/$@ 31END 32 33cat >> configure.ac <<'END' 34AC_OUTPUT 35END 36 37$ACLOCAL 38$AUTOMAKE 39$AUTOCONF 40 41mkdir build 42cd build 43../configure 44 45$MAKE 46test -f ../foo.1 47$MAKE distdir 48test -f $me-1.0/foo.1 49$MAKE distcheck 50 51cd .. 52rm -f foo.1 53./configure 54 55$MAKE 56test -f foo.1 57$MAKE distdir 58test -f $me-1.0/foo.1 59$MAKE distcheck 60 61: 62