Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make Skip reading .MAKE.DEPENDFILE if set to
details: https://anonhg.NetBSD.org/src/rev/0aef038cc6fb
branches: trunk
changeset: 945302:0aef038cc6fb
user: sjg <sjg%NetBSD.org@localhost>
date: Sun Oct 25 17:37:36 2020 +0000
description:
Skip reading .MAKE.DEPENDFILE if set to
"/dev/null" or anything starting with "no".
Ref: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223564
diffstat:
usr.bin/make/main.c | 17 ++++++++++-------
usr.bin/make/unit-tests/varmod-match-escape.exp | 2 ++
2 files changed, 12 insertions(+), 7 deletions(-)
diffs (48 lines):
diff -r a53d96af87e0 -r 0aef038cc6fb usr.bin/make/main.c
--- a/usr.bin/make/main.c Sun Oct 25 17:12:51 2020 +0000
+++ b/usr.bin/make/main.c Sun Oct 25 17:37:36 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.388 2020/10/24 20:29:40 rillig Exp $ */
+/* $NetBSD: main.c,v 1.389 2020/10/25 17:37:36 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -118,7 +118,7 @@
#include "trace.h"
/* "@(#)main.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: main.c,v 1.388 2020/10/24 20:29:40 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.389 2020/10/25 17:37:36 sjg Exp $");
#if defined(MAKE_NATIVE) && !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
"The Regents of the University of California. "
@@ -1408,12 +1408,15 @@
/* In particular suppress .depend for '-r -V .OBJDIR -f /dev/null' */
if (!noBuiltins || !printVars) {
- (void)Var_Subst("${.MAKE.DEPENDFILE:T}",
+ /* ignore /dev/null and anything starting with "no" */
+ (void)Var_Subst("${.MAKE.DEPENDFILE:N/dev/null:Nno*:T}",
VAR_CMD, VARE_WANTRES, &makeDependfile);
- /* TODO: handle errors */
- doing_depend = TRUE;
- (void)ReadMakefile(makeDependfile);
- doing_depend = FALSE;
+ if (makeDependfile[0] != '\0') {
+ /* TODO: handle errors */
+ doing_depend = TRUE;
+ (void)ReadMakefile(makeDependfile);
+ doing_depend = FALSE;
+ }
}
if (enterFlagObj)
diff -r a53d96af87e0 -r 0aef038cc6fb usr.bin/make/unit-tests/varmod-match-escape.exp
--- a/usr.bin/make/unit-tests/varmod-match-escape.exp Sun Oct 25 17:12:51 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-match-escape.exp Sun Oct 25 17:37:36 2020 +0000
@@ -1,3 +1,5 @@
Pattern[SPECIALS] for [\: : \\ * \*] is [\:]
Pattern[SPECIALS] for [\: : \\ * \*] is [:]
+Pattern[.MAKE.DEPENDFILE] for [.depend] is [/dev/null]
+Pattern[.MAKE.DEPENDFILE] for [.depend] is [no*]
exit status 0
Home |
Main Index |
Thread Index |
Old Index