Here is an example I tried:
all :
        @stat=0 ;\
        if [ -f exec_log ] ; then \
          rm fat_cats ; \
          let stat=stat+$$? ; \
        fi ; \
        echo "rats" ; \
        $$stat

make -f z
rm: fat_cats non-existent
rats
/bin/sh: 2:  not found.
make: *** [all] Error 127

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of PATTON, BILLY (SBCSI)
> Sent: Thursday, April 13, 2006 2:51 PM
> To: [email protected]
> Subject: Problems with status.
> 
> 
> In my growing makefile I have found that I am missing the status of
> commands.
> 
> I may have 10 lines in my command but all are ; \  to make 
> one process.
> 
> example
> target :
>   @for X in variable ; do \
>     if [ -f $$$$X ] ; then \
>       $(EXEC_LOG) some_scommand ; \
>     fi ; \
>   done ; \
>   $(DO_SOMETHING) ;\
>   if [ a = b ] ; then \
>      bla bla bla ; \
>   fi 
> 
> 
> EXEC_LOG is failing but make is continuing to run.  As I understand it
> the last ; wins.
> 
> This came to me through the K's of defunct processes.  
> 
> Do I have to do something like
>   stat=0; \
> @for X in xxx ; do \
>   $(EXEC_LOG) ...
>   let stat=stat+$?
> ...
> fi ; \
> $$stat
> 
> 
> _______________________________________________
> 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