help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I get `make` to look at the mtime of a symlink?


From: Paul Smith
Subject: Re: How can I get `make` to look at the mtime of a symlink?
Date: Sun, 06 Aug 2017 14:16:46 -0400

On Sun, 2017-08-06 at 12:02 -0400, Stefan Monnier wrote:
> > > I need to update some files whenever a symlink changes, even if the new
> > > target of the symlink is an old file.
> > > How can I do that with GNU Make?
> > See:
> >        -L, --check-symlink-times
> >             Use the latest mtime between symlinks and target.
> 
> Thanks.  Is there a way to do it from within the Makefile (either
> globally, or for specific targets)?

It should work to add:

  MAKEFLAGS += -L

into your makefile.

You can't do it just for certain targets though... well, I guess you
could replace those recipes with some kind of recursive make invocation
that added the -L option for just those targets.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]