help-make
[Top][All Lists]
Advanced

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

how to call the sub_make in reading process not in dependency analysis p


From: Tao T
Subject: how to call the sub_make in reading process not in dependency analysis process?
Date: Thu, 27 Nov 2008 13:48:09 -0800 (PST)

actually it still relate my last question. My original code is like this:
target: $(depfile)
BUILDUNITS := $(shell $(foreach unit,$(ALL_UNITS),cd
$(REPOSITORY_ROOT)/units/$(unit)/source/sc/beh && $(MAKE) $(MAKECMDGOALS)
BUILD_TYPE=$(BUILD_TYPE) 1>&2;))
-include $(depfile)
I need jump into the sub_make before $(depfile). This code can fulfill it.
However, it can not stop asap when a error happens.
Then I have two approach:
1. keep the shell function try add some error detector.
2. to get rid of the shell function.

For the 1. way ,as so many nice guys suggested I tried so many methods: "set
-e" "exit &&?" "&& true" It seems all does not work. The only work method is
touch a error_flag, However, It also has some delay in exit make. the parent
makefile can not recognize the error_flag immediately. I dont know why.the
command is:
ifneq (,$(wildcard error_flag))
BUILDUNITS := $(shell rm -f error_flag)
$(error Something bad happened.)
endif
Do you have some more suggestion for this part? Thanks

For the 2. way the problem is how can I run the sub makefile when the
reading process of parent makefile.Beacuse the $(depfile) need some file
generate in sub make. If I can not run the sub makefile first, it will cause
error. I think in my original code "BUILDUNITS :=&(shell )" can achieve this
require .I don't know whether you can get my point. I hope I also could get
some suggestion here for this part.

thank in advance
Tao
-- 
View this message in context: 
http://www.nabble.com/how-to-call-the-sub_make-in-reading-process-not-in-dependency-analysis-process--tp20726024p20726024.html
Sent from the Gnu - Make - Help mailing list archive at Nabble.com.





reply via email to

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