>   foo.ps: foo.ms
>        groff -ms foo.ms > foo.ps
>
> will always generate foo.ps, even when there are fatal errors.
> On the other hand,
>
>   foo.ps: foo.ms
>        groff -ms foo.ms > foo.ps || $(RM) foo.ps
>
> will not leave a bad foo.ps around, but it will not abort the
> make session either, since either groff or $(RM) will always
> return success.
>
> I'm sure someone here has found the neatest possible way of
> addressing this.

What about...

  foo.ps: foo.ms
       groff -ms foo.ms > foo.ps || ($(RM) foo.ps; exit 1)

HTH.

Keith.


_______________________________________________
Groff mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/groff

Reply via email to