[bug #61328] elide the distinction between "dir" and "dir/"

2021-10-10 Thread David Boyce
URL: Summary: elide the distinction between "dir" and "dir/" Project: make Submitted by: boyski Submitted on: Sun 10 Oct 2021 11:01:25 PM UTC Severity: 3 - Normal Item G

[bug #61328] elide the distinction between "dir" and "dir/"

2021-10-10 Thread Dmitry Goncharov
Follow-up Comment #1, bug #61328 (project make): > However, since "foo/" is illegal for anything but a directory it seems harmless to assume directory. This special case could also be made to apply exclusively to order-only prerequisites which is where directory dependencies should be anyway. It

[bug #61328] elide the distinction between "dir" and "dir/"

2021-10-11 Thread David Boyce
Follow-up Comment #2, bug #61328 (project make): > Do you mean that make assumes that any order-only prerequisite is a directory and compares 'foo' as equal to 'foo/', as long as 'foo' is order-only? That's backward. Make should not assume O-O prereqs are directories; my argument is that it can a

[bug #61328] elide the distinction between "dir" and "dir/"

2021-10-11 Thread Dmitry Goncharov
Follow-up Comment #3, bug #61328 (project make): > my argument is that it can assume paths ending in the path separator are directories since they can't be anything else: This assumption looks reasonable. What change in behavior do you think is appropriate with this assumption? _

[bug #61328] elide the distinction between "dir" and "dir/"

2021-10-11 Thread Paul D. Smith
Follow-up Comment #4, bug #61328 (project make): > The obvious concern is that we don't know a priori whether a target is a directory or file. Why is this a concern? Unlike other tools make doesn't really care if a prerequisite (or target) is a file or a directory. What different behavior could

[bug #61328] elide the distinction between "dir" and "dir/"

2021-10-11 Thread David Boyce
Follow-up Comment #5, bug #61328 (project make): > Why is this a concern? I may have phrased it wrong. I just meant to bring up "a question that might reasonably be raised" and rebut it in advance. > Unlike other tools make doesn't really care if a prerequisite is a file or a directory. My unde

[bug #61328] elide the distinction between "dir" and "dir/"

2021-10-11 Thread Paul D. Smith
Follow-up Comment #6, bug #61328 (project make): Well, make isn't doing any stat: it's just comparing text. And in fact, it can't use stat because there's an excellent chance that the filesystem object being discussed doesn't even exist yet. I guess I'm a little confused as to what the concern i

[bug #61328] elide the distinction between "dir" and "dir/"

2021-10-12 Thread David Boyce
Follow-up Comment #7, bug #61328 (project make): I don't think I said exactly "directories should only/always be order-only" (so it shouldn't be in quotes), but I do think the value of this enhancement would be primarily in order-only directory creation logic. However, if you envision it as being