Thread (3 messages) flat view 3 messages, 3 authors, 2021-10-28

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

From: Junio C Hamano <hidden>
Date: 2021-10-28 16:45:21

Possibly related (same subject, not in this thread)

Jeff King [off-list ref] 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.
...
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help