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


Reply via email to