summaryrefslogtreecommitdiff
path: root/t/pr2.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/pr2.sh')
-rwxr-xr-xt/pr2.sh51
1 files changed, 51 insertions, 0 deletions
diff --git a/t/pr2.sh b/t/pr2.sh
new file mode 100755
index 000000000..ffe4a81d7
--- /dev/null
+++ b/t/pr2.sh
@@ -0,0 +1,51 @@
+#! /bin/sh
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test for bug reported in PR 2.
+# "make dist" fails for AC_OUTPUT(README.foo:templ/README.foo.in).
+#
+# == Report ==
+# When my AC_OUTPUT macro in configure.ac contains something
+# like the following (among the Makefiles)
+# README.foo:templ/README.foo.in
+# the generated dist target in the Makefile.in fails,
+# because DIST_COMMON will contain templ/README.foo.in
+# and the dist target will try to copy templ/README.foo.in
+# to the distribution directory before it creates a templ
+# subdirectory in the distribution directory.
+
+. ./defs || Exit 1
+
+# Please keep this underquoted and old-style.
+cat > configure.ac << 'END'
+AC_INIT
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_OUTPUT(README.foo:templ/README.foo.in Makefile)
+END
+
+: > Makefile.am
+
+mkdir templ
+: > templ/README.foo.in
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE distdir
+test -f nonesuch-nonesuch/templ/README.foo.in
+
+: