From d2516343bc5c105543b22eed3b073a8a4e14a659 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Mon, 28 Feb 2005 07:48:22 +0000 Subject: * New feature: -L option * New function: $(info ...) * Disallow $(eval ...) to create prereq relationships inside command scripts (caused core dumps) * Try to allow more tests to succeed in Windows/DOS by sanitizing CRLF and \ * Various bug fixes and code cleanups (see the ChangeLog entry) --- file.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'file.c') diff --git a/file.c b/file.c index 62a6a68..45bcaef 100644 --- a/file.c +++ b/file.c @@ -31,6 +31,15 @@ Boston, MA 02111-1307, USA. */ #include "hash.h" +/* Remember whether snap_deps has been invoked: we need this to be sure we + don't add new rules (via $(eval ...)) afterwards. In the future it would + be nice to support this, but it means we'd need to re-run snap_deps() or + at least its functionality... it might mean changing snap_deps() to be run + per-file, so we can invoke it after the eval... or remembering which files + in the hash have been snapped (a new boolean flag?) and having snap_deps() + only work on files which have not yet been snapped. */ +int snapped_deps = 0; + /* Hash table of files the makefile knows how to make. */ static unsigned long @@ -611,6 +620,9 @@ snap_deps (void) f = lookup_file (".NOTPARALLEL"); if (f != 0 && f->is_target) not_parallel = 1; + + /* Remember that we've done this. */ + snapped_deps = 1; } /* Set the `command_state' member of FILE and all its `also_make's. */ -- cgit v1.2.3