summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-10-06 18:16:14 -0700
committerKarl Berry <karl@freefriends.org>2020-10-06 18:16:14 -0700
commitdbc1c9e775b0ce78c3cbb912d5e9934f8a99965a (patch)
treea0f28b286e49b91df8d42b0e8830e7e20bdf296d /t
parente0d69cc7749622d10de223baca048467de7b37c1 (diff)
downloadautomake-dbc1c9e775b0ce78c3cbb912d5e9934f8a99965a.tar.gz
automake: install-exec did not depend on $(BUILT_SOURCES).
This change fixes https://bugs.gnu.org/43683. * lib/am/install.am (install-exec): %maybe_BUILT_SOURCES% dependency, twice. Basic patch from madmurphy (tiny change), message#8. (.MAKE) [maybe_BUILT_SOURCES]: depend on install-exec. * NEWS: mention it. * doc/automake.texi (Sources): mention this (also that make dist depends on $(BUILT_SOURCES)). * t/built-sources-install-exec.sh: new test. * t/list-of-tests.mk (handwritten_TESTS): add it. * t/built-sources-install.sh: typo. * t/built-sources-check.sh: typo.
Diffstat (limited to 't')
-rw-r--r--t/built-sources-check.sh2
-rwxr-xr-xt/built-sources-install-exec.sh41
-rw-r--r--t/built-sources-install.sh2
-rw-r--r--t/list-of-tests.mk1
4 files changed, 44 insertions, 2 deletions
diff --git a/t/built-sources-check.sh b/t/built-sources-check.sh
index 2b73e39ed..54adf0c0e 100644
--- a/t/built-sources-check.sh
+++ b/t/built-sources-check.sh
@@ -44,7 +44,7 @@ BUILT_SOURCES = command2.inc
check_SCRIPTS = echo.sh
echo.sh:
## The next line ensures that command1.inc has been built before
-## recurring into the subdir.
+## recursing into the subdir.
test -f ../command1.inc
(echo '#! /bin/sh'; cat command2.inc) > $@
chmod +x $@
diff --git a/t/built-sources-install-exec.sh b/t/built-sources-install-exec.sh
new file mode 100755
index 000000000..47c7f1ae9
--- /dev/null
+++ b/t/built-sources-install-exec.sh
@@ -0,0 +1,41 @@
+#! /bin/sh
+# Copyright (C) 2002-2020 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 <https://www.gnu.org/licenses/>.
+
+# Test that 'install-exec:' honors $(BUILT_SOURCES);
+# https://bugs.gnu.org/43683.
+
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+BUILT_SOURCES = built1
+built1:
+ echo ok > $@
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure --prefix "$(pwd)/inst"
+
+# Make sure this file is rebuilt by make install-exec.
+$MAKE install-exec
+test -f built1
+
+:
diff --git a/t/built-sources-install.sh b/t/built-sources-install.sh
index f4bd57f61..f5109a4da 100644
--- a/t/built-sources-install.sh
+++ b/t/built-sources-install.sh
@@ -49,7 +49,7 @@ cat > dir/Makefile.am << 'END'
BUILT_SOURCES = built2
built2:
## The next line ensures that command1.inc has been built before
-## recurring into the subdir.
+## recursing into the subdir.
cp ../built1 $@
CLEANFILES = built2
END
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 3bd121110..f44eed0e5 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -203,6 +203,7 @@ t/built-sources-check.sh \
t/built-sources-cond.sh \
t/built-sources-fork-bomb.sh \
t/built-sources-install.sh \
+t/built-sources-install-exec.sh \
t/built-sources-subdir.sh \
t/built-sources.sh \
t/candist.sh \