libtool-patches
[Top][All Lists]
Advanced

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

Re: FYI: Set IFS in libtool for ash


From: Ralf Wildenhues
Subject: Re: FYI: Set IFS in libtool for ash
Date: Wed, 16 Mar 2005 16:48:17 +0100
User-agent: Mutt/1.4.1i

* Gary V. Vaughan wrote on Wed, Mar 16, 2005 at 03:40:29PM CET:
> Ralf Wildenhues wrote:
> > * Gary V. Vaughan wrote on Wed, Mar 16, 2005 at 02:27:54PM CET:
> > > Also, I believe the as_ prefix is reserved for shell variables 
> > > instantiated
> > > by m4sh.m4 in autoconf.   We should use lt_ according to section 4 of 
> > > HACKING...
> > 
> > Oh, well.  I copied that part directly from m4sh.m4.  Can we do just as
> > well without an intermediate variable?  Or do I have to fear other
> > developers' $EDITOR to kill trailing white space?
> 
> I think keeping the intermediate variable is worthwhile.  Infact, ISTR having
> used a \012\011\040 ordering to avoid accidental trailing whitespace cleanups
> in the past (quite possibly dotted around the libtool source tree even now!).

$SP2NL, $NL2SP.

(am thinking, maybe I should use that in the pgi patch, looks much nicer).

> If this patch is needed to address a known problem with ash, maybe it should
> be submitted to the autoconf list too, for inclusion in AS_SHELL_SANITIZE?

Hmm.  ash does not sets IFS by default.  Why does it break?

.. time passes ..

Hehe, you just pointed me toward something:  general.m4sh has:

| # Make sure IFS has a sensible default$
| : ${IFS="$
|  ^I"}$

(where $ is EOL and ^I is TAB).  This is _not_ sensible IMHO.  It really
ought to be SPACE, TAB, NEWLINE, in exactly *that* order.

Thank you very much for pushing me towards a correct answer.

OK to apply this patch to remove my broken one and set IFS default
sensibly?  Or should I rather set it unconditionally?

Regards,
Ralf

--- config/general.m4sh 28 Dec 2004 12:40:10 -0000      1.2.2.9
+++ config/general.m4sh 16 Mar 2005 15:54:29 -0000
@@ -48,8 +48,9 @@
 exit_status=$EXIT_SUCCESS
 
 # Make sure IFS has a sensible default
-: ${IFS="
-       "}
+lt_nl='
+'
+IFS="  $lt_nl"
 
 dirname="s,/[[^/]]*$,,"
 basename="s,^.*/,,g"
--- m4/libtool.m4       16 Mar 2005 10:08:17 -0000      1.125.2.37
+++ m4/libtool.m4       16 Mar 2005 15:54:29 -0000
@@ -517,12 +517,6 @@
 _LT_LIBTOOL_TAG_VARS
 # ### END LIBTOOL CONFIG
 
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS="  $as_nl"
-
 # The HP-UX ksh and POSIX shell print the target directory to stdout
 # if CDPATH is set.
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH




reply via email to

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