Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make Check for extra commands as soon as we reach CWD,



details:   https://anonhg.NetBSD.org/src/rev/6e026bbb99ef
branches:  trunk
changeset: 763644:6e026bbb99ef
user:      sjg <sjg%NetBSD.org@localhost>
date:      Tue Mar 29 17:29:20 2011 +0000

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

diffstat:

 usr.bin/make/meta.c |  19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diffs (36 lines):

diff -r 992604c91465 -r 6e026bbb99ef usr.bin/make/meta.c
--- a/usr.bin/make/meta.c       Tue Mar 29 17:19:22 2011 +0000
+++ b/usr.bin/make/meta.c       Tue Mar 29 17:29:20 2011 +0000
@@ -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) {



Home | Main Index | Thread Index | Old Index