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: Paul Jarc
Subject: Re: question on makefile: not stop after compling error
Date: Sat, 29 Oct 2005 01:12:34 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux)

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]