From 2c0a22f9c7e05fac0c33e1e241bfc6e2d8df210b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 8 Jan 2023 17:56:40 -0800 Subject: doc: overriding targets doesn't mean third-party Makefiles. Fixes automake bug https://bugs.gnu.org/60607. * doc/automake.texi (dvi and distcheck): simply show dvi: as an example of a do-nothing Makefile (xref to Extending), instead of cross-referencing the complicated method in Third-Party Makefiles. (Clean, Extending): wording tweaks. --- doc/automake.texi | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/doc/automake.texi b/doc/automake.texi index 813674214..58156d9bf 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -8540,7 +8540,7 @@ be defined to specify additional files to clean. These variables are @trindex maintainer-clean-local When cleaning involves more than deleting some hard-coded list of files, it is also possible to supplement the cleaning rules with your -own commands. Simply define a rule for any of the +own commands: define a rule for any of the @code{mostlyclean-local}, @code{clean-local}, @code{distclean-local}, or @code{maintainer-clean-local} targets (@pxref{Extending}). A common case is deleting a directory, for instance, a directory created by the @@ -8885,8 +8885,16 @@ example, AM_DISTCHECK_DVI_TARGET = pdf @end example -To make @code{dvi} into a do-nothing target, see the example for -@code{EMPTY_AUTOMAKE_TARGETS} in @ref{Third-Party Makefiles}. +To make @code{dvi} into a do-nothing target, add it to your +@file{Makefile.am} with no commands: + +@example +dvi: +@end example + +@noindent +As usual with Automake, your user-defined target will override +Automake's target (@pxref{Extending}). @trindex distcheck-hook @subheading distcheck-hook @@ -11509,17 +11517,17 @@ As far as rules are concerned, a user-defined rule overrides any @cindex overriding semantics @cindex rules, overriding -These overriding semantics make it possible to fine tune some default +These overriding semantics make it possible to fine-tune some default settings of Automake, or replace some of its rules. Overriding Automake rules is often inadvisable, particularly in the topmost directory of a package with subdirectories. The @option{-Woverride} -option (@pxref{automake Invocation}) comes in handy to catch overridden -definitions. +option (@pxref{automake Invocation}) comes in handy to catch definitions +overridden by accident. -Note that Automake does not make any distinction between rules with -commands and rules that only specify dependencies. So it is not -possible to append new dependencies to an @command{automake}-defined -target without redefining the entire rule. +Automake does not make any distinction between rules with commands and +rules that only specify dependencies. So it is not possible to append +new dependencies to an @command{automake}-defined target without +redefining the entire rule. @cindex @option{-local} targets @cindex local targets -- cgit v1.2.1