Date: Fri, 5 Jul 2013 13:36:05 -0700 From: "Simon J. Gerraty" <sjg@juniper.net> To: Tijl Coosemans <tijl@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r251422 - in head: contrib/bmake usr.bin/bmake Message-ID: <20130705203605.5CC2A58097@chaos.jnpr.net> In-Reply-To: <51D6EF0D.3050506@FreeBSD.org> References: <201306051612.r55GCpPG050941@svn.freebsd.org> <51C8967F.2060905@FreeBSD.org> <51D6EF0D.3050506@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 5 Jul 2013 18:06:37 +0200, Tijl Coosemans writes: >> I've been noticing that bmake doesn't run parallel jobs as like fmake. No it doesn't. fmake exports the name of a FIFO, which any submake can open. bmake passes open descriptors to a pipe, but only if the target is flagged .MAKE. .MAKE's other property is to run the target even when -n is given. This feature, while documented in fmake's man page doesn't work. >> I've attached a Makefile that I think shows what's going wrong. Hmm I can't see the makefile, but if you add .MAKE to the target which run's the sub-makes you will see things work as expected. >> Bmake outputs the target name in -j mode (e.g. "--- all ---"), but >> there's no "--- sub_1 ---" and "--- sub_3 ---" which suggests -j isn't Because the -J flag although passed, the descriptors were closed, this cause the sub-make to ignore -j and -J not to be added to .MAKEFLAGS >> I suspect the descriptors for the job server have to remain open so >> submakes can pick them up. At least, when I comment out the two fcntl Correct, and if the target is flagged .MAKE, the close-on-exec flag will be cleared in the child. >Now that I've taken a closer look at the code it seems bmake requires >targets that run make to be marked with .MAKE. Several targets in >Makefile and Makefile.inc1 already have this, but some don't, such as >bootstrap-tools. Can this be added there? I expect so. I was being somewhat cautious. As noted above .MAKE is also supposed to cause the target to run even when -n is given. I noted that some targets which might otherwise warrant .MAKE also did things which might not be a good idea with -n. FWIW make -N would supresses the behavior of .MAKE, but few are likely to have noted that. I don't see any reason to not add .MAKE to bootstrap-tools.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130705203605.5CC2A58097>