[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: echo but return false in make
From: |
David Kastrup |
Subject: |
Re: echo but return false in make |
Date: |
Fri, 17 Jun 2011 21:20:51 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Graham Percival <address@hidden> writes:
> On Fri, Jun 17, 2011 at 02:18:55PM -0400, Julien Rioux wrote:
>> On 17/06/2011 2:11 PM, Graham Percival wrote:
>> >Again, on the shell, it would be something like this:
>> > make ...blah... || echo "build failed" && tail logfile
>> >but there might be a nicer way to do it.
>>
>> but then when blah fails, make will not stop, since the return
>> status from echo && tail is a success (assuming the log file
>> exists). How would you return failure and force make to stop?
>
> Interesting, I hadn't considered that. Hmm, is there such a thing
> as functions in bach?
Bash, you mean. Basically
myfun() { this && that; return 0; }
> If so, it would be easy to return something after doing the echo.
Hm? You can just write
make ...blah... || { echo "build failed" && tail logfile; exit 1; }
> Of course, we can't guaranteed that bash will be present... does
> sh(1) allow functions?
Like above, it does.
--
David Kastrup
- Re: Logfiles from build, (continued)
- Re: Logfiles from build, Phil Holmes, 2011/06/17
- Re: Logfiles from build, Graham Percival, 2011/06/17
- Re: Logfiles from build, Phil Holmes, 2011/06/17
- Re: Logfiles from build, Graham Percival, 2011/06/17
- Re: Logfiles from build, Julien Rioux, 2011/06/17
- echo but return false in make (was: Logfiles from build), Graham Percival, 2011/06/17
- Re: echo but return false in make (was: Logfiles from build), Graham Percival, 2011/06/17
- Re: echo but return false in make, Julien Rioux, 2011/06/17
- Re: echo but return false in make (was: Logfiles from build), Matthias Kilian, 2011/06/17
- Re: echo but return false in make (was: Logfiles from build), Graham Percival, 2011/06/17
- Re: echo but return false in make,
David Kastrup <=
Re: Logfiles from build, Phil Holmes, 2011/06/17
Re: Logfiles from build, Colin Campbell, 2011/06/17