diff mbox series

[5/8] doc: remove redundant rm

Message ID 20210512222803.508446-6-felipe.contreras@gmail.com (mailing list archive)
State Superseded
Headers show
Series doc: asciidoc cleanups | expand

Commit Message

Felipe Contreras May 12, 2021, 10:28 p.m. UTC
It's not clear what it was supposed to achieve.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Documentation/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Ævar Arnfjörð Bjarmason May 13, 2021, 3:22 p.m. UTC | #1
On Wed, May 12 2021, Felipe Contreras wrote:

> It's not clear what it was supposed to achieve.

It seems this used to make sense around 7b8a74f39cb (Documentation:
Replace @@GIT_VERSION@@ in documentation, 2007-03-25), but at some point
(I didn't look further) we refactored that and kept the "rm".
Felipe Contreras May 13, 2021, 6:58 p.m. UTC | #2
Ævar Arnfjörð Bjarmason wrote:
> On Wed, May 12 2021, Felipe Contreras wrote:
> 
> > It's not clear what it was supposed to achieve.
> 
> It seems this used to make sense around 7b8a74f39cb (Documentation:
> Replace @@GIT_VERSION@@ in documentation, 2007-03-25), but at some point
> (I didn't look further) we refactored that and kept the "rm".

Actually it came later: 50cff52f1a (When generating manpages, delete
outdated targets first., 2007-08-02).

I'm not sure we should complicate the Makefile just because somebody
made the mistake of doing 'sudo make doc' a long time. Especially since
other rules don't have this.

  sudo make doc
  touch GIT-ASCIIDOCFLAGS
  make doc

Fails here already.

  asciidoc: FAILED: api-merge.txt: line 2: unexpected error:
  asciidoc: ------------------------------------------------------------
  Traceback (most recent call last):
    File "/usr/bin/asciidoc", line 6247, in asciidoc
      writer.open(outfile, reader.bom)
    File "/usr/bin/asciidoc", line 4633, in open
      self.f = open(fname, 'w+', encoding='utf-8', newline="")
  PermissionError: [Errno 13] Permission denied: '.../Documentation/technical/api-merge.html'
diff mbox series

Patch

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 956cfabadd..d02bd848e8 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -366,8 +366,7 @@  manpage-base-url.xsl: manpage-base-url.xsl.in
 	$(QUIET_GEN)sed "s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|" $< > $@
 
 %.1 %.5 %.7 : %.xml manpage-base-url.xsl $(wildcard manpage*.xsl)
-	$(QUIET_XMLTO)$(RM) $@ && \
-	$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
+	$(QUIET_XMLTO)$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
 
 %.xml : %.txt asciidoc.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS
 	$(QUIET_ASCIIDOC)$(TXT_TO_XML) -d manpage -o $@ $<