summaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/parse.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index fa6e87a7ffd..1a936011030 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.229 2018/04/05 16:31:54 christos Exp $ */
+/* $NetBSD: parse.c,v 1.230 2018/12/17 02:06:00 christos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.229 2018/04/05 16:31:54 christos Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.230 2018/12/17 02:06:00 christos Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: parse.c,v 1.229 2018/04/05 16:31:54 christos Exp $");
+__RCSID("$NetBSD: parse.c,v 1.230 2018/12/17 02:06:00 christos Exp $");
#endif
#endif /* not lint */
#endif
@@ -681,11 +681,11 @@ ParseVErrorInternal(FILE *f, const char *cfname, size_t clineno, int type,
/*
* Nothing is more annoying than not knowing
- * which Makefile is the culprit.
+ * which Makefile is the culprit; we try ${.PARSEDIR}
+ * first and if that's not absolute, we try ${.CURDIR}
*/
dir = Var_Value(".PARSEDIR", VAR_GLOBAL, &cp);
- if (dir == NULL || *dir == '\0' ||
- (*dir == '.' && dir[1] == '\0'))
+ if (dir == NULL || *dir == '\0' || *dir != '/')
dir = Var_Value(".CURDIR", VAR_GLOBAL, &cp);
if (dir == NULL)
dir = ".";