Or you can let Make handle it all with no reliance on shells at all.

http://www.gnu.org/software/make/manual/html_chapter/make_5.html#SEC56


To ignore errors in a command line, write a `-' at the beginning of the line's text (after the initial tab). The `-' is discarded before the command is passed to the shell for execution.


For example,

clean:
       -rm -f *.o



David Boyce wrote:

At 09:27 PM 2/1/2005, Paul D. Smith wrote:

%% [EMAIL PROTECTED] (Vite Schnell) writes:

  vs> I'm trying to prevent Make from exiting upon receiving a non-zero
  vs> exit status value from a command.  Is there any way I can "trap" a
  vs> failure in order to keep processing other targets?

foo:
      command || true


I prefer to save a fork/exec and also remove an unnecessary dependence on PATH:

foo:
        command ||:

Of course there are some shells for which "true" is a builtin but ":" has been one since the beginning of time.

-dsb



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make




_______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to