|
From: | David Boyce |
Subject: | Re: Checking the exit status of a command executed from within a GNUmakefile |
Date: | Thu, 17 Feb 2005 17:08:18 -0500 |
At 04:48 PM 2/17/2005, Benjamin Edwards wrote:
I'm having trouble getting the exit status of a command executed from within a GNUmakefile. I'm executing the command using backticks, but I'm not able to get the exit status of that command. I'm trying to access the exit status using "$?", but that doesn't seem to work for me. example snippet - target: clean for file in $(FILES) ; do \ echo " => Processing $$file" ; \ `<command>` ; \ echo "RETURN CODE == $?" ; \ done ; \ Any ideas? What am I doing incorrectly here?
You need $$?, just as you needed $$file above. The test case shows no reason for using the backquotes, BTW. -David Boyce
[Prev in Thread] | Current Thread | [Next in Thread] |