Module Name:    src
Committed By:   sjg
Date:           Fri Nov  9 19:08:29 UTC 2012

Modified Files:
        src/usr.bin/make/unit-tests: Makefile test.exp
Added Files:
        src/usr.bin/make/unit-tests: order

Log Message:
Add a unit-test for .ORDER


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/order
cvs rdiff -u -r1.40 -r1.41 src/usr.bin/make/unit-tests/test.exp

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/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.34 src/usr.bin/make/unit-tests/Makefile:1.35
--- src/usr.bin/make/unit-tests/Makefile:1.34	Tue Jun 19 23:25:53 2012
+++ src/usr.bin/make/unit-tests/Makefile	Fri Nov  9 19:08:28 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.34 2012/06/19 23:25:53 sjg Exp $
+# $NetBSD: Makefile,v 1.35 2012/11/09 19:08:28 sjg Exp $
 #
 # Unit tests for make(1)
 # The main targets are:
@@ -36,6 +36,7 @@ SUBFILES= \
 	modorder \
 	modts \
 	modword \
+	order \
 	phony-end \
 	posix \
 	qequals \
@@ -48,6 +49,7 @@ SUBFILES= \
 all: ${SUBFILES}
 
 flags.doterror=
+flags.order=-j1
 
 # the tests are actually done with sub-makes.
 .PHONY: ${SUBFILES}

Index: src/usr.bin/make/unit-tests/test.exp
diff -u src/usr.bin/make/unit-tests/test.exp:1.40 src/usr.bin/make/unit-tests/test.exp:1.41
--- src/usr.bin/make/unit-tests/test.exp:1.40	Tue Jun 19 23:25:53 2012
+++ src/usr.bin/make/unit-tests/test.exp	Fri Nov  9 19:08:28 2012
@@ -310,6 +310,9 @@ LIST:tw:C/ /,/g="one two three four five
 LIST:tw:C/ /,/1g="one two three four five six"
 LIST:tw:tW:C/ /,/="one,two three four five six"
 LIST:tW:tw:C/ /,/="one two three four five six"
+Making the.c
+Making the.h
+Making the.o from the.h the.c
 .TARGET="phony" .PREFIX="phony" .IMPSRC=""
 .TARGET="all" .PREFIX="all" .IMPSRC=""
 .TARGET="ok" .PREFIX="ok" .IMPSRC=""

Added files:

Index: src/usr.bin/make/unit-tests/order
diff -u /dev/null src/usr.bin/make/unit-tests/order:1.1
--- /dev/null	Fri Nov  9 19:08:29 2012
+++ src/usr.bin/make/unit-tests/order	Fri Nov  9 19:08:28 2012
@@ -0,0 +1,20 @@
+# $NetBSD: order,v 1.1 2012/11/09 19:08:28 sjg Exp $
+
+# Test that .ORDER is handled correctly.
+# The explicit dependency the.o: the.h will make us examine the.h
+# the .ORDER will prevent us building it immediately,
+# we should then examine the.c rather than stop.
+
+all: the.o
+
+.ORDER: the.c the.h
+
+the.c the.h:
+	@echo Making $@
+
+.SUFFIXES: .o .c
+
+.c.o:
+	@echo Making $@ from $?
+
+the.o: the.h

Reply via email to