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(1): add test for wrong debug message in GN...
details: https://anonhg.NetBSD.org/src/rev/e7fe075b6235
branches: trunk
changeset: 945845:e7fe075b6235
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Nov 08 10:17:55 2020 +0000
description:
make(1): add test for wrong debug message in GNode_IsOODate
diffstat:
usr.bin/make/make.c | 6 +++---
usr.bin/make/unit-tests/depsrc-optional.exp | 20 +++++++++++++++++++-
usr.bin/make/unit-tests/depsrc-optional.mk | 11 +++++++++--
3 files changed, 31 insertions(+), 6 deletions(-)
diffs (78 lines):
diff -r 67b6b90ff3d7 -r e7fe075b6235 usr.bin/make/make.c
--- a/usr.bin/make/make.c Sun Nov 08 10:08:28 2020 +0000
+++ b/usr.bin/make/make.c Sun Nov 08 10:17:55 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: make.c,v 1.195 2020/11/08 09:48:52 rillig Exp $ */
+/* $NetBSD: make.c,v 1.196 2020/11/08 10:17:55 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -108,7 +108,7 @@
#include "job.h"
/* "@(#)make.c 8.1 (Berkeley) 6/6/93" */
-MAKE_RCSID("$NetBSD: make.c,v 1.195 2020/11/08 09:48:52 rillig Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.196 2020/11/08 10:17:55 rillig Exp $");
/* Sequence # to detect recursion. */
static unsigned int checked = 1;
@@ -296,7 +296,7 @@
if (DEBUG(MAKE)) {
if (gn->youngestChild != NULL &&
gn->mtime < gn->youngestChild->mtime) {
- debug_printf("modified before source %s...",
+ debug_printf("modified before source \"%s\"...",
GNode_Path(gn->youngestChild));
} else if (gn->mtime == 0) {
debug_printf("non-existent and no sources...");
diff -r 67b6b90ff3d7 -r e7fe075b6235 usr.bin/make/unit-tests/depsrc-optional.exp
--- a/usr.bin/make/unit-tests/depsrc-optional.exp Sun Nov 08 10:08:28 2020 +0000
+++ b/usr.bin/make/unit-tests/depsrc-optional.exp Sun Nov 08 10:17:55 2020 +0000
@@ -1,2 +1,20 @@
-`all' is up to date.
+Make_ExpandUse: examine all
+MakeAddChild: need to examine important
+Make_ExpandUse: examine important
+MakeAddChild: need to examine optional
+MakeAddChild: need to examine optional-cohort
+Make_ExpandUse: examine optional
+Make_ExpandUse: examine optional-cohort
+Examining optional...non-existent...up-to-date.
+Examining optional-cohort...non-existent...non-existent and no sources...out-of-date.
+: This is not executed.
+ recheck(optional-cohort): update time from 0:00:00 Jan 01, 1970 to now
+Examining important...non-existent...modified before source "optional-cohort"...out-of-date.
+: important is made.
+ recheck(important): update time from 0:00:00 Jan 01, 1970 to now
+Examining all...non-existent...modified before source "important"...out-of-date.
+: all is made.
+ recheck(all): update time from 0:00:00 Jan 01, 1970 to now
+Examining .END...non-existent...non-existent and no sources...out-of-date.
+ recheck(.END): update time from 0:00:00 Jan 01, 1970 to now
exit status 0
diff -r 67b6b90ff3d7 -r e7fe075b6235 usr.bin/make/unit-tests/depsrc-optional.mk
--- a/usr.bin/make/unit-tests/depsrc-optional.mk Sun Nov 08 10:08:28 2020 +0000
+++ b/usr.bin/make/unit-tests/depsrc-optional.mk Sun Nov 08 10:17:55 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: depsrc-optional.mk,v 1.3 2020/09/05 15:57:12 rillig Exp $
+# $NetBSD: depsrc-optional.mk,v 1.4 2020/11/08 10:17:55 rillig Exp $
#
# Tests for the special source .OPTIONAL in dependency declarations,
# which ignores the target if make cannot find out how to create it.
@@ -11,8 +11,15 @@
all: important
: ${.TARGET} is made.
-important: optional
+important: optional optional-cohort
: ${.TARGET} is made.
optional: .OPTIONAL
: This is not executed.
+
+# XXX: "non-existent and no sources" is wrong, should be ":: operator and
+# no sources..." instead.
+optional-cohort:: .OPTIONAL
+ : This is not executed.
+
+.MAKEFLAGS: -dm
Home |
Main Index |
Thread Index |
Old Index