+2009-05-02 Bruno Haible <bruno@clisp.org>
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Recommend *-local hooks without commands, for extensibility.
+ * doc/automake.texi (Clean): Show how to write the clean-local
+ extension with separate phony target.
+ * tests/Makefile.am (clean-local-check): Practice what we preach
+ by marking this phony. For consistency, rename from ...
+ (check-clean-local): ... this.
+
2009-04-28 Eric Blake <ebb9@byu.net>
scripts: normalize all timestamps to UTC
-rm -rf testSubDir
@end example
+Since @command{make} allows only one set of rules for a given target,
+a more extensible way of writing this is to use a separate target
+listed as a dependency:
+
+@example
+clean-local: clean-local-check
+.PHONY: clean-local-check
+clean-local-check:
+ -rm -rf testSubDir
+@end example
+
As the GNU Standards aren't always explicit as to which files should
be removed by which rule, we've adopted a heuristic that we believe
was first formulated by Fran@,{c}ois Pinard:
# Each test case depends on defs, aclocal, and automake.
check_SCRIPTS = defs defs-p aclocal-$(APIVERSION) automake-$(APIVERSION)
-clean-local: check-clean-local
-
-check-clean-local:
+clean-local: clean-local-check
+.PHONY: clean-local-check
+clean-local-check:
-chmod -R u+rwx *.dir
-rm -rf defs-p *.dir
defs-p: defs Makefile.am
sed 's,^AM_INIT_AUTOMAKE$$,&([parallel-tests]),' < defs >$@
-clean-local: check-clean-local
-
-check-clean-local:
+clean-local: clean-local-check
+.PHONY: clean-local-check
+clean-local-check:
-chmod -R u+rwx *.dir
-rm -rf defs-p *.dir