Module Name:    src
Committed By:   rillig
Date:           Thu Jun 17 15:25:34 UTC 2021

Modified Files:
        src/usr.bin/make/unit-tests: deptgt-order.exp deptgt-order.mk

Log Message:
tests/make: add test for circular dependency in .ORDER


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/deptgt-order.exp
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/deptgt-order.mk

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/unit-tests/deptgt-order.exp
diff -u src/usr.bin/make/unit-tests/deptgt-order.exp:1.1 src/usr.bin/make/unit-tests/deptgt-order.exp:1.2
--- src/usr.bin/make/unit-tests/deptgt-order.exp:1.1	Sun Aug 16 12:07:51 2020
+++ src/usr.bin/make/unit-tests/deptgt-order.exp	Thu Jun 17 15:25:33 2021
@@ -1 +1,4 @@
+: 'Making two out of one.'
+: 'Making three out of two.'
+: 'Making all out of three.'
 exit status 0

Index: src/usr.bin/make/unit-tests/deptgt-order.mk
diff -u src/usr.bin/make/unit-tests/deptgt-order.mk:1.2 src/usr.bin/make/unit-tests/deptgt-order.mk:1.3
--- src/usr.bin/make/unit-tests/deptgt-order.mk:1.2	Sun Aug 16 14:25:16 2020
+++ src/usr.bin/make/unit-tests/deptgt-order.mk	Thu Jun 17 15:25:33 2021
@@ -1,8 +1,18 @@
-# $NetBSD: deptgt-order.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: deptgt-order.mk,v 1.3 2021/06/17 15:25:33 rillig Exp $
 #
 # Tests for the special target .ORDER in dependency declarations.
 
-# TODO: Implementation
+all one two three: .PHONY
 
-all:
-	@:;
+two: one
+	: 'Making $@ out of $>.'
+three: two
+	: 'Making $@ out of $>.'
+
+# This .ORDER creates a circular dependency since 'three' depends on 'one'
+# but 'one' is supposed to be built after 'three'.
+.ORDER: three one
+
+# XXX: The circular dependency should be detected here.
+all: three
+	: 'Making $@ out of $>.'

Reply via email to