lilypond-devel
[Top][All Lists]
Advanced

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

Re: Question for make experts


From: Graham Percival
Subject: Re: Question for make experts
Date: Tue, 20 Dec 2011 07:40:56 -0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Dec 20, 2011 at 03:42:34PM +0100, David Kastrup wrote:
> "Phil Holmes" <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]