I must be missing something but I don't see why the trap special
builtin wouldn't work the same in a make rule as in shell. Could
someone enlighten me? I expect the make output below to be 1 but
I get 0 instead.

$ (trap 'echo $?' EXIT && exit 1)
1
$ echo "foo:; trap 'echo \$\$?' EXIT && exit 1" > mf \
  && gmake -f mf foo
trap 'echo $?' EXIT && exit 1
0
gmake: *** [foo] Error 1

Thanks in advance!
Martin


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to