[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Checking the exit status of a command executed from within a GNUmake
From: |
John Graham-Cumming |
Subject: |
Re: Checking the exit status of a command executed from within a GNUmakefile |
Date: |
Thu, 17 Feb 2005 17:12:47 -0500 |
On Thu, 2005-02-17 at 13:48 -0800, Benjamin Edwards wrote:
> target: clean
> for file in $(FILES) ; do \
> echo " => Processing $$file" ; \
> `<command>` ; \
> echo "RETURN CODE == $?" ; \
> done ; \
$? is a GNU Make variable and because you have not written $$? it is
getting expanded before these commands run at all. Change it to $$? and
this should work.
John.
--
John Graham-Cumming
Home: http://www.jgc.org/
Work: http://www.electric-cloud.com/
POPFile: http://getpopfile.org/
GNU Make Standard Library: http://gmsl.sf.net/