Thu Aug 27 19:09:37 2020 UTC ()
make(1): pass the command-line variables to the subdir make


(rillig)
diff -r1.94 -r1.95 src/usr.bin/make/Makefile

cvs diff -r1.94 -r1.95 src/usr.bin/make/Makefile (expand / switch to unified diff)

--- src/usr.bin/make/Makefile 2020/08/26 23:00:47 1.94
+++ src/usr.bin/make/Makefile 2020/08/27 19:09:37 1.95
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.94 2020/08/26 23:00:47 rillig Exp $ 1# $NetBSD: Makefile,v 1.95 2020/08/27 19:09:37 rillig Exp $
2# @(#)Makefile 5.2 (Berkeley) 12/28/90 2# @(#)Makefile 5.2 (Berkeley) 12/28/90
3 3
4PROG= make 4PROG= make
5SRCS= arch.c 5SRCS= arch.c
6SRCS+= buf.c 6SRCS+= buf.c
7SRCS+= compat.c 7SRCS+= compat.c
8SRCS+= cond.c 8SRCS+= cond.c
9SRCS+= dir.c 9SRCS+= dir.c
10SRCS+= enum.c 10SRCS+= enum.c
11SRCS+= for.c 11SRCS+= for.c
12SRCS+= hash.c 12SRCS+= hash.c
13SRCS+= job.c 13SRCS+= job.c
14SRCS+= lst.c 14SRCS+= lst.c
@@ -169,21 +169,21 @@ CPPFLAGS+= ${USER_CPPFLAGS} @@ -169,21 +169,21 @@ CPPFLAGS+= ${USER_CPPFLAGS}
169CFLAGS+= ${USER_CFLAGS} 169CFLAGS+= ${USER_CFLAGS}
170 170
171# A simple unit-test driver to help catch regressions 171# A simple unit-test driver to help catch regressions
172TEST_MAKE ?= ${.OBJDIR}/${PROG:T} 172TEST_MAKE ?= ${.OBJDIR}/${PROG:T}
173test: .MAKE 173test: .MAKE
174 cd ${.CURDIR}/unit-tests \ 174 cd ${.CURDIR}/unit-tests \
175 && MAKEFLAGS= ${TEST_MAKE} -r -m / TEST_MAKE=${TEST_MAKE} ${TESTS:DTESTS=${TESTS:Q}} ${.TARGET} 175 && MAKEFLAGS= ${TEST_MAKE} -r -m / TEST_MAKE=${TEST_MAKE} ${TESTS:DTESTS=${TESTS:Q}} ${.TARGET}
176.if ${USE_COVERAGE} == yes 176.if ${USE_COVERAGE} == yes
177 ${GCOV} ${GCOV_OPTS} ${SRCS} 177 ${GCOV} ${GCOV_OPTS} ${SRCS}
178 sed -i 's,^\([^:]*\): *[0-9]*:,\1: ,' *.gcov 178 sed -i 's,^\([^:]*\): *[0-9]*:,\1: ,' *.gcov
179.endif 179.endif
180 180
181accept sync-mi: .MAKE 181accept sync-mi: .MAKE
182 cd ${.CURDIR}/unit-tests && ${.MAKE} ${.TARGET} 182 cd ${.CURDIR}/unit-tests && ${.MAKE} ${MAKEFLAGS} ${.TARGET}
183 183
184retest: 184retest:
185 ${.MAKE} -C ${.CURDIR}/unit-tests cleandir 185 ${.MAKE} -C ${.CURDIR}/unit-tests cleandir
186.if ${USE_COVERAGE} == yes 186.if ${USE_COVERAGE} == yes
187 rm -f *.gcov *.gcda 187 rm -f *.gcov *.gcda
188.endif 188.endif
189 ${.MAKE} test 189 ${.MAKE} test