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
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make