[Midnightbsd-cvs] src [7539] trunk/contrib/bmake: update bmake configuration

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Thu Apr 14 21:38:49 EDT 2016


Revision: 7539
          http://svnweb.midnightbsd.org/src/?rev=7539
Author:   laffer1
Date:     2016-04-14 21:38:49 -0400 (Thu, 14 Apr 2016)
Log Message:
-----------
update bmake configuration

Modified Paths:
--------------
    trunk/contrib/bmake/job.c
    trunk/contrib/bmake/make.1
    trunk/contrib/bmake/var.c

Modified: trunk/contrib/bmake/job.c
===================================================================
--- trunk/contrib/bmake/job.c	2016-04-15 01:37:43 UTC (rev 7538)
+++ trunk/contrib/bmake/job.c	2016-04-15 01:38:49 UTC (rev 7539)
@@ -172,6 +172,22 @@
 # define STATIC static
 
 /*
+ * FreeBSD: traditionally .MAKE is not required to
+ * pass jobs queue to sub-makes.
+ * Use .MAKE.ALWAYS_PASS_JOB_QUEUE=no to disable.
+ */
+#define MAKE_ALWAYS_PASS_JOB_QUEUE ".MAKE.ALWAYS_PASS_JOB_QUEUE"
+static int Always_pass_job_queue = TRUE;
+/*
+ * FreeBSD: aborting entire parallel make isn't always
+ * desired. When doing tinderbox for example, failure of
+ * one architecture should not stop all.
+ * We still want to bail on interrupt though.
+ */
+#define MAKE_JOB_ERROR_TOKEN "MAKE_JOB_ERROR_TOKEN"
+static int Job_error_token = TRUE;
+
+/*
  * error handling variables
  */
 static int     	errors = 0;	    /* number of errors reported */
@@ -1360,7 +1376,7 @@
 	(void)fcntl(0, F_SETFD, 0);
 	(void)lseek(0, (off_t)0, SEEK_SET);
 
-	if (job->node->type & OP_MAKE) {
+	if (Always_pass_job_queue || (job->node->type & OP_MAKE)) {
 		/*
 		 * Pass job token pipe to submakes.
 		 */
@@ -2226,6 +2242,12 @@
 
     lastNode =	  NULL;
 
+    Always_pass_job_queue = getBoolean(MAKE_ALWAYS_PASS_JOB_QUEUE,
+				       Always_pass_job_queue);
+
+    Job_error_token = getBoolean(MAKE_JOB_ERROR_TOKEN, Job_error_token);
+
+
     /*
      * There is a non-zero chance that we already have children.
      * eg after 'make -f- <<EOF'
@@ -2821,6 +2843,12 @@
 {
     char tok = JOB_TOKENS[aborting], tok1;
 
+    if (!Job_error_token && aborting == ABORT_ERROR) {
+	if (jobTokensRunning == 0)
+	    return;
+	tok = '+';			/* no error token */
+    }
+
     /* If we are depositing an error token flush everything else */
     while (tok != '+' && read(tokenWaitJob.inPipe, &tok1, 1) == 1)
 	continue;
@@ -2827,7 +2855,7 @@
 
     if (DEBUG(JOB))
 	fprintf(debug_file, "(%d) aborting %d, deposit token %c\n",
-	    getpid(), aborting, JOB_TOKENS[aborting]);
+	    getpid(), aborting, tok);
     while (write(tokenWaitJob.outPipe, &tok, 1) == -1 && errno == EAGAIN)
 	continue;
 }

Modified: trunk/contrib/bmake/make.1
===================================================================
--- trunk/contrib/bmake/make.1	2016-04-15 01:37:43 UTC (rev 7538)
+++ trunk/contrib/bmake/make.1	2016-04-15 01:38:49 UTC (rev 7539)
@@ -725,6 +725,17 @@
 because it is more compatible with other versions of
 .Nm
 and cannot be confused with the special target with the same name.
+.It Va .MAKE.ALWAYS_PASS_JOB_QUEUE
+Tells
+.Nm
+whether to pass the descriptors of the job token queue
+even if the target is not tagged with
+.Ic .MAKE
+The default is 
+.Ql Pa yes
+for backwards compatability with
+.Fx 9.0
+and earlier.
 .It Va .MAKE.DEPENDFILE
 Names the makefile (default
 .Ql Pa .depend )

Modified: trunk/contrib/bmake/var.c
===================================================================
--- trunk/contrib/bmake/var.c	2016-04-15 01:37:43 UTC (rev 7538)
+++ trunk/contrib/bmake/var.c	2016-04-15 01:38:49 UTC (rev 7539)
@@ -979,7 +979,8 @@
 
 	Var_Append(MAKEOVERRIDES, name, VAR_GLOBAL);
     }
-	
+
+
  out:
     if (expanded_name != NULL)
 	free(expanded_name);



More information about the Midnightbsd-cvs mailing list