|
From: | Yong Zhang |
Subject: | Re: question on makefile: not stop after compling error |
Date: | Mon, 31 Oct 2005 09:08:04 -0800 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |