On Tue, Dec 20, 2011 at 03:42:34PM +0100, David Kastrup wrote:
> "Phil Holmes" <[email protected]> writes:
>
> > In make, it it possible to output an informative string if part of the
> > make fails? As an example of why I'd like to know this, make doc uses
>
> You use the shell.
>
> texi2pdf whatever || { x=$?; echo "Texipdf failed with exit status
> $x"; exit $x; }
There's also the tee command, and also the prospect of writing a
small script that handles the message automatically. Both ideas
(and IIRC even a "proof of concept" script) were posted in the GOP
discussions for GOP 5 and 9 (build system and doc build system).
The basic idea of the script is that you'd do something like
safe_runner( texi2pdf whatever,
$(build-dir)/Documentation/learning.log,
"Texi2pdf failed to build learning",
last_lines=20)
and then if the build failed, it would print that message and
output the last 20 lines of the relevant log file.
I highly recommend reading those old discussions -- but skip over
all the policy emails, and focus on the technical emails. About
5% of those emails came from very knowledgeable unix people with
experience from solving these problems 20 years ago or something.
I think we can avoid re-inventing the wheel here.
Cheers,
- Graham
_______________________________________________
lilypond-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-devel