threads / patch / 9346

patchWhen generating manpages, delete outdated targets first.

Subject: [PATCH] When generating manpages, delete outdated targets first.

## tl;dr

2 messages between Aug 1, 2007 and Aug 2, 2007. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

David Kastrup· Aug 1, 2007, 23:48 UTC · lore

This makes "make doc" work even if you made "sudo make doc" previously by mistake. Apparently an oversight: the other targets did this already.

Signed-off-by: David Kastrup <dak@gnu.org>
---
 Documentation/Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Show changes to Documentation/Makefile +1 −0
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 3bc5357..a186843 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -120,6 +120,7 @@ clean:
 	mv $@+ $@
 
 %.1 %.5 %.7 : %.xml
+	$(RM) $@+ $@
 	xmlto -m callouts.xsl man $<
 
 %.xml : %.txt
-- 
1.5.3.rc2.167.gbef44-dirty
Junio C Hamano· Aug 2, 2007, 00:53 UTC · re: David Kastrup · lore

Re: [PATCH] When generating manpages, delete outdated targets first.

David Kastrup <dak@gnu.org> writes:
Show 20 quoted lines
> This makes "make doc" work even if you made "sudo make doc" previously
> by mistake.  Apparently an oversight: the other targets did this already.
>
> Signed-off-by: David Kastrup <dak@gnu.org>
> ---
>  Documentation/Makefile |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/Makefile b/Documentation/Makefile
> index 3bc5357..a186843 100644
> --- a/Documentation/Makefile
> +++ b/Documentation/Makefile
> @@ -120,6 +120,7 @@ clean:
>  	mv $@+ $@
>  
>  %.1 %.5 %.7 : %.xml
> +	$(RM) $@+ $@
>  	xmlto -m callouts.xsl man $<
>  
>  %.xml : %.txt

I think "rm" makes sense; the call to xmlto in this Makefile has been this way from day one, it seems ;-).

The build rule for this target does not use "generate to temporary $@+ and after that is successful mv to the final $@" pattern, so we do not have to remove $@+ in this target, though.

Thanks.

← back to recent threads