help-make
[Top][All Lists]
Advanced

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

Re: how to exit the parent_make immediately when get an error in submake


From: Stephan Beal
Subject: Re: how to exit the parent_make immediately when get an error in submake
Date: Tue, 25 Nov 2008 12:16:31 +0100

On Tue, Nov 25, 2008 at 11:26 AM, T T <address@hidden> wrote:
> My situation is that my target in parent makefile need some dep-file and
> obj-file generated by sub makefile. Now I use BUILDUNITS := $(shell cd
> $(WORKAREA)/subdir && $(MAKE) $(MAKECMDGOALS) ) to call sub makefile. When I

This isn't a "make" in the conventional sense -you're running a shell
command which just happens to be make. The $(shell) command has no
particular error handling features. To get this to work would be a bit
of hassle. e.g. set a flag file if your $(shell) command fails (you'll
have to do that in the $(shell) command itself), then check for that
flag with:

ifneq (,$(wildcard my_error_file)
$(error my build broke)
endif

or something along those lines.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/




reply via email to

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