autoconf-patches
[Top][All Lists]
Advanced

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

Re: depcomp: support newer HP compilers


From: Ralf Wildenhues
Subject: Re: depcomp: support newer HP compilers
Date: Thu, 5 Jan 2006 14:20:38 +0100
User-agent: Mutt/1.5.11

[ moving from automake-patches to autoconf-patches; see
http://thread.gmane.org/gmane.comp.sysutils.automake.patches/2074 ]

* Zack Weinberg wrote on Wed, Jan 04, 2006 at 05:43:32AM CET:
> On Wed, Jan 04, 2006 at 12:23:44AM +0100, Ralf Wildenhues wrote:
> > 
> > Do you have any idea which system might expose this?  None of the
> > ones I have access to do, and it helps both for adding a note to
> > the Autoconf doc portability section, and assessing whether we
> > should check the autotools for more instances of this.
> 
> Try, um, older Solaris /bin/sed?  I don't honestly remember how
> long ago I tripped over this -- I've just been sticking the semicolon
> in defensively ever since.  I had thought, though, that the
> proprietary Unix vendors froze the utilities in /bin and /usr/bin
> in a pre-SuS state, and thus that any such problem would be present
> always and forevermore.  A *lot* of these issues are masked if you
> put the directory with the standard-compliant binaries (usually
> /usr/xpg4/bin or something like that) ahead of /usr/bin in your
> PATH, or if your sysadmin installs GNU coreutils on everything.

Well, I don't have access to Solaris older that 2.6, and all newer ones
do not expose the issue.  And yes, I usually test all tools I can find
on a given system; users have the tendency to change PATH anyway.

* Stepan Kasal wrote on Wed, Jan 04, 2006 at 07:36:13AM CET:
> 
> actually, I always thought that only Solaris has this problem.
> 
> Yes, other proprieatar Unices are natural years behind, but I think they
> try to update their utilities.  Only Sun does intensionally conserve
> the state of the art from the time they founded their company.

Proposed patch against autoconf below.  It would be good if someone
could expose the failure.  It would also be good if someone checked
that my change does not actually fail to meet this requirement:

| Avoid redundant @samp{;}, as some @command{sed} implementations, such as
| address@hidden 1.4.2's, incorrectly try to interpret the second
| @samp{;} as a command:
| 
| @example
| $ @kbd{echo a | sed 's/x/x/;;s/x/x/'}
| sed: 1: "s/x/x/;;s/x/x/": invalid command code ;
| @end example

Cheers,
Ralf

        * doc/autoconf.texi (Limitations of Usual Tools): Mention 
        that the sed command `{' should be followed by `;'.
        * lib/m4sugar/m4sh.m4 (AS_DIRNAME_SED, AS_BASENAME_SED):
        Adjusted.
        Reported by Zack Weinberg <address@hidden>.

Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.939
diff -u -r1.939 autoconf.texi
--- doc/autoconf.texi   4 Jan 2006 22:28:37 -0000       1.939
+++ doc/autoconf.texi   5 Jan 2006 13:17:06 -0000
@@ -12371,7 +12371,8 @@
 @var{command-1}'s verb is @address@hidden, @samp{a}, @samp{b}, @samp{c},
 @samp{i}, @samp{r}, @samp{t}, @samp{w}, @samp{:}, or @samp{#}, so you
 should use semicolon only with simple scripts that do not use these
-verbs.
+verbs.  On the other hand, commands after @address@hidden should be preceded
+by @samp{;} unless preceded by a newline.
 
 Contrary to yet another urban legend, you may portably use @samp{&} in
 the replacement part of the @code{s} command to mean ``what was
Index: lib/m4sugar/m4sh.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/m4sugar/m4sh.m4,v
retrieving revision 1.152
diff -u -r1.152 m4sh.m4
--- lib/m4sugar/m4sh.m4 2 Dec 2005 19:22:49 -0000       1.152
+++ lib/m4sugar/m4sh.m4 5 Jan 2006 13:17:06 -0000
@@ -639,10 +639,10 @@
 
 m4_defun([AS_DIRNAME_SED],
 [echo X[]$1 |
-    sed ['/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
+    sed ['/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{; s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{; s//\1/; q; }
+         /^X\(\/\/\)$/{; s//\1/; q; }
+         /^X\(\/\).*/{; s//\1/; q; }
          s/.*/./; q']])
 
 m4_defun([AS_DIRNAME],
@@ -665,9 +665,9 @@
 
 m4_defun([AS_BASENAME_SED],
 [echo X/[]$1 |
-    sed ['/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
-         /^X\/\(\/\/\)$/{ s//\1/; q; }
-         /^X\/\(\/\).*/{ s//\1/; q; }
+    sed ['/^.*\/\([^/][^/]*\)\/*$/{; s//\1/; q; }
+         /^X\/\(\/\/\)$/{; s//\1/; q; }
+         /^X\/\(\/\).*/{; s//\1/; q; }
          s/.*/./; q']])
 
 m4_defun([AS_BASENAME],




reply via email to

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