Hello,
If I have a target that is a soft symlink, the natural way to write the rule would be:
MAKEFILE := $(lastword $(MAKEFILE_LIST))
from: $(MAKEFILE)
ln -sf to $@
Except it does not work, if Makefile changes and becomes newer than "to", "from" is rebuilt all the time. I want to only consider the timestamp of the link file, not in addition to the timestamp of the linked file, but instead of.
How to do this? Clearly it has to depend on the Makefile, since if you change the rule to a different "to" file, the link must rebuild. But that also causes it to always rebuild.
How to correctly write a rule for a symlink?
Mark
_______________________________________________
Help-make mailing list
Help-make@gnu....
https://lists.gnu.org/mailman/listinfo/help-make
opensubscriber is not affiliated with the authors of this message nor responsible for its content.