From owner-freebsd-bugs Tue Apr 6 12: 2: 1 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 146BE14F92 for ; Tue, 6 Apr 1999 12:01:58 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.2/8.9.2) id MAA20262; Tue, 6 Apr 1999 12:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from isbalham.ist.co.uk (isbalham.ist.co.uk [192.31.26.1]) by hub.freebsd.org (Postfix) with ESMTP id 6790515579 for ; Tue, 6 Apr 1999 11:52:39 -0700 (PDT) (envelope-from rb@gid.co.uk) Received: from gid.co.uk (uucp@localhost) by isbalham.ist.co.uk (8.8.7/8.8.7) with UUCP id TAA01040 for freebsd.org!FreeBSD-gnats-submit; Tue, 6 Apr 1999 19:50:40 +0100 (BST) (envelope-from rb@gid.co.uk) Message-Id: <7998.199904061835@seagoon.gid.co.uk> Date: Tue, 6 Apr 1999 19:35:06 +0100 (BST) From: Bob Bishop Reply-To: rb@gid.co.uk To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/10985: make .NOTPARALLEL special target is broken [PATCH] Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 10985 >Category: bin >Synopsis: make .NOTPARALLEL special target is broken [PATCH] >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Apr 6 12:00:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Bob Bishop >Release: FreeBSD 4.0-CURRENT i386 >Organization: GID ltd >Environment: -current as of Tue Apr 6 04:02:32 BST 1999 Probably affects -STABLE too >Description: .NOTPARALLEL is supposed to "Disable parallel mode". However, as implemented it only suppresses parallel remote jobs and won't stop an SMP box running parallel local jobs in the presence of -jn. >How-To-Repeat: `make -jn -dj' with and without .NOTPARALLEL: in the Makefile >Fix: Not as easy as it appears, I suspect. Complications arise because make has -B turned on by default unless -jn is in use (which certainly violated my POLA). So what to do? Should .NOTPARALLEL turn -B back on as if there was no -jn in the first place? The following patch does so, but it's arguable. Index: src/usr.bin/make/main.c =================================================================== RCS file: /CVSROOT/src/usr.bin/make/main.c,v retrieving revision 1.30 diff -c -r1.30 main.c *** main.c 1999/03/01 06:01:05 1.30 --- main.c 1999/04/06 12:59:59 *************** *** 123,129 **** static Lst variables; /* list of variables to print */ int maxJobs; /* -j argument */ static Boolean forceJobs; /* -j argument given */ ! static int maxLocal; /* -L argument */ Boolean compatMake; /* -B argument */ Boolean debug; /* -d flag */ Boolean noExecute; /* -n flag */ --- 123,129 ---- static Lst variables; /* list of variables to print */ int maxJobs; /* -j argument */ static Boolean forceJobs; /* -j argument given */ ! int maxLocal; /* -L argument */ Boolean compatMake; /* -B argument */ Boolean debug; /* -d flag */ Boolean noExecute; /* -n flag */ Index: src/usr.bin/make/parse.c =================================================================== RCS file: /CVSROOT/src/usr.bin/make/parse.c,v retrieving revision 1.20 diff -c -r1.20 parse.c *** parse.c 1999/01/08 18:37:34 1.20 --- parse.c 1999/04/06 16:34:14 *************** *** 874,881 **** --- 874,884 ---- case NotParallel: { extern int maxJobs; + extern int maxLocal; maxJobs = 1; + maxLocal = 1; + compatMake = 1; /* would have been turned on if no -j */ break; } case SingleShell: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message