help-gnu-utils
[Top][All Lists]
Advanced

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

Re: question on makefile: not stop after compling error


From: Yong Zhang
Subject: Re: question on makefile: not stop after compling error
Date: Mon, 31 Oct 2005 09:08:04 -0800

Paul,
 
It works. Thanks for the help.
 
Yong

 
On 10/28/05, Paul Jarc <prj@po.cwru.edu> wrote:
yozhang@gmail.com wrote:
> A problem I currently have is if there are some compiling errors in
> d4, the compiler will not stop, and keep working on d5, d6, d7.

That's because the rule, as written, doesn't check the exit status of
the sub-makes.

>         for subdir in $(SUBDIRS); do\
>         cd $$subdir;\
>         $(MAKE) ARCH=mips;\
>         cd -;\
>         done

       for subdir in $(SUBDIRS); do \
         { cd $$subdir && \
           $(MAKE) ARCH=mips &&
           cd -; \
         } || exit "$$?"; \
       done

You may also find make's -C option useful.


paul


reply via email to

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