[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #19975] Add function: $(mtime foo.c) -> 1180203683
From: |
Matt McCutchen |
Subject: |
[bug #19975] Add function: $(mtime foo.c) -> 1180203683 |
Date: |
Sat, 26 May 2007 18:40:00 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070510 Fedora/1.5.0.10-6.fc6 Firefox/1.5.0.10 |
URL:
<http://savannah.gnu.org/bugs/?19975>
Summary: Add function: $(mtime foo.c) -> 1180203683
Project: make
Submitted by: hashproduct
Submitted on: Saturday 05/26/2007 at 18:39
Severity: 3 - Normal
Item Group: Enhancement
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: 3.81
Operating System: None
Fixed Release: None
_______________________________________________________
Details:
Please add a function $(mtime) that returns the modification time of a given
file as the number of seconds since the Epoch. This would be easy to do
because make already caches mtimes.
I am writing a build tool on top of make, and I want it to have a better rule
for whether a prerequisite makes a target out of date than make's.
Specifically, the tool will remember the prerequisite's mtime when the target
was last built and consider the target out of date if the prerequisite's mtime
has changed, forward or backward. I want to implement this using a function
in the target's prerequisite list that is called during second-expansion,
checks the prerequisite's mtime, and expands to FORCE or nothing as
appropriate.
The tool doesn't know which files' mtimes it is going to need until make
actually gets to those files, so the tool can't easily do any better than
getting the mtimes one at a time. Getting each mtime currently requires
running a stat(1) process, and doing this for every file *checked* (not just
built) is intolerably slow. The $(mtime) function would make it practical.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?19975>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #19975] Add function: $(mtime foo.c) -> 1180203683,
Matt McCutchen <=