opensubscriber
   Find in this group all groups
 
Unknown more information…

h : help-make@gnu.org 14 April 2012 • 12:07AM -0400

how to use not "also" symbolic link time, but "only"
by Mark Galeck (CW)

REPLY TO AUTHOR
 
REPLY TO GROUP




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

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.