[Top][All Lists]

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

Re: libtool 2.2.2 does not work on OSF/1 4.0d

From: Bruno Haible
Subject: Re: libtool 2.2.2 does not work on OSF/1 4.0d
Date: Sun, 6 Apr 2008 21:26:08 +0200
User-agent: KMail/1.5.4

Ralf Wildenhues asked:
> > And $(SHELL) always expands to /bin/sh.
> Why is that?

All my hand-written Makefiles and Makefile.ins have
  SHELL = /bin/sh

This is recommended by lots of tutorials how to write Makefiles, e.g. [1][2][3];
Also because without it, on some old systems (IRIX 5?) Makefile commands are
run through the user's login shell, which may be csh or tcsh! Also because on
OSF/1, SHELL expands to the user's login shell if not explicitly set.

[1] http://www.hsrl.rutgers.edu/ug/make_help.html
[2] http://www.mtsu.edu/~csdept/FacilitiesAndResources/make.htm
[3] http://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html

> There should be
>   SHELL = /bin/ksh

That would be if my Makefiles were to use @address@hidden They don't, because
  - The autoconf manual says that @SHELL@ is interesting to use if one cares
    about DJGPP portability, which I don't.
  - I want to have control over the shell which executes the body of my
    Makefiles. It's hard enough to handle /bin/sh bugs; I don't also want
    to have to handle pdksh, zsh, ash, etc. with all their bugs in all my

In summary, you cannot assume that SHELL = @address@hidden

Here is a fix to libtool's @LIBTOOL@ expansion. Tested on OSF/1.

2008-04-06  Bruno Haible  <address@hidden>

        * libtool.m4 (LT_INIT): When setting LIBTOOL, use CONFIG_SHELL; don't
        assume that the Makefile.in will set SHELL to ${CONFIG_SHELL}.

*** /packages/gnu-inst-libtool/2.2.2/share/aclocal/libtool.m4   2008-04-04 
01:51:39.000000000 +0200
--- libtool.m4  2008-04-06 21:08:04.000000000 +0200
*** 89,95 ****
  # Always use our own libtool.
! LIBTOOL='$(SHELL) $(top_builddir)/libtool'
--- 89,95 ----
  # Always use our own libtool.
! LIBTOOL="${CONFIG_SHELL-$SHELL} "'$(top_builddir)/libtool'

reply via email to

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