Module Name:    src
Committed By:   sjg
Date:           Tue Mar 29 17:29:21 UTC 2011

Modified Files:
        src/usr.bin/make: meta.c

Log Message:
Check for extra commands as soon as we reach CWD,
so we return faster (if oodate) and give a more accurate debug message.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/meta.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/meta.c
diff -u src/usr.bin/make/meta.c:1.13 src/usr.bin/make/meta.c:1.14
--- src/usr.bin/make/meta.c:1.13	Sun Mar 27 19:47:46 2011
+++ src/usr.bin/make/meta.c	Tue Mar 29 17:29:20 2011
@@ -1110,6 +1110,15 @@
 		    ln = Lst_Succ(ln);
 		}
 	    } else if (strcmp(buf, "CWD") == 0) {
+		/*
+		 * Check if there are extra commands now
+		 * that weren't in the meta data file.
+		 */
+		if (!oodate && ln != NULL) {
+		    if (DEBUG(META))
+			fprintf(debug_file, "%s: %d: there are extra build commands now that weren't in the meta data file\n", fname, lineno);
+		    oodate = TRUE;
+		}
 		if (strcmp(p, cwd) != 0) {
 		    if (DEBUG(META))
 			fprintf(debug_file, "%s: %d: the current working directory has changed from '%s' to '%s'\n", fname, lineno, p, curdir);
@@ -1118,16 +1127,6 @@
 	    }
 	}
 
-	/*
-	 * Check if there are extra commands now
-	 * that weren't in the meta data file.
-	 */
-	if (!oodate && ln != NULL) {
-	    if (DEBUG(META))
-		fprintf(debug_file, "%s: %d: there are extra build commands now that weren't in the meta data file\n", fname, lineno);
-	    oodate = TRUE;
-	}
-
 	fclose(fp);
     }
     if (oodate && ignoreOODATE) {

Reply via email to