From owner-freebsd-arch@FreeBSD.ORG Sun Nov 26 12:05:01 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C75916A500 for ; Sun, 26 Nov 2006 12:05:01 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE9CF43DAA for ; Sun, 26 Nov 2006 12:03:54 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id kAQC4iRZ062118; Sun, 26 Nov 2006 15:04:44 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id kAQC4ciY062107; Sun, 26 Nov 2006 15:04:38 +0300 (MSK) (envelope-from yar) Date: Sun, 26 Nov 2006 15:04:38 +0300 From: Yar Tikhiy To: John Birrell Message-ID: <20061126120437.GA60959@comp.chem.msu.su> References: <20061123232035.GA56985@what-creek.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061123232035.GA56985@what-creek.com> User-Agent: Mutt/1.5.9i Cc: arch@freebsd.org Subject: Re: Proposed change to make -j X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Nov 2006 12:05:01 -0000 On Thu, Nov 23, 2006 at 11:20:35PM +0000, John Birrell wrote: > Currently 'make -j' reports an error if the number of jobs > isn't specified. > > I'd like to change make(1) to treat -j (without a number) as > meaning "set the number of jobs to the number of processors". > > On sun4v, each processor isn't too powerful and system performance > is only decent when you use all the processors - 32 in my case. > > I've been working on a parallel 'make release' process which > would benefit from having -j set by default. At the moment I > set MAKEFLAGS=j32 in my environment and this achieves the desired > result, but -j would be more general. > > Thoughts? Besides the portability issues already pointed at, making option's argument optional itself doesn't fit in the getopt(3) semantics and is confusing. As a rule, option's argument must be able to begin with a dash. If this extension to make(1) were good from the technical POV, I'd suggest "-j -1", "-j max", "-j ncpu", or whatever, but not a bare "-j". Even if the make(1) code can handle such optional arguments, other stock tools should not be spoiled by that. IMHO :-) -- Yar