>The sentinel file has to be created: it has to exist. A non-existent
file is always considered out of date. If it exists but then is not
updated, THEN it is not considered out of date.
Yes - I did have it created, and still it did not work, just like I explained.
So, in my last message (before this one) I actually posted a short example of
what I am trying to accomplish - so that it is precise. That example can be
solved with the use of FORCE target as Paul described earlier. But of course,
I do have more targets than one in the submakefile.
So then, I finally got it to work by combining two of Pauls suggestions, the
sentinel and the FORCE:
top makefile is
foobar: subdir/sentinel
echo making foobar
touch foobar
subdir/sentinel: FORCE
$(MAKE) -C subdir
FORCE: ;
bottom makefile is
.PHONY: all
all: foobaro foobazo
sentinel: all
foobaro: foobarc
touch foobaro
echo making foobaro
touch sentinel
foobazo: foobazc
touch foobazo
echo making foobazo
touch sentinel
Now, if I touch foobarc or foobarz, then and only then foobar gets rebuilt!
Great, finally I got it!
Except... there is still one little problem. When foobar does not get
rebuilt, we would like some kind of message to the user, indicating that fact,
such as "nothing to be done for foobar". And that message has to be after the
subdir messages. How in the world do I do this??
Mark
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make