Module Name: src
Committed By: rillig
Date: Tue Dec 28 16:11:01 UTC 2021
Modified Files:
src/usr.bin/make: parse.c
src/usr.bin/make/unit-tests: deptgt-order.exp
Log Message:
make: make debug logging for .ORDER more human-friendly
The interesting part of the .ORDER constraint is what is made before
what, so reveal this information in the debug log.
The debug output from the test looks a bit strange since it forces
'three' to be made before 'one', but that's because the test exercises
the edge case of introducing a circular dependency.
To generate a diff of this commit:
cvs rdiff -u -r1.591 -r1.592 src/usr.bin/make/parse.c
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/deptgt-order.exp
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/parse.c
diff -u src/usr.bin/make/parse.c:1.591 src/usr.bin/make/parse.c:1.592
--- src/usr.bin/make/parse.c:1.591 Tue Dec 28 15:48:59 2021
+++ src/usr.bin/make/parse.c Tue Dec 28 16:11:00 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.591 2021/12/28 15:48:59 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.592 2021/12/28 16:11:00 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
#include "pathnames.h"
/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.591 2021/12/28 15:48:59 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.592 2021/12/28 16:11:00 rillig Exp $");
/* types and constants */
@@ -900,8 +900,7 @@ ParseDependencySourceOrder(const char *s
Lst_Append(&gn->order_pred, order_pred);
if (DEBUG(PARSE)) {
debug_printf(
- "# ParseDependencySourceOrder: "
- "added Order dependency %s - %s\n",
+ "# .ORDER forces '%s' to be made before '%s'\n",
order_pred->name, gn->name);
Targ_PrintNode(order_pred, 0);
Targ_PrintNode(gn, 0);
Index: src/usr.bin/make/unit-tests/deptgt-order.exp
diff -u src/usr.bin/make/unit-tests/deptgt-order.exp:1.4 src/usr.bin/make/unit-tests/deptgt-order.exp:1.5
--- src/usr.bin/make/unit-tests/deptgt-order.exp:1.4 Tue Dec 28 15:49:00 2021
+++ src/usr.bin/make/unit-tests/deptgt-order.exp Tue Dec 28 16:11:00 2021
@@ -1,6 +1,6 @@
Parsing line 15: .ORDER: three one
ParseDependency(.ORDER: three one)
-# ParseDependencySourceOrder: added Order dependency three - one
+# .ORDER forces 'three' to be made before 'one'
# three, unmade, type OP_DEPENDS|OP_PHONY|OP_HAS_COMMANDS, flags none
# one, unmade, type OP_DEPENDS|OP_PHONY, flags none
Parsing line 16: .MAKEFLAGS: -d0