Date: Tue, 24 May 2005 10:28:30 +0200 (CEST) From: Harti Brandt <hartmut.brandt@dlr.de> To: Stijn Hoop <stijn@win.tue.nl> Cc: arch@freebsd.org, Max Okumoto <okumoto@ucsd.edu> Subject: Re: Handling of shell builtins in make(1) Message-ID: <20050524101903.N50725@beagle.kn.op.dlr.de> In-Reply-To: <20050524081700.GF95023@pcwin002.win.tue.nl> References: <20050523153118.C28521@beagle.kn.op.dlr.de> <di8y25a4dz.fsf@oec-server2.ucsd.edu> <20050524100205.W50725@beagle.kn.op.dlr.de> <20050524081700.GF95023@pcwin002.win.tue.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050524101903.N50725>