Re: Minor Unexpected Output
Paul Smith <[email protected]> Mon, 31 Jan 2022 16:43:55 -0500
| Newsgroups | gmane.comp.gnu.make.devel |
|---|---|
| Organization | GNU's Not UNIX! |
| Message-ID | <[email protected]> |
On Mon, 2022-01-31 at 12:05 -0800, Jon Forrest wrote: > % gmake -C /etc -C /tmp > gmake: Entering directory '/tmp' > gmake: *** No targets specified and no makefile found. Stop. > gmake: Leaving directory '/tmp' > > I have no makefiles in /etc or /tmp. This was just a test. > > Why isn't a similar message printed about /etc? Because we never actually invoke any make operations. The command line you show is essentially identical to: cd /etc && cd /tmp && make Make doesn't print any "enter/exit" messages until it begins to read makefiles, etc. such that a user (or utility) that is interpreting the output will know what directory we are in; the directory change output exists to allow output that shows relative paths to be interpreted correctly (e.g., the Emacs compilation buffer needs to know the path to find source files in error and warning messages if they don't contain FQ paths). The intermediate steps taken to get to that directory aren't really relevant.