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-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make