Minor Unexpected Output

Jon Forrest <[email protected]> Mon, 31 Jan 2022 12:05:28 -0800
Newsgroups gmane.comp.gnu.make.devel
Message-ID <[email protected]>
GNU Make 4.3.90
Built for x86_64-pc-linux-gnu (actually Fedora 35)

% 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? I would have
expected the output to be

gmake: Entering directory '/etc
gmake: *** No targets specified and no makefile found.  Stop.
gmake: Leaving directory '/etc
gmake: Entering directory '/tmp'
gmake: *** No targets specified and no makefile found.  Stop.
gmake: Leaving directory '/tmp'

The first -C argument is being seen because if I supply
a non-existent directory I'm properly notified, e.g.

% gmake -C /foo -C /bar
gmake: Entering directory '/home/jonf/src/gmake/debug'
gmake: *** /foo: No such file or directory.  Stop.
gmake: Leaving directory '/home/jonf/src/gmake/debug'

This isn't a big deal, it's just unexpected.

Thanks,
Jon