[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: how to do recursive "subsystem" make properly?
From: |
Mark Galeck (CW) |
Subject: |
RE: how to do recursive "subsystem" make properly? |
Date: |
Tue, 3 Nov 2009 16:16:02 -0800 |
>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
- how to do recursive "subsystem" make properly?, Mark Galeck (CW), 2009/11/03
- Re: how to do recursive "subsystem" make properly?, John Calcote, 2009/11/03
- RE: how to do recursive "subsystem" make properly?, Mark Galeck (CW), 2009/11/03
- RE: how to do recursive "subsystem" make properly?, Paul Smith, 2009/11/03
- RE: how to do recursive "subsystem" make properly?, Mark Galeck (CW), 2009/11/03
- RE: how to do recursive "subsystem" make properly?, Paul Smith, 2009/11/03
- RE: how to do recursive "subsystem" make properly?, Mark Galeck (CW), 2009/11/03
- RE: how to do recursive "subsystem" make properly?, Mark Galeck (CW), 2009/11/03
- RE: how to do recursive "subsystem" make properly?, Paul Smith, 2009/11/03
- RE: how to do recursive "subsystem" make properly?,
Mark Galeck (CW) <=
- RE: how to do recursive "subsystem" make properly?, Mark Galeck (CW), 2009/11/03
- Re: how to do recursive "subsystem" make properly?, Bart Robinson, 2009/11/03
- Re: how to do recursive "subsystem" make properly?, Christophe LYON, 2009/11/09
- RE: how to do recursive "subsystem" make properly?, Mark Galeck (CW), 2009/11/09
- Re: how to do recursive "subsystem" make properly?, Paul Smith, 2009/11/09
- Re: how to do recursive "subsystem" make properly?, Christophe LYON, 2009/11/10
- Re: how to do recursive "subsystem" make properly?, Bart Robinson, 2009/11/10
- Re: how to do recursive "subsystem" make properly?, Stephan Beal, 2009/11/03