Update of bug #62200 (project make): Status: None => Duplicate Open/Closed: Open => Closed
_______________________________________________________ Follow-up Comment #3: It's important to understand that the issue you originally described, where there's a "cp" directory, and the issue you actually provided a test case for, and for which Martin replied, where there's some random directory, are very very different. In the original issue, with a "cp" directory, GNU make used to get the right behavior (that is ignore the "cp" directory and continue searching the PATH and find the right "cp" program) up until GNU make 4.3. In GNU make 4.3 we started using a gnulib method to find programs on PATH, and there was a bug in it. That bug has been fixed in gnulib. If you rebuild your GNU make 4.3 with the latest gnulib, you won't see this problem. The issue that you actually provided, where make invokes a random directory name that is on the PATH, is very different: in this situation make will always report the "permission denied" error as Martin suggests and this is the correct behavior (or at least the behavior required by POSIX). That's because make will continue to search the path, discover there is actually no program with the random name, so it will assume you really wanted to run the directory it found and report that error. Basically, make should always behave "as if" you typed the recipe command line into your shell prompt. In your example, if you do that, you'll see: $ /bin/sh -c 'asdf' /bin/sh: 1: asdf: Permission denied and that's exactly what make tells you as well. For more details see bug #57962 _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?62200> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/