octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Requiring Bourne shell for build


From: John W. Eaton
Subject: Re: Requiring Bourne shell for build
Date: Wed, 17 Feb 2016 14:16:14 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0

On 02/17/2016 12:56 PM, Mike Miller wrote:
On Wed, Feb 17, 2016 at 09:45:41 -0800, Rik wrote:
2/17/16

Mike,

I see that you recently added some changesets that add $(SHELL) to the
invocation of most scripts.  In theory, this seems appropriate because it
allows the user to override SHELL with their own tool.  In practice,
however, the build is keyed to using Bourne shell.  I happen to use tcsh so
SHELL is /bin/tcsh.  This is an exported environment variable so even if I
drop into sh first before trying to run the build system I get errors.  I
can get the build to work by doing

sh
SHELL=/bin/sh
export SHELL
bootstrap
configure
make
exit

It seems that instead of making the build platform SHELL agnostic, it is
now required to use /bin/sh for all operations.

Thanks for pointing that out. I thought there might be a csh
complication somewhere, thanks for being the guinea pig. If only
everyone could use a POSIX shell ;)

Just reading this relevant section of the GNU make manual:

https://www.gnu.org/software/make/manual/make.html#Choosing-the-Shell

Most of these might start working for you if you add an "export SHELL"
to build-aux/common.mk alongside the other exports. But that wouldn't
fix the changes to bootstrap.

I'd like to get away with keeping most of the changes, maybe only revert
41e39c9b35d3.

What about using something like

  SHELL=${CONFIG_SHELL-/bin/sh}

in the bootstrap script (see the attached diff)? I don't think we need to do as much to try to set SHELL (or CONFIG_SHELL) as the autoconf-generated configure script does, but this should fix the problem with getting a bad value for SHELL from the environment while still allowing users to choose what (POSIX) shell to use for running the Octave scripts that are executed by the bootstrap script.

I also see that autoconf sets the variable with '-' and you used ':-'. Either is OK with me, but I wonder if there is a reason that autoconf only uses the default if CONFIG_SHELL is unset, not also if it is null.

In any case, if I make this change, then I don't see a problem when doing the following with a clean build tree:

  export SHELL=/bin/tcsh
  ./bootstrap              ## in source tree
  /path/to/configure       ## in build tree
  make

jwe

Attachment: diffs.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]