git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 3/5] doc: remove unnecessary rm instances

From
Jeff King <peff@peff.net>
Date
May 15, 2021, 09:24 UTC
Message-ID
<YJ+TQiYVgocUBQRV@coredump.intra.peff.net>
In-Reply-To
<20210514115631.503276-4-felipe.contreras@gmail.com>
On Fri, May 14, 2021 at 06:56:29AM -0500, Felipe Contreras wrote:
Show 8 quoted lines
> Commits 50cff52f1a (When generating manpages, delete outdated targets
> first., 2007-08-02) and f9286765b2 (Documentation/Makefile: remove
> cmd-list.made before redirecting to it., 2007-08-06) created these rm
> instances for a very rare corner-case: building as root by mistake.
> 
> It's odd to have workarounds here, but nowhere else in the Makefile--
> which already fails in this stuation, starting from
> Documentation/technical/.
Aren't there tons more that you end up removing in the next patch? E.g.:
   doc.dep : $(docdep_prereqs) $(DOC_DEP_TXT) build-docdep.perl
  -       $(QUIET_GEN)$(RM) $@+ $@ && \
  -       $(PERL_PATH) ./build-docdep.perl >$@+ $(QUIET_STDERR) && \
  -       mv $@+ $@
  +       $(QUIET_GEN)$(PERL_PATH) ./build-docdep.perl >$@ $(QUIET_STDERR)

That does differ in that it removes $@+, too, but the premise is the same (we know that $@+ could not be a problem, as we're about to clobber it anyway).

I'm OK with getting rid of all of them, but it seems like it ought to be happening all in this patch.

(And in general the rest of the series looks OK to me).
-Peff
Previous: Felipe ContrerasNext: Felipe Contreras
Message 5 of 11 in “doc: asciidoc cleanups”
  1. 0/5 doc: asciidoc cleanupsFelipe Contreras, May 14, 2021
  2. 1/5 doc: refactor common asciidoc dependenciesFelipe Contreras, May 14, 2021
  3. 2/5 doc: improve asciidoc dependenciesFelipe Contreras, May 14, 2021
  4. 3/5 doc: remove unnecessary rm instancesFelipe Contreras, May 14, 2021
  5. Jeff KingMay 15, 2021
  6. Felipe ContrerasMay 15, 2021
  7. Jeff KingMay 17, 2021
  8. Felipe ContrerasMay 17, 2021
  9. Jeff KingMay 17, 2021
  10. 4/5 doc: simplify Makefile using .DELETE_ON_ERRORFelipe Contreras, May 14, 2021
  11. 5/5 doc: avoid using rm directlyFelipe Contreras, May 14, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.