From owner-freebsd-arch@FreeBSD.ORG Tue May 24 08:28:31 2005 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E98B616A41C for ; Tue, 24 May 2005 08:28:31 +0000 (GMT) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp-1.dlr.de (smtp-1.dlr.de [195.37.61.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 63C2D43D53 for ; Tue, 24 May 2005 08:28:31 +0000 (GMT) (envelope-from Hartmut.Brandt@dlr.de) Received: from beagle.kn.op.dlr.de ([129.247.173.6]) by smtp-1.dlr.de over TLS secured channel with Microsoft SMTPSVC(6.0.3790.211); Tue, 24 May 2005 10:28:29 +0200 Date: Tue, 24 May 2005 10:28:30 +0200 (CEST) From: Harti Brandt X-X-Sender: brandt_h@beagle.kn.op.dlr.de To: Stijn Hoop In-Reply-To: <20050524081700.GF95023@pcwin002.win.tue.nl> Message-ID: <20050524101903.N50725@beagle.kn.op.dlr.de> References: <20050523153118.C28521@beagle.kn.op.dlr.de> <20050524100205.W50725@beagle.kn.op.dlr.de> <20050524081700.GF95023@pcwin002.win.tue.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 24 May 2005 08:28:30.0156 (UTC) FILETIME=[90AD18C0:01C5603A] Cc: arch@freebsd.org, Max Okumoto Subject: Re: Handling of shell builtins in make(1) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Harti Brandt List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2005 08:28:32 -0000 On Tue, 24 May 2005, Stijn Hoop wrote: SH>On Tue, May 24, 2005 at 10:08:19AM +0200, Harti Brandt wrote: SH>> On Mon, 23 May 2005, Max Okumoto wrote: SH>> SH>> MO>4. Extend .SHELL: to allow specifing a list of built-in. And then SH>> MO> we should define them in bsd.sys.mk or some other config file. SH>> SH>> We would need to add yet another config file for this because make SH>> doesn't read anything if given the -r flag. It would end up having SH>> no shell which would be wrong. SH> SH>Or, add a way to query /bin/sh for the list of builtins (sh SH>--show-builtins) and use that in the absence of an explicit .SHELL. SH> SH>> MO>This will allow people to add keywords for their shells, and SH>> MO>remove that stuff from the make source code. Hard coding it SH>> MO>in the binary is wrong. SH>> SH>> The initial shell (/bin/sh) must be in the binary because it must run with SH>> -r. I see no sense to add another config file just for the purpose SH>> of specifying the shell. What would that give you that you cannot do now? SH> SH>I think it's more that hardcoding a list of builtins is undesirable. That's no problem. We can just hardcode an empty list of builtins. In that case make always uses the shell. We can then put the actual list of builtins into sys.mk (or even retrieve it there from the shell via $(/bin/sh --show-builtins:sh). The question is do we really want to have, for example, 'bind' execute the shell builtin or do we want to execute it a bind somewhere in the path? From the point of makefile portability the later is desirable, because someone could legally have a script called bind in the build directory and call it via make. 'bind' is not in the list of builtins specified by Posix (I hope) so one would not expect to get any problems. On the other hand executing the bind builtin may be less surprising to people writing a makefile specifically for FreeBSD. That way, at an early stage, one may decide not to use bind as the name of a script. harti