Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make Resurrect revision 1.23: no need to stat .PHONY...



details:   https://anonhg.NetBSD.org/src/rev/3ffb3c87fb2e
branches:  trunk
changeset: 521698:3ffb3c87fb2e
user:      pk <pk%NetBSD.org@localhost>
date:      Sun Feb 03 20:08:30 2002 +0000

description:
Resurrect revision 1.23: no need to stat .PHONY targets.

diffstat:

 usr.bin/make/dir.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r d376deef9fac -r 3ffb3c87fb2e usr.bin/make/dir.c
--- a/usr.bin/make/dir.c        Sun Feb 03 20:04:31 2002 +0000
+++ b/usr.bin/make/dir.c        Sun Feb 03 20:08:30 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dir.c,v 1.32 2002/01/31 12:38:34 pk Exp $      */
+/*     $NetBSD: dir.c,v 1.33 2002/02/03 20:08:30 pk Exp $      */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -39,14 +39,14 @@
  */
 
 #ifdef MAKE_BOOTSTRAP
-static char rcsid[] = "$NetBSD: dir.c,v 1.32 2002/01/31 12:38:34 pk Exp $";
+static char rcsid[] = "$NetBSD: dir.c,v 1.33 2002/02/03 20:08:30 pk Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)dir.c      8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: dir.c,v 1.32 2002/01/31 12:38:34 pk Exp $");
+__RCSID("$NetBSD: dir.c,v 1.33 2002/02/03 20:08:30 pk Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -1230,8 +1230,11 @@
 
     if (gn->type & OP_ARCHV) {
        return Arch_MTime (gn);
+    } else if (gn->type & OP_PHONY) {
+       gn->mtime = 0;
+       return 0;
     } else if (gn->path == (char *)NULL) {
-       if (gn->type & (OP_PHONY|OP_NOPATH))
+       if (gn->type & OP_NOPATH)
            fullName = NULL;
        else
            fullName = Dir_FindFile (gn->name, dirSearchPath);



Home | Main Index | Thread Index | Old Index