Re: [PATCH] Documentation/Makefile: fix lint-docs mkdir dependency
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 28, 2021, 16:45 UTC
- Message-ID
- <xmqqzgqtrtd1.fsf@gitster.g>
- In-Reply-To
- <YXq1OE/p5VoPR3WZ@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 14 quoted lines
> 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.
> ... > At any rate, I don't think there's any urgency on that.
Sure. I think I've picked up the one at the start of this thread already, so we should be good.
Thanks.