libtool-patches
[Top][All Lists]
Advanced

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

Re: Wrt to Tru64


From: Gary V . Vaughan
Subject: Re: Wrt to Tru64
Date: Tue, 24 Apr 2001 18:41:43 +0100

On Monday 23 April 2001 10:09 pm, Ossama Othman wrote:
> Hi Gary,
>
> On Mon, Apr 23, 2001 at 10:06:23AM +0100, Gary V. Vaughan wrote:
> > I think there is an underlying problem with the way
> > output_verbose_link_cmds is not quoted prior to being `eval'ed.  By my
> > reckoning, it should be passed through $sed_quote_subst before being fed
> > to eval, otherwise technically variables will also be substituted at the
> > wrong time.
>
> Right, that makes sense.  It's strange that this problem is showing up
> now.  I recall testing that code successfully on Tru64 quite some time
> ago.
>
> > Additionally, it breaks our naming convention: *_cmds variables should
> > allow multiple lines of shell code to be used if separated by `~'s;  if a
> > variable can hold only a single line of shell code, it should be name
> > *_cmd.
>
> Unless I'm missing something, I don't think that there is anything
> preventing that variable from holding more than one line of code.  It
> just so happens that I used semi-colons instead of the tildes.  Should
> we switch to tildes instead?

Sorry I wasn't very clear.  If you look at the way the code in various 
variables named *_cmds is executed it always works like this:

              IFS="${IFS=       }"; save_ifs="$IFS"; IFS='~'
              eval cmds=\"$extract_expsyms_cmds\"
              for cmd in $cmds; do
                IFS="$save_ifs"
                $show "$cmd"
                $run eval "$cmd" || exit $?
              done
              IFS="$save_ifs"

I can't remember exactly why we needed to do that originally -- probably 
something to do with order of evaluation of shell variables in eval'ed code.

By convention, we expect to be able to write '~' delimited lines of shell 
code into the variable when setting it in libtool.m4.  Conversely variables 
name ending in _cmd are conventionaly evaled and executed all in one go 
(whether they contain one or several lines of shell code), so we know not to 
use '~' delimitters.

I think the easiest way to deal with the disparity is simply to rename your 
variable to output_verbose_link_cmd.

Cheers,
        Gary.
-- 
  ___              _   ___   __              _         mailto: address@hidden
 / __|__ _ _ ___ _| | / / | / /_ _ _  _ __ _| |_  __ _ ___       address@hidden
| (_ / _` | '_|// / |/ /| |/ / _` | || / _` | ' \/ _` | _ \
 \___\__,_|_|\_, /|___(_)___/\__,_|\_,_\__, |_||_\__,_|//_/
home page:  /___/                      /___/                  gpg public key:
http://www.oranda.demon.co.uk           http://www.oranda.demon.co.uk/key.asc



reply via email to

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