help-make
[Top][All Lists]
Advanced

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

RE: Problems with status.


From: PATTON, BILLY \(SBCSI\)
Subject: RE: Problems with status.
Date: Thu, 13 Apr 2006 14:57:26 -0500

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: address@hidden 
> [mailto:address@hidden On Behalf 
> Of PATTON, BILLY (SBCSI)
> Sent: Thursday, April 13, 2006 2:51 PM
> To: address@hidden
> 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
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-make
> 




reply via email to

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