Module Name:    src
Committed By:   sjg
Date:           Fri Apr  3 03:32:28 UTC 2020

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

Log Message:
CHECK_VALID_META is too agressive for CMD check.

An empty CMD is perfectly valid.
So using CHECK_VALID_META results in too much rebuilding.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/usr.bin/make/make.h
cvs rdiff -u -r1.80 -r1.81 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/make.h
diff -u src/usr.bin/make/make.h:1.105 src/usr.bin/make/make.h:1.106
--- src/usr.bin/make/make.h:1.105	Mon Mar 30 02:41:06 2020
+++ src/usr.bin/make/make.h	Fri Apr  3 03:32:28 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.h,v 1.105 2020/03/30 02:41:06 sjg Exp $	*/
+/*	$NetBSD: make.h,v 1.106 2020/04/03 03:32:28 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -532,4 +532,8 @@ int cached_stat(const char *, void *);
 #define KILLPG(pid, sig)	killpg((pid), (sig))
 #endif
 
+#ifndef __arraycount
+#define __arraycount(__x)	(sizeof(__x) / sizeof(__x[0]))
+#endif
+
 #endif /* _MAKE_H_ */

Index: src/usr.bin/make/meta.c
diff -u src/usr.bin/make/meta.c:1.80 src/usr.bin/make/meta.c:1.81
--- src/usr.bin/make/meta.c:1.80	Wed Mar 18 23:53:02 2020
+++ src/usr.bin/make/meta.c	Fri Apr  3 03:32:28 2020
@@ -1,4 +1,4 @@
-/*      $NetBSD: meta.c,v 1.80 2020/03/18 23:53:02 sjg Exp $ */
+/*      $NetBSD: meta.c,v 1.81 2020/04/03 03:32:28 sjg Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -1558,8 +1558,8 @@ meta_oodate(GNode *gn, Boolean oodate)
 			if (buf[x - 1] == '\n')
 			    buf[x - 1] = '\0';
 		    }
-		    CHECK_VALID_META(p);
-		    if (!hasOODATE &&
+		    if (p &&
+			!hasOODATE &&
 			!(gn->type & OP_NOMETA_CMP) &&
 			strcmp(p, cmd) != 0) {
 			if (DEBUG(META))

Reply via email to