Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make make: make debug logging for .ORDER more human-...



details:   https://anonhg.NetBSD.org/src/rev/b930e444c6a9
branches:  trunk
changeset: 1029248:b930e444c6a9
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Dec 28 16:11:00 2021 +0000

description:
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.

diffstat:

 usr.bin/make/parse.c                     |  7 +++----
 usr.bin/make/unit-tests/deptgt-order.exp |  2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diffs (39 lines):

diff -r db09fc1284d5 -r b930e444c6a9 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Tue Dec 28 16:06:57 2021 +0000
+++ b/usr.bin/make/parse.c      Tue Dec 28 16:11:00 2021 +0000
@@ -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 @@
                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);
diff -r db09fc1284d5 -r b930e444c6a9 usr.bin/make/unit-tests/deptgt-order.exp
--- a/usr.bin/make/unit-tests/deptgt-order.exp  Tue Dec 28 16:06:57 2021 +0000
+++ b/usr.bin/make/unit-tests/deptgt-order.exp  Tue Dec 28 16:11:00 2021 +0000
@@ -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



Home | Main Index | Thread Index | Old Index