autoconf-patches
[Top][All Lists]
Advanced

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

Re: [PATCH 10/10] * tests/torture.at (srcdir): Fix quoting.


From: Jim Meyering
Subject: Re: [PATCH 10/10] * tests/torture.at (srcdir): Fix quoting.
Date: Fri, 07 Dec 2007 08:49:25 +0100

Ralf Wildenhues <address@hidden> wrote:
> This test actually calls configure with an absolute path,
> so in a tree with whitespace we need to quote (just like
> most of the code under autoconf/lib does, too).
>
> diff --git a/tests/torture.at b/tests/torture.at
> index 11c619d..0f6d0ef 100644
> --- a/tests/torture.at
> +++ b/tests/torture.at
> @@ -973,9 +973,9 @@ AT_DATA([configure.ac],
>  AC_CONFIG_FILES([foo at-dir/bar])
>
>  AC_CONFIG_COMMANDS([report],
> -[test -f $srcdir/configure.ac ||
> +[test -f "$srcdir/configure.ac" ||
>     AC_MSG_ERROR([cannot find $srcdir/configure.ac])],
> -                [srcdir=$srcdir])
> +                [srcdir='$srcdir'])

Hi Ralf,

At first, I thought using single quotes here might be a mistake.
Of course, once I looked at a generated configure script, it
makes sense: that's part of an unquoted here document.

How about adding a comment like this?

dnl Use quotes here to accommodate a value of $srcdir
dnl containing e.g., spaces or shell meta-characters.
dnl Use *single* quotes because the context is an unquoted here-doc.




reply via email to

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