summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2013-12-26 19:31:15 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-12-26 19:31:15 +0100
commitf0a7083afefe98aa7aecf4ece592915395947631 (patch)
tree4595d63ddf73b82d96652297847cebc66e4ddc2f /t
parentc020f1ef664e1ec835d856ec5485769d0a9a7386 (diff)
downloadautomake-f0a7083afefe98aa7aecf4ece592915395947631.tar.gz
Allow user to extend .PRECIOUS target
References: <http://lists.freedesktop.org/archives/systemd-devel/2013-July/012155.html> <http://lists.gnu.org/archive/html/automake/2013-07/msg00011.html> * bin/automake.in: Adjust to ensure we handle '.PRECIOUS' the same way we do for '.PHONY' and '.MAKE'. * lib/Automake/Rule.pm: Likewise. * t/precious.sh: New test. * t/list-of-tests.mk: Add it. * t/phony.sh: Enhance a little while at it. * NEWS: Update. * THANKS: Likewise. Reported-by: Holger Hans Peter Freyther <holger@freyther.de> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't')
-rw-r--r--t/list-of-tests.mk1
-rw-r--r--t/phony.sh1
-rw-r--r--t/precious.sh32
3 files changed, 34 insertions, 0 deletions
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 54afd8f56..a9694d816 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -838,6 +838,7 @@ t/percent.sh \
t/percent2.sh \
t/per-target-flags.sh \
t/phony.sh \
+t/precious.sh \
t/pluseq.sh \
t/pluseq2.sh \
t/pluseq3.sh \
diff --git a/t/phony.sh b/t/phony.sh
index dd0c54a3f..a63277618 100644
--- a/t/phony.sh
+++ b/t/phony.sh
@@ -26,6 +26,7 @@ EOF
$ACLOCAL
$AUTOMAKE
+$FGREP '.PHONY:' Makefile.in # For debugging.
test $($FGREP -c '.PHONY:' Makefile.in) -eq 3
:
diff --git a/t/precious.sh b/t/precious.sh
new file mode 100644
index 000000000..875030530
--- /dev/null
+++ b/t/precious.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+# Copyright (C) 2013 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/>.
+
+# Make sure .PRECIOUS can be extended by the user, and can be given
+# dependencies several times.
+
+. test-init.sh
+
+cat >Makefile.am << 'EOF'
+.PRECIOUS: foo
+.PRECIOUS: bar
+EOF
+
+$ACLOCAL
+$AUTOMAKE
+$FGREP '.PRECIOUS:' Makefile.in # For debugging.
+test $($FGREP -c '.PRECIOUS:' Makefile.in) -eq 3
+
+: