Module Name: src
Committed By: sjg
Date: Thu Apr 22 19:15:24 UTC 2010
Modified Files:
src/usr.bin/make: Makefile make.1
src/usr.bin/make/unit-tests: Makefile modmisc test.exp
Log Message:
PR: 42850
Reviewed by:
modmisc: since we apply an exists() test to $paths, be conservative
in what we expect.
Run the unit tests with -r -m / so that we do not fail if there
is no sys.mk present.
To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/usr.bin/make/Makefile
cvs rdiff -u -r1.170 -r1.171 src/usr.bin/make/make.1
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/modmisc
cvs rdiff -u -r1.32 -r1.33 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/Makefile
diff -u src/usr.bin/make/Makefile:1.49 src/usr.bin/make/Makefile:1.50
--- src/usr.bin/make/Makefile:1.49 Tue Apr 14 22:15:23 2009
+++ src/usr.bin/make/Makefile Thu Apr 22 19:15:23 2010
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.49 2009/04/14 22:15:23 lukem Exp $
+# $NetBSD: Makefile,v 1.50 2010/04/22 19:15:23 sjg Exp $
# @(#)Makefile 5.2 (Berkeley) 12/28/90
PROG= make
@@ -37,4 +37,4 @@
# A simple unit-test driver to help catch regressions
accept test:
- cd ${.CURDIR}/unit-tests && ${.MAKE:S,^./,${.CURDIR}/,} TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}
+ cd ${.CURDIR}/unit-tests && ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}
Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.170 src/usr.bin/make/make.1:1.171
--- src/usr.bin/make/make.1:1.170 Thu Apr 15 03:48:39 2010
+++ src/usr.bin/make/make.1 Thu Apr 22 19:15:23 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: make.1,v 1.170 2010/04/15 03:48:39 sjg Exp $
+.\" $NetBSD: make.1,v 1.171 2010/04/22 19:15:23 sjg Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" from: @(#)make.1 8.4 (Berkeley) 3/19/94
.\"
-.Dd April 14, 2010
+.Dd April 21, 2010
.Dt MAKE 1
.Os
.Sh NAME
@@ -659,6 +659,10 @@
.It Va .MAKE.EXPORTED
The list of variables exported by
.Nm .
+.It Va .MAKE.JOBS
+The argument to the
+.Fl j
+option.
.It Va .MAKE.JOB.PREFIX
If
.Nm
Index: src/usr.bin/make/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.26 src/usr.bin/make/unit-tests/Makefile:1.27
--- src/usr.bin/make/unit-tests/Makefile:1.26 Thu Apr 8 17:41:29 2010
+++ src/usr.bin/make/unit-tests/Makefile Thu Apr 22 19:15:24 2010
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2010/04/08 17:41:29 sjg Exp $
+# $NetBSD: Makefile,v 1.27 2010/04/22 19:15:24 sjg Exp $
#
# Unit tests for make(1)
# The main targets are:
@@ -53,9 +53,10 @@
clean:
rm -f *.out *.fail *.core
-.include <bsd.obj.mk>
+.-include <bsd.obj.mk>
TEST_MAKE?= ${.MAKE}
+TOOL_SED?= sed
# The driver.
# We always pretend .MAKE was called 'make'
Index: src/usr.bin/make/unit-tests/modmisc
diff -u src/usr.bin/make/unit-tests/modmisc:1.4 src/usr.bin/make/unit-tests/modmisc:1.5
--- src/usr.bin/make/unit-tests/modmisc:1.4 Thu May 11 15:37:07 2006
+++ src/usr.bin/make/unit-tests/modmisc Thu Apr 22 19:15:24 2010
@@ -1,8 +1,8 @@
-# $Id: modmisc,v 1.4 2006/05/11 15:37:07 sjg Exp $
+# $Id: modmisc,v 1.5 2010/04/22 19:15:24 sjg Exp $
#
# miscellaneous modifier tests
-path=:/bin:/usr/bin::/sbin:/usr/sbin:.:/home/user/bin:.
+path=:/bin:/usr/bin::/:.:/user/bin:.
# strip cwd from path.
MOD_NODOT=S/:/ /g:N.:ts:
# and decorate, note that $'s need to be doubled. Also note that
Index: src/usr.bin/make/unit-tests/test.exp
diff -u src/usr.bin/make/unit-tests/test.exp:1.32 src/usr.bin/make/unit-tests/test.exp:1.33
--- src/usr.bin/make/unit-tests/test.exp:1.32 Wed Apr 21 04:25:28 2010
+++ src/usr.bin/make/unit-tests/test.exp Thu Apr 22 19:15:24 2010
@@ -112,14 +112,14 @@
LIB=e X_LIBS:M*/lib${LIB}.a is "/tmp/libe.a"
LIB=e X_LIBS:M*/lib${LIB}.a:tu is "/TMP/LIBE.A"
Mscanner=OK
-path=':/bin:/usr/bin::/sbin:/usr/sbin:.:/home/user/bin:.'
-path='/bin:/usr/bin:/sbin:/usr/sbin:/home/user/bin'
-path='/bin:/usr/bin:/sbin:/usr/sbin:/homes/user/bin'
-path='/bin':'/usr/bin':'/sbin':'/usr/sbin':'/home/user/bin'
-path='/bin':'/usr/bin':'/sbin':'/usr/sbin':'/homes/user/bin'
+path=':/bin:/usr/bin::/:.:/user/bin:.'
+path='/bin:/usr/bin:/:/user/bin'
+path='/bin:/usr/bin:/:/user/bin'
+path='/bin':'/usr/bin':'/':'/user/bin'
+path='/bin':'/usr/bin':'/':'/user/bin'
path_/usr/xbin=/opt/xbin/
-paths=/bin /usr/bin /sbin /usr/sbin /homes/user/bin /opt/xbin
-PATHS=/BIN /USR/BIN /SBIN /USR/SBIN /HOMES/USER/BIN /OPT/XBIN
+paths=/bin /usr/bin / /user/bin /opt/xbin
+PATHS=/BIN /USR/BIN / /USER/BIN /OPT/XBIN
LIST = one two three four five six seven eight nine ten
LIST:O = eight five four nine one seven six ten three two
LIST:Ox = Ok