help-make
[Top][All Lists]
Advanced

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

how to get make to terminate itself at the first error?


From: Martin d'Anjou
Subject: how to get make to terminate itself at the first error?
Date: Mon, 2 Feb 2009 15:12:26 -0500 (EST)
User-agent: Alpine 1.00 (LRH 882 2007-12-20)

Hello,

In jobs.c, when I introduce a call to fatal_error_signal(SIGTERM) here:

if (err && block)
  {
    static int printed = 0;
    fflush (stdout);
    if (!printed)
    {
      error (NILF, _("*** Waiting for unfinished jobs...."));
      fatal_error_signal(SIGTERM);
    }
    printed = 1;
  }

parallel make terminates at the first error. However, jobs don't appear to die equaly, as some jobs keep running, and when I use process substitution t=$(make -j 2), it won't return unless the jobs are gone from the process table.

Here is the makefile that I used:

all: t2 t3
t2:
        sleep 10 && exit 1
t3:
        sleep 60 && echo done t3 || echo failed t3

What is the correct way to have make self-terminate one the first error
as if control-C was hit on the command line?

Thanks,
Martin




reply via email to

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