autoconf-patches
[Top][All Lists]
Advanced

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

Re: _AC_CACHE_DUMP simplified


From: Eric Blake
Subject: Re: _AC_CACHE_DUMP simplified
Date: Tue, 21 Mar 2006 21:15:00 -0700
User-agent: Thunderbird 1.5 (Windows/20051201)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Stepan Kasal on 3/21/2006 4:26 PM:
> 
> Attached please find a corrected version.

Still has problems - see below.

> 
> There is a second patch which documents the ^ issue.

Looks fine to me.

> --- lib/autoconf/general.m4   16 Mar 2006 13:33:18 -0000      1.891
> +++ lib/autoconf/general.m4   21 Mar 2006 23:18:08 -0000
> @@ -1813,8 +1813,8 @@
>  # and sets the high bit in the cache file unless we assign to the vars.
>  {
>    (set) 2>&1 |
> -    case `(ac_space=' '; set | grep ac_space) 2>&1` in
> -    *ac_space=\ *)
> +    case `(ac_space=' '; set | grep '^ac_space') 2>&1` in
> +    ac_space=\ *)

grep does not work on the output of set in all shells:

$ zsh --version
zsh 4.2.6 (i686-pc-cygwin)
$ zsh -c "(ac_space=' '; (set) 2>&1 | grep '^ac_space=')"
Binary file (standard input) matches
$ zsh -c "(ac_space=' '; (set) 2>&1 | sed -n '/^ac_space=/p')"
ac_space=' '

>        # `set' does not quote correctly, so add quotes (double-quote
>        # substitution turns \\\\ into \\, and sed turns \\ into \).
>        sed -n \
> @@ -1823,8 +1823,7 @@
>        ;;
>      *)
>        # `set' quotes correctly as required by POSIX, so do not add quotes.
> -      sed -n \
> -     ["s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"]
> +      grep ["^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*="]

Hmm, you are just replacing sed with grep, but still executing the same
number of processes.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEIM9D84KuGfSFAYARAtGZAKCMrjQ+klV93qN/FJQhNv2kHWHrHACdGzsh
E38iDsTpPg9d9pNoWic5584=
=yHV+
-----END PGP SIGNATURE-----




reply via email to

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