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



_______________________________________________
Help-make mailing list
Help-make@gnu.org
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to