On 07/26/2010 07:40 AM, Eric Blake wrote:
> cd '$(top_builddir)' && ...
> 
> since "cd" will succeed but "cd ''" will fail, but that still doesn't
> explain the root cause for $(top_builddir) not expanding correctly.

Scratch that - bash 4.1, zsh, and dash all share the same bug:

$ bash -c 'cd ""'; echo $?
0

ksh93 is even worse - it changes to the home directory anyways.

Of all the shells I tested, _only_ Solaris /bin/sh errored out!

$ cd /tmp
$ /bin/sh -c 'cd ""; echo $?; pwd'
/bin/sh: null directory
$ echo $?
1

Looks like a gotcha to document in the autoconf manual.

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Autoconf mailing list
Autoconf@gnu.org
http://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to