Re: ash vs. bash
On Fri, Jul 23, 1999 at 05:48:16PM +0000, Norbert Nemec wrote:
> Sure, I simply could easily make it sh compliant, but it made me wonder:
> * How do I specify the shell I want to have used automatically within make files
> (Probably simple, but I could not find it in the make info)
Set the $(SHELL) variable, e.g. put this on the beginning of debian/rules :
SHELL = /bin/bash
You can find it in make's info entry, it says so in many places:
The program used as the shell is taken from the variable `SHELL'.
By default, the program `/bin/sh' is used.
Every Makefile should contain this line:
SHELL = /bin/sh
to avoid trouble on systems where the `SHELL' variable might be
inherited from the environment. (This is never a problem with GNU
The name of the system default command interpreter, usually
`/bin/sh'. You can set `SHELL' in the makefile to change the
shell used to run commands. *Note Command Execution: Execution.
> but what is even more:
> * how many makefiles (especially debian/rules) may there be that contain
> such bashianisms and may stay undetected for a long time, because they are
> ony executed by a small number of people.
Probably many. When you find some, simply file bugs asking for the shell
to be explicitely set to bash or the commands converted to plain sh.
enJoy -*/\*- pronounced 'iosip', or simply 'joseph'