[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Re: groff in Makefiles
From: |
Ralph Corderoy |
Subject: |
[Groff] Re: groff in Makefiles |
Date: |
Tue, 29 Jul 2003 22:30:43 +0100 |
Hi Jörgen,
> > -book: toc.t utp_ix.t
> > - $(GROFF) -step -ms -rRef=0 utp_book.t > utp_book.ps
> > +utp_book.ps: toc.t utp_ix.t
> > + $(GROFF) -step -ms -rRef=0 utp_book.t >address@hidden
> > + mv address@hidden $@
>
> By the way, is there a better idiom for using groff (or anything else
> that can only write to stdout) in Makefiles?
I don't know, but I'd be interested to hear.
> What about this one?
>
> foo >$@ || $(RM) $@
That will overall succeed if foo fails assuming $(RM) works, i.e.
$ touch 456
$ false || rm 456
$ echo $?
0
Whether $@ is `precious' is also relevant. If foo fails, do you still
want the old $@ to be present for the meantime or is it OK to be without
even the old one.
Cheers,
Ralph.