[Top][All Lists]

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

Re: make and c++ exceptions

From: Paul D. Smith
Subject: Re: make and c++ exceptions
Date: Sat, 6 Sep 2003 15:01:38 -0400

%% Steve Hutton <address@hidden> writes:

  sh> I noticed that my automake-generated makefile was reporting "FAIL"
  sh> for make check tests that throw (and catch) C++ exceptions, even
  sh> when they return 0.

  sh> I have extracted and simplified the make-check target into a
  sh> standalone Makefile which reproduces the behavior - that is, the
  sh> simple test program below called "return0throw" is seen by make as
  sh> returning 134, instead of 0.  A standalone bash script confirms
  sh> that bash sees a return of 0.

  sh> Can anyone reproduce and/or explain this? 

First, please always provide the version of GNU make you're using and
the type of operating system you're using when reporting problems or
asking for help.

Second, there is no way make can be involved in this directly, because
the entire script you have written is being passed to the shell: make is
not involved in _ANY_ way here: the shell runs the programs, the shell
detects the exit status, and the shell prints the exit status.  In all
this time, make is sleeping waiting for the shell to exit.

Finally, I don't understand why you used a "similar" script to test the
standalone behavior rather than the _exact_ script.

Try using a shell script identical to the one make invokes (using a for
loop, etc.), instead of somewhat different, and see if you get the same
behavior or not.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

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