Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make/unit-tests make(1): in the deptgt test, describ...
details: https://anonhg.NetBSD.org/src/rev/fa0ff0d18620
branches: trunk
changeset: 976222:fa0ff0d18620
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Sep 14 18:27:15 2020 +0000
description:
make(1): in the deptgt test, describe what happens to the targets
diffstat:
usr.bin/make/unit-tests/deptgt.exp | 2 +-
usr.bin/make/unit-tests/deptgt.mk | 19 ++++++++++---------
2 files changed, 11 insertions(+), 10 deletions(-)
diffs (50 lines):
diff -r b2b68ce4f285 -r fa0ff0d18620 usr.bin/make/unit-tests/deptgt.exp
--- a/usr.bin/make/unit-tests/deptgt.exp Mon Sep 14 18:21:26 2020 +0000
+++ b/usr.bin/make/unit-tests/deptgt.exp Mon Sep 14 18:27:15 2020 +0000
@@ -1,5 +1,5 @@
make: "deptgt.mk" line 10: warning: Extra target ignored
-make: "deptgt.mk" line 27: Unassociated shell command ": command3"
+make: "deptgt.mk" line 28: Unassociated shell command ": command3 # parse error, since targets == NULL"
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
diff -r b2b68ce4f285 -r fa0ff0d18620 usr.bin/make/unit-tests/deptgt.mk
--- a/usr.bin/make/unit-tests/deptgt.mk Mon Sep 14 18:21:26 2020 +0000
+++ b/usr.bin/make/unit-tests/deptgt.mk Mon Sep 14 18:27:15 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: deptgt.mk,v 1.4 2020/09/14 18:21:26 rillig Exp $
+# $NetBSD: deptgt.mk,v 1.5 2020/09/14 18:27:15 rillig Exp $
#
# Tests for special targets like .BEGIN or .SUFFIXES in dependency
# declarations.
@@ -9,9 +9,7 @@
# dependency line: That doesn't work, and make immediately rejects it.
.SUFFIXES .PHONY: .c.o
-# Keyword "parse.c:targets"
-#
-# The following lines demonstrate how 'target' is set and reset during
+# The following lines demonstrate how 'targets' is set and reset during
# parsing of dependencies. To see it in action, set breakpoints in:
#
# ParseDoDependency at the beginning
@@ -20,11 +18,14 @@
# Parse_File at "targets = Lst_Init()"
# Parse_File at "!inLine"
#
-target1 target2: sources
- : command1
- : command2
-VAR=value
- : command3
+# Keywords:
+# parse.c:targets
+
+target1 target2: sources # targets := [target1, target2]
+ : command1 # targets == [target1, target2]
+ : command2 # targets == [target1, target2]
+VAR=value # targets := NULL
+ : command3 # parse error, since targets == NULL
all:
@:;
Home |
Main Index |
Thread Index |
Old Index