Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Nov 2004 12:46:32 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        marcel@xcllnt.net
Subject:   Re: [TEST] make -j patch [take 2]
Message-ID:  <200411122046.iACKkWXJ076322@apollo.backplane.com>
References:  <20041112195030.GA63153@ns1.xcllnt.net> <12448.1100289673@critter.freebsd.dk> <20041112.132531.87764635.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
    I'm probably crazy to jump into this but... guys, I have to say that
    this sounds like a great feature (and keep in mind that Poul and I tend
    not to get along very well).   It would really be silly to rip it out
    because two people can't agree on a simple override mechanism to make
    'make universe' operate in a more parallel manner.

    I suggest simply treating an empty MAKE_JOBS_FIFO env variable the same
    as a non-existant one, or perhaps also allowing for a keyword to make
    things more obvious, So:

Index: job.c
===================================================================
RCS file: /FreeBSD/FreeBSD-CVS/src/usr.bin/make/job.c,v
retrieving revision 1.57
diff -u -r1.57 job.c
--- job.c	12 Nov 2004 08:58:06 -0000	1.57
+++ job.c	12 Nov 2004 20:43:07 -0000
@@ -2120,7 +2120,7 @@
     stoppedJobs = Lst_Init(FALSE);
     env = getenv("MAKE_JOBS_FIFO");
 
-    if (env == NULL && maxproc > 1) {
+    if ((env == NULL || *env == 0 || strcmp(env, "restart") == 0) && maxproc > 1) {
 	/*
 	 * We did not find the environment variable so we are the leader.
 	 * Create the fifo, open it, write one char per allowed job into


    And then compromise on the make universe target by running the 
    sub-make buildworlds with an empty MAKE_JOBS_FIFO.  e.g
    MAKE_JOBS_FIFO=restart ${MAKE} ...  in just one place in the Makefile.
    Seems reasonable to me!

    With such an obvious solution available this argument really shouldn't
    have happened.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411122046.iACKkWXJ076322>