aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/deptgt-suffixes.mk
diff options
context:
space:
mode:
Diffstat (limited to 'unit-tests/deptgt-suffixes.mk')
-rw-r--r--unit-tests/deptgt-suffixes.mk23
1 files changed, 20 insertions, 3 deletions
diff --git a/unit-tests/deptgt-suffixes.mk b/unit-tests/deptgt-suffixes.mk
index 791ff5eb5f03..15b4dc08161c 100644
--- a/unit-tests/deptgt-suffixes.mk
+++ b/unit-tests/deptgt-suffixes.mk
@@ -1,4 +1,4 @@
-# $NetBSD: deptgt-suffixes.mk,v 1.3 2020/08/28 04:05:35 rillig Exp $
+# $NetBSD: deptgt-suffixes.mk,v 1.4 2020/11/21 21:54:42 rillig Exp $
#
# Tests for the special target .SUFFIXES in dependency declarations.
#
@@ -8,11 +8,28 @@
.MAKEFLAGS: -dg1
+.MAIN: all
+
.SUFFIXES: .custom-null
# TODO: What is the effect of this? How is it useful?
.NULL: .custom-null
.PATH.custom-null: . ..
-all:
- @:;
+# The order in which the suffixes are listed doesn't matter.
+# Here, they are listed from source to target, just like in the transformation
+# rule below it.
+.SUFFIXES: .src-left .tgt-right
+deptgt-suffixes.src-left:
+ : Making ${.TARGET} out of nothing.
+.src-left.tgt-right:
+ : Making ${.TARGET} from ${.IMPSRC}.
+all: deptgt-suffixes.tgt-right
+
+# Here, the target is listed earlier than the source.
+.SUFFIXES: .tgt-left .src-right
+deptgt-suffixes.src-right:
+ : Making ${.TARGET} out of nothing.
+.src-right.tgt-left:
+ : Making ${.TARGET} from ${.IMPSRC}.
+all: deptgt-suffixes.tgt-left