MAKE_RESTARTS interference with trap SIGINT

Norbert Thiebaud nthiebaud at gmail.com
Sun May 5 22:03:18 PDT 2013


Since I've chased that one for a while, I'll share here that pita:

I have a wrapper script around a make fo LO (tinderbox scripting)... I
have added soem refinement so that it handle gracefully a Ctrl-C while
it is running
to that effect I've installed a signal handler in bash using 'trap'
on, among other SIGINT
That was the shell script can detect that a build was aborted in the
middle of thing, and can take prophylactic actions... like notifying
gerrot or the tindebox server that that build has been 'aborted'

The gotcha is that the regular Makefile try first to make sure that
Makefile is up-to-date, and then re-start itself... it dies that
whether or not the Makefile is out-of-date...
but apparently make use SIGINT to do its restart... and that is
apparently picked-up by bash... so the result is that make make sure
that Makefile is up-to-date, and then... stop.
Not exactly a great thing for a tinderbox script :-)

The work around is to set MAKE_RESTARTS=1 _before_ invoking make...
that way make believe that this is a 'restart' already and skip the
whole 'make sure Makefile is up to date', which in this case is
guaranteed to be (configure is systematically ran before make)

Norbert


More information about the LibreOffice mailing list