[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Submake question
From: |
jorgefm |
Subject: |
Submake question |
Date: |
Tue, 15 Oct 2002 11:57:21 +0200 |
Hi folks!
I have a little question about sub-makes.
I'm using a general Makefile to build all the system. The system have a lot
of makefile. To build the
system the general makefile launch a make for every subproject it founds.
Something like this:
General Makefile:
# Get all the subprojects' makefiles.
GEN_MAKES=$(shell find . -path "*CVS" -prune -o -print -mindepth 2 | grep
-e "Makefile$$")
GEN_MAKES:=$(subst ./,,$(GEN_MAKES))
GEN_MAKES_DIR:=$(dir $(GEN_MAKES))
# Make all the system
distall:
@for dir in $(GEN_MAKES_DIR); do \
make -C $$dir distall; \
done
My question is : How can i stop the process if i get some error in a make ?
I have read in 'make' manual, chapter 9,
that the exit status is not equal to 0 if any error is found, but how can
i access this value ? How can i do somethig like:
distall:
@for dir in $(GEN_MAKES_DIR); do \
result = make -C $$dir distall; \
ifneq $result 0
$(error Subproject not made! )
endif
done
Thanks for your time,
Jorge Fernandez
- Submake question,
jorgefm <=