[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests/init.sh: new file to be used via most *.sh tests
From: |
Jim Meyering |
Subject: |
Re: [PATCH] tests/init.sh: new file to be used via most *.sh tests |
Date: |
Thu, 26 Nov 2009 11:21:56 +0100 |
Bruno Haible wrote:
> Jim Meyering wrote:
>> srcdir is expected to come from automake, and there, it is guaranteed
>> to be sanitized. It is usually simply "." or ".." or the name of a
>> package's subdirectory like "src" or "lib".
>
> But it can contain absolute directory names. For example, when I have a
> package in /home/bruno/data/tmp/testdir2 and build it in /tmp/build
> by running
> /home/bruno/data/tmp/testdir2/configure
> make
> make check
> then an 'echo "$srcdir"' command will show
> /home/bruno/data/tmp/testdir2/gltests
Sure, but an absolute srcdir name containing spaces
will not make it past this part of every ./configure:
case `pwd` in
*[\\\"\#\$\&\'\`$am_lf]*)
as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
esac
case $srcdir in
*[\\\"\#\$\&\'\`$am_lf\ \ ]*)
as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
esac
Re: [PATCH] tests/init.sh: new file to be used via most *.sh tests, Jim Meyering, 2009/11/26
Re: [PATCH] tests/init.sh: new file to be used via most *.sh tests, Ralf Wildenhues, 2009/11/27