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

Re: Autoconf Makefile problem

It's a known bug in pdksh.

Basically, sh has two notions: a shell command return value, and a
success/failure mode.

The success/failure mode is important with set -e, which is what we are
using there (Makefile).

And pdksh is cutting corners: the construction 
test && cmd
is used to execute cmd only if test is true. But the peculiar evaluator
it uses makes it so that, if test is false, the whole command fails, and
as it happens, it's the last command of a loop, so the whole loop fails.

I've looked at this already. I've seen no way around it except to rewrite
the part of pdksh that deals with it to separate both concepts.

As far as autoconf/automake goes, the development version of automake uses
an entirely different shell-fragment for that case, so it won't trigger
that bug.