Module Name:    src
Committed By:   sjg
Date:           Fri Aug 29 15:55:44 UTC 2014

Modified Files:
        src/usr.bin/make/unit-tests: Makefile posix1.exp posix1.mk suffixes.mk

Log Message:
posix1.mk and suffixes.mk need to cleanup in order to achieve
repeatable results.
posix1.mk's lib.a target still looks dubious.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/posix1.exp
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/posix1.mk \
    src/usr.bin/make/unit-tests/suffixes.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/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.48 src/usr.bin/make/unit-tests/Makefile:1.49
--- src/usr.bin/make/unit-tests/Makefile:1.48	Sun Aug 24 17:17:24 2014
+++ src/usr.bin/make/unit-tests/Makefile	Fri Aug 29 15:55:44 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.48 2014/08/24 17:17:24 apb Exp $
+# $NetBSD: Makefile,v 1.49 2014/08/29 15:55:44 sjg Exp $
 #
 # Unit tests for make(1)
 # The main targets are:
@@ -66,7 +66,7 @@ all: ${OUTFILES}
 
 CLEANFILES += *.rawout *.out *.status *.tmp *.core *.tmp
 CLEANFILES += obj*.[och] lib*.a		# posix1.mk
-CLEANFILES += issue*			# suffixes.mk
+CLEANFILES += issue* .[ab]*		# suffixes.mk
 CLEANRECURSIVE += dir dummy		# posix1.mk
 
 clean:

Index: src/usr.bin/make/unit-tests/posix1.exp
diff -u src/usr.bin/make/unit-tests/posix1.exp:1.2 src/usr.bin/make/unit-tests/posix1.exp:1.3
--- src/usr.bin/make/unit-tests/posix1.exp:1.2	Sat Aug 23 16:08:42 2014
+++ src/usr.bin/make/unit-tests/posix1.exp	Fri Aug 29 15:55:44 2014
@@ -6,7 +6,7 @@ foo baR baz,  bar baz, foo bar baz, fooa
 mkdir -p 'dir'
 touch 'dir/obj_1.h'
 mkdir -p 'dir'
-printf '#include "obj_1.h"\nconst char* obj_1 = "dir/obj_1.c";' \
+printf '#include "obj_1.h"\nconst char* obj_1 = "dir/obj_1.c";\n' \
     >'dir/obj_1.c'
 Local variables
  $(@)="dir/obj_1.o" $(<)="dir/obj_1.c"
@@ -90,7 +90,7 @@ ar -rcv 'lib.a' 'obj1.o'
 a - obj1.o
 rm -f 'obj1.o'
 mkdir -p '.'
-printf '#include "obj_2.h"\nconst char* obj_2 = "obj_2.c";' \
+printf '#include "obj_2.h"\nconst char* obj_2 = "obj_2.c";\n' \
     >'obj_2.c'
 mkdir -p '.'
 touch 'obj_2.h'
@@ -139,7 +139,7 @@ touch 'obj3.h'
 mkdir -p 'dir'
 touch 'dir/dummy'
 mkdir -p '.'
-printf '#include "obj3.h"\nconst char* obj3 = "obj3.c";' \
+printf '#include "obj3.h"\nconst char* obj3 = "obj3.c";\n' \
     >'obj3.c'
 Local variables
  $(@)="lib.a" $(<)="obj3.c"

Index: src/usr.bin/make/unit-tests/posix1.mk
diff -u src/usr.bin/make/unit-tests/posix1.mk:1.1 src/usr.bin/make/unit-tests/posix1.mk:1.2
--- src/usr.bin/make/unit-tests/posix1.mk:1.1	Sat Aug 23 15:02:04 2014
+++ src/usr.bin/make/unit-tests/posix1.mk	Fri Aug 29 15:55:44 2014
@@ -1,10 +1,15 @@
-# $NetBSD: posix1.mk,v 1.1 2014/08/23 15:02:04 christos Exp $
+# $NetBSD: posix1.mk,v 1.2 2014/08/29 15:55:44 sjg Exp $
 
 # Keep the default suffixes from interfering, just in case.
 .SUFFIXES:
 
 all:	line-continuations suffix-substitution localvars
 
+# we need to clean for repeatable results
+.BEGIN: clean
+clean:
+	@rm -f lib.a dir/* dummy obj*
+
 #
 # Line continuations
 #
@@ -171,7 +176,7 @@ obj2.o: obj_2.c obj_2.h dir/obj_1.h
 # as a bait for a regression into the forced dependencies discussed earlier.
 obj1.c dir/obj_1.c obj2.c obj_2.c obj3.c:
 	mkdir -p '$(@D)'
-	printf '#include "$(@F:.c=.h)"\nconst char* $(@F:.c=) = "$(@)";' \
+	printf '#include "$(@F:.c=.h)"\nconst char* $(@F:.c=) = "$(@)";\n' \
 	    >'$(@)'
 
 dir/obj_1.h obj_2.h obj3.h dummy dir/dummy:
Index: src/usr.bin/make/unit-tests/suffixes.mk
diff -u src/usr.bin/make/unit-tests/suffixes.mk:1.1 src/usr.bin/make/unit-tests/suffixes.mk:1.2
--- src/usr.bin/make/unit-tests/suffixes.mk:1.1	Sat Aug 23 15:05:40 2014
+++ src/usr.bin/make/unit-tests/suffixes.mk	Fri Aug 29 15:55:44 2014
@@ -1,4 +1,4 @@
-# $NetBSD: suffixes.mk,v 1.1 2014/08/23 15:05:40 christos Exp $
+# $NetBSD: suffixes.mk,v 1.2 2014/08/29 15:55:44 sjg Exp $
 
 # Issues from PR 49086
 
@@ -46,6 +46,11 @@ all: issue10.e
 # available, so they would have expanded to a null string.
 all: issue11.j
 
+# we need to clean for repeatable results
+.BEGIN: clean
+clean:
+	@rm -f issue* .[ab]*
+
 .SUFFIXES: .a .b .c
 
 .a .a.b .b.a:

Reply via email to