help-make
[Top][All Lists]
Advanced

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

RE: Breaking from a for loop?


From: David Aldrich
Subject: RE: Breaking from a for loop?
Date: Tue, 24 Nov 2009 14:27:49 +0000

Hi Paul

> Only a backslash followed immediately by a newline escapes the newline.

Spot on, that fixed that error. Thanks.

I now have a different problem:

.PHONY : makedynamiclibs
makedynamiclibs :
        @for d in $(DYNAMIC_LIBS); do                        \
            echo $$d;                                        \
            $(MAKE) --quiet --directory=$$d $(MAKECMDGOALS); \
            if [ $? > 0 ];                                   \
            then                                             \
                break;                                       \
            else :; fi;                                      \
        done

I find that the for loop does not break when the make call in line 3 of the 
script returns an error. I tried:

if [ $$? > 0 ];                                   

but that is no better. Can you see anything obviously wrong with this please?

David




reply via email to

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