[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Request for review of failing makefile
From: |
David Aldrich |
Subject: |
RE: Request for review of failing makefile |
Date: |
Mon, 21 Dec 2009 17:23:39 +0000 |
Hi Maxim and Bart
May I come back to you about your answers last week?
Maxim wrote:
> The above says that $(ARCHIVES_R) depend on a phony target
> $(STATIC_LIBS). What it does not say is how to update $(ARCHIVES_R), so
> that make considers $(ARCHIVES_R) to be always up-to-date, although its
> phony dependency always gets rebuild.
>
> You can quickly check if my hypothesis is correct by adding an empty
> command to $(ARCHIVES_R), e.g.
>
> $(ARCHIVES_R) : $(STATIC_LIBS)
> @echo "updated $@"
As I wrote before, this solved my problem, i.e. the executable now gets
relinked when the static library changes (before the link did not happen).
This is great. However, there is the side effect that I now see the
message:
"updated ../lib.a"
whenever the makefile finds any out-of-date target - such as an out-of-date
dynamic library. In such cases lib.a is not actually updated (which is
correct), it's just $(ARCHIVES_R) that is updated. So the message is
a bit misleading. Not a big deal, but is there a better way I can
implement this? (Perhaps I should just change the message).
Best regards
David