Re: make: warn about fallback from parallel to compat mode
"Simon J. Gerraty" <[email protected]> Mon, 2 Jun 2025 09:09:48 -0700
| Newsgroups | gmane.os.netbsd.devel.toolchain |
|---|---|
| Message-ID | <[email protected]> |
Christoph Badura <[email protected]> wrote: > On Sun, May 25, 2025 at 10:18:36AM -0700, Simon J. Gerraty wrote: > > Roland Illig <[email protected]> wrote: > > > The attached patch warns about cases like this. The warning is quite > > > verbose, but I didn't manage to make it shorter without sacrificing > > > understandability. > > > > Including .CURDIR is a good improvement. > > Looks to me like this is not at all that useful. See the log below from a > build I ran this afternoon. > > Maybe .PARSEDIR/.PARSEFILE would be more appropriate? The idea is that I'd > like to know which line in which makefile is the offending one. Referring > to random directories that don't even contain Makefiles is not actually > helpful. Note that the make instance reporting the issue has no clue about what makefile the parent was reading, and none of the makefiles it is reading (if any) are necessarily relevant. .CURDIR probably is the best clue available. > Also, wasn't the message supposed to get shortened? This turns out to be > quite spammy. Yes that was my initial reaction too. Given you should see it very rarely, I can live with it. A cryptic error that does nothing to help track down the origin is no help. A reference to a specific sub-section in make(1) would be a good option. Eg. something like? Errors Some errors or warnings reported by make require explaination. Rather than have make output voluminous descriptions, it can refer to this section of the manual. -J This is an internal flag passed in the environment variable MAKEFLAGS. It communicates the file descriptors for accessing the job token pipe. If in jobs mode, make finds that the descriptors referenced are not valid, it will drop to compatibility mode. Adding the -B option or setting .MAKE.MODE to `compat' lets make know it is supposed to be in compatibility mode and no warning will be issued. Then make could just give a warning like nbmake[2]: warning: internal option "-J" in "${.CURDIR}" refers to unopened file descriptors; falling back to compat mode. Refer to '-J' in make(1) Errors section.