|
From: | Christophe LYON |
Subject: | Re: how to do recursive "subsystem" make properly? |
Date: | Mon, 09 Nov 2009 10:35:41 +0100 |
User-agent: | Thunderbird 2.0.0.23 (X11/20090812) |
Hi Paul,
prog: foosrc/libfoo.a ...do something... foosrc/libfoo.a: FORCE $(MAKE) -C foosrc FORCE: ; In this model, libfoo.a will always be considered out of date (because of the FORCE prerequisite--just be sure you don't create a file "FORCE" in your directory), so the command to build it will be invoked. The command is the submake. If the submake actually updates libfoo.a, then "prog" will be rebuilt. If the submake does not change libfoo.a, then "prog" will not be considered out of date.
Sorry if the answer is obvious, but I don't understand why "prog" isn't simply always rebuilt, because libfooa is always updated. Is it because the command is $(MAKE)?
(Replacing $(MAKE) -C foosrc by touch $@ actually implies that prog is always updated)
It tried to find something about this in the documentation, but I failed. Thanks Christophe.
[Prev in Thread] | Current Thread | [Next in Thread] |