Re: make: warn about fallback from parallel to compat mode
"Simon J. Gerraty" <[email protected]> Sun, 25 May 2025 10:18:36 -0700
| Newsgroups | gmane.os.netbsd.devel.toolchain |
|---|---|
| Message-ID | <[email protected]> |
Roland Illig <[email protected]> wrote: > broken-target: > ${MAKEDIRTARGET} subdir subdir-target1 subdir-target2 > > The reason is that the target (indirectly) runs a sub-make, but the > sub-make does not coordinate the number of running jobs with the main > make process. This may lead to more than the desired jobs running in > parallel, or to only a single job. > > The cause for this is that the target is neither marked with ".MAKE" nor > does one of its unexpanded commands contain the magic word "make" or the > expression "${MAKE}". > > 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. FWIW I think it is sufficient to simply recommend adding .MAKE, trying to explain, tricks like adding ${: make} better belongs in the man page - see recent elaboration on meta mode ;-) > +make: warning: internal option "-J 31,32" in <curdir> refers to an unopened file descriptor; falling back to compat mode. > + If the target is supposed to recurse even with -n, add the .MAKE pseudo-source to the target. ie. make that just: make: warning: internal option "-J 31,32" in <curdir> refers to \ unopened descriptors; add pseudo-source .MAKE to the target to avoid this. --sjg