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 posix1.mk and suffixes.mk need to cl...



details:   https://anonhg.NetBSD.org/src/rev/68cf459b66be
branches:  trunk
changeset: 802036:68cf459b66be
user:      sjg <sjg%NetBSD.org@localhost>
date:      Fri Aug 29 15:55:44 2014 +0000

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

diffstat:

 usr.bin/make/unit-tests/Makefile    |  4 ++--
 usr.bin/make/unit-tests/posix1.exp  |  6 +++---
 usr.bin/make/unit-tests/posix1.mk   |  9 +++++++--
 usr.bin/make/unit-tests/suffixes.mk |  7 ++++++-
 4 files changed, 18 insertions(+), 8 deletions(-)

diffs (98 lines):

diff -r a593908826ac -r 68cf459b66be usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile  Fri Aug 29 15:22:18 2014 +0000
+++ b/usr.bin/make/unit-tests/Makefile  Fri Aug 29 15:55:44 2014 +0000
@@ -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 @@
 
 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:
diff -r a593908826ac -r 68cf459b66be usr.bin/make/unit-tests/posix1.exp
--- a/usr.bin/make/unit-tests/posix1.exp        Fri Aug 29 15:22:18 2014 +0000
+++ b/usr.bin/make/unit-tests/posix1.exp        Fri Aug 29 15:55:44 2014 +0000
@@ -6,7 +6,7 @@
 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 @@
 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 @@
 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"
diff -r a593908826ac -r 68cf459b66be usr.bin/make/unit-tests/posix1.mk
--- a/usr.bin/make/unit-tests/posix1.mk Fri Aug 29 15:22:18 2014 +0000
+++ b/usr.bin/make/unit-tests/posix1.mk Fri Aug 29 15:55:44 2014 +0000
@@ -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 @@
 # 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:
diff -r a593908826ac -r 68cf459b66be usr.bin/make/unit-tests/suffixes.mk
--- a/usr.bin/make/unit-tests/suffixes.mk       Fri Aug 29 15:22:18 2014 +0000
+++ b/usr.bin/make/unit-tests/suffixes.mk       Fri Aug 29 15:55:44 2014 +0000
@@ -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 @@
 # 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:



Home | Main Index | Thread Index | Old Index