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

Re: [PATCH] Documentation/Makefile: fix lint-docs mkdir dependency

From
Jeff King <peff@peff.net>
Date
Oct 28, 2021, 17:06 UTC
Message-ID
<YXrYh9aPA8csq+UQ@coredump.intra.peff.net>
In-Reply-To
<xmqqzgqtrtd1.fsf@gitster.g>
On Thu, Oct 28, 2021 at 09:45:14AM -0700, Junio C Hamano wrote:
Show 21 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > There's an in-between, I'd think, where the many "foo/bar/baz/$@"
> > targets have an order-dependency on "foo/bar/baz", and that single rule
> > uses "mkdir -p" to create all of the directories.
> >
> > It doesn't buy us much simplification in this case, though, because
> > various rules independently depend on .build/gitlink/lint-docs/howto,
> > .built/gitlink/lint-docs, and .build/gitlink, etc. So we still end up
> > with roughly the same number of rules, though the directory rules don't
> > have to depend on one another.
> >
> > It also means that these "mkdir -p" may race with each other, though in
> > general I'd hope that most "mkdir" implements could handle this.
> >
> > Something like this works, I think:
> 
> Hmph, what I actually meant was to make sure that the recipe to
> create the files to have "mkdir -p $(basename $@)" in front, instead
> of having "we need to prepare the containing directory in order to
> have a file there" in the makefile.

Yeah, I agree that's simpler, and is what Ævar showed. But it is slower, because we run a bunch of redundant "mkdir -p" calls, one per file.

-Peff
Previous: Junio C HamanoNext: Ævar Arnfjörð Bjarmason
Message 8 of 9 in “Documentation/Makefile: fix lint-docs mkdir dependency”
  1. Documentation/Makefile: fix lint-docs mkdir dependencyJeff King, Oct 26, 2021
  2. Ævar Arnfjörð BjarmasonOct 26, 2021
  3. Jeff KingOct 26, 2021
  4. Junio C HamanoOct 28, 2021
  5. Ævar Arnfjörð BjarmasonOct 28, 2021
  6. Jeff KingOct 28, 2021
  7. Junio C HamanoOct 28, 2021
  8. Jeff KingOct 28, 2021
  9. Ævar Arnfjörð BjarmasonOct 28, 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.