Makefile and SHELL

Michael Stahl mstahl at redhat.com
Tue May 7 02:07:35 PDT 2013


On 07/05/13 02:35, Bjoern Michaelsen wrote:
> Hi,
> 
> On Tue, May 07, 2013 at 02:01:25AM +0200, Mat M wrote:
>> In Makefile.in, we enforce bash with SHELL=/usr/bin/env bash, but we

yes, that is in the top-level Makefile.

>> state that the build should be posix enabled (at least I was told
>> that :)) , so why not SHELL=/usr/bin/env sh or SHELL=/bin/sh (or
>> nothing, since latter is default) ?
> 
> so gbuild originally was posix compliant (it had to work on Solaris). It seems,
> over time some bashisms creeped in. IIRC Michael Stahl made some performance
> measurements showing that dash (which is the default on e.g. debian-based
> distros) has a significant performance edge on startup, so it might actually
> make sense to kill bashisms with extreme prejudice.
> Note that depending hard on bash might make e.g. teh *BSD folks unhappy.

gbuild uses /bin/sh for everything, see

solenv/gbuild/gbuild.mk:SHELL := /bin/sh

which overrides the setting in the top-level Makefile (well at least i
hope it does).

of course (since this question seems to come up regularly) somebody with
some free time could try if it works to change the SHELL setting in
Makefile.in to /bin/sh too (preferably on a system where /bin/sh is not
bash) and see what if anything breaks then and fix it (possibly by
modifying the breaking scripts with "#!/usr/bin/env bash", no need to
fix all bashisms everywhere imho).



More information about the LibreOffice mailing list