bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Confusing message when make starts in current directory


From: Paul Smith
Subject: Re: Confusing message when make starts in current directory
Date: Wed, 15 Dec 2021 16:38:41 -0500
User-agent: Evolution 3.36.5-0ubuntu1

On Wed, 2021-12-15 at 17:59 +0100, Andrea Monaco wrote:
> In my opinion, those messages should always come with a chdir.

Well, make can't know whether the previous make started in the same
directory or not, at least not reliably.

If you do something like the very common, and POSIX-compatible:

   subdir:
           cd subdir && $(MAKE)

rather than the GNU make-specific "$(MAKE) -C subdir", then it's not
make doing the chdir, the shell does it before make is ever invoked.

I guess make could provide its current directory to its child make in
some kind of environment variable, then the child make could compare it
and omit the message if they were the same.

But that seems like a lot of work for a relatively cosmetic issue.

Also, it would mean that the recursive counter would have holes; that
is it might go from "make[1]" to "make[4]" if the 2 and 3 recursions
were in the same directory.  I don't know why that would be an issue
but could be...

Cheers!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]