Skip to content

Commit

Permalink
Convert traditional ${MK_TESTS} conditional idiom for including test
Browse files Browse the repository at this point in the history
directories to SUBDIR.${MK_TESTS} idiom

This is being done to pave the way for future work (and homogenity) in
^/projects/make-check-sandbox .

No functional change intended.

MFC after:	1 weeks
  • Loading branch information
ngie-eign committed Aug 2, 2017
1 parent 43c5cd5 commit d810089
Show file tree
Hide file tree
Showing 113 changed files with 117 additions and 346 deletions.
4 changes: 1 addition & 3 deletions bin/cat/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
PACKAGE=runtime
PROG= cat

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.prog.mk>
4 changes: 1 addition & 3 deletions bin/date/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ PACKAGE=runtime
PROG= date
SRCS= date.c netdate.c vary.c

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.prog.mk>
4 changes: 1 addition & 3 deletions bin/dd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ test: ${PROG} gen

@rm -f gen 1M_zeroes* obs_zeroes

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.prog.mk>
4 changes: 1 addition & 3 deletions bin/echo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
PACKAGE=runtime
PROG= echo

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.prog.mk>
4 changes: 1 addition & 3 deletions bin/expr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ CFLAGS+= -fwrapv

NO_WMISSING_VARIABLE_DECLARATIONS=

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.prog.mk>
4 changes: 1 addition & 3 deletions bin/ln/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ MAN= ln.1 symlink.7
LINKS= ${BINDIR}/ln ${BINDIR}/link
MLINKS= ln.1 link.1

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.prog.mk>
4 changes: 1 addition & 3 deletions bin/ls/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ CFLAGS+= -DCOLORLS
LIBADD+= termcapw
.endif

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.prog.mk>
4 changes: 1 addition & 3 deletions bin/mv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
PACKAGE=runtime
PROG= mv

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.prog.mk>
4 changes: 1 addition & 3 deletions bin/pax/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ SRCS= ar_io.c ar_subs.c buf_subs.c cache.c cpio.c file_subs.c ftree.c \
gen_subs.c getoldopt.c options.c pat_rep.c pax.c sel_subs.c \
tables.c tar.c tty_subs.c

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.prog.mk>
4 changes: 1 addition & 3 deletions bin/pkill/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ MLINKS= pkill.1 pgrep.1
SYMLINKS= ../..${BINDIR}/pkill /usr/bin/pkill
SYMLINKS+= ../..${BINDIR}/pgrep /usr/bin/pgrep

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.prog.mk>
4 changes: 1 addition & 3 deletions bin/sh/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ syntax.c syntax.h: mksyntax
token.h: mktokens
sh ${.CURDIR}/mktokens

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.prog.mk>
4 changes: 1 addition & 3 deletions bin/sleep/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
PACKAGE=runtime
PROG= sleep

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.prog.mk>
4 changes: 1 addition & 3 deletions bin/test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ PROG= test
LINKS= ${BINDIR}/test ${BINDIR}/[
MLINKS= test.1 [.1

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.prog.mk>
4 changes: 1 addition & 3 deletions cddl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
SUBDIR= lib .WAIT \
sbin usr.bin usr.sbin

.if ${MK_TESTS} != "no"
SUBDIR+=tests
.endif
SUBDIR.${MK_TESTS}+= tests

SUBDIR_PARALLEL=

Expand Down
5 changes: 1 addition & 4 deletions cddl/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ SUBDIR= ${_drti} \
${_libzfs_core} \
${_libzfs} \
${_libzpool} \
${_tests}

.if ${MK_TESTS} != "no"
_tests= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.if ${MK_ZFS} != "no"
_libzfs_core= libzfs_core
Expand Down
6 changes: 2 additions & 4 deletions cddl/sbin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

.include <src.opts.mk>

SUBDIR= ${_tests} ${_zfs} ${_zpool}
SUBDIR= ${_zfs} ${_zpool}

.if ${MK_TESTS} != "no"
_tests= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.if ${MK_ZFS} != "no"
_zfs= zfs
Expand Down
5 changes: 1 addition & 4 deletions cddl/usr.bin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@ SUBDIR= \
ctfconvert \
ctfdump \
ctfmerge \
${_tests} \
${_zinject} \
${_zlook} \
${_zstreamdump} \
${_ztest}

.if ${MK_TESTS} != "no"
_tests= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.if ${MK_ZFS} != "no"
_zinject= zinject
Expand Down
5 changes: 1 addition & 4 deletions cddl/usr.sbin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@
SUBDIR= ${_dtrace} \
${_lockstat} \
${_plockstat} \
${_tests} \
${_zdb} \
${_zfsd} \
${_zhack}

.if ${MK_TESTS} != "no"
_tests= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.if ${MK_ZFS} != "no"
.if ${MK_LIBTHR} != "no"
Expand Down
4 changes: 1 addition & 3 deletions contrib/ofed/usr.bin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ SUBDIR= ibaddr ibnetdiscover ibping ibportstate ibroute ibsendtrap ibstat \
ibsysstat ibtracert opensm perfquery saquery \
sminfo smpdump smpquery vendstat

.if ${MK_TESTS} != "no"
SUBDIR+= osmtest
.endif
SUBDIR.${MK_TESTS}+= tests

SUBDIR_PARALLEL=

Expand Down
6 changes: 2 additions & 4 deletions gnu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
.include <src.opts.mk>

SUBDIR= lib .WAIT \
${_tests} usr.bin
usr.bin

.if ${MK_TESTS} != "no"
_tests= tests
.endif
SUBDIR.${MK_TESTS}+= tests

SUBDIR_PARALLEL=

Expand Down
5 changes: 1 addition & 4 deletions lib/atf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@

SUBDIR= libatf-c \
libatf-c++ \
${_tests}

.if ${MK_TESTS} != "no"
_tests= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.subdir.mk>
4 changes: 1 addition & 3 deletions lib/atf/libatf-c++/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ INCSDIR_atf-c++.hpp= ${INCLUDEDIR}
MAN= atf-c++.3
MLINKS+= atf-c++.3 atf-c-api++.3 # Backwards compatibility.

.if ${MK_TESTS} != "no"
SUBDIR= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include "../common.mk"
.include <bsd.lib.mk>
4 changes: 1 addition & 3 deletions lib/atf/libatf-c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ INCSDIR_atf-c.h= ${INCLUDEDIR}
MAN= atf-c.3
MLINKS+= atf-c.3 atf-c-api.3 # Backwards compatibility.

.if ${MK_TESTS} != "no"
SUBDIR= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include "../common.mk"
.include <bsd.lib.mk>
4 changes: 1 addition & 3 deletions lib/libarchive/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,6 @@ MLINKS+= archive_write_set_options.3 archive_write_set_format_option.3
MLINKS+= archive_write_set_options.3 archive_write_set_option.3
MLINKS+= libarchive.3 archive.3

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.lib.mk>
4 changes: 1 addition & 3 deletions lib/libc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,7 @@ libkern.${LIBC_ARCH}:: ${KMSRCS}
${CP} ${.ALLSRC} ${DESTDIR}/sys/libkern/${LIBC_ARCH}
.endif

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.lib.mk>

Expand Down
4 changes: 1 addition & 3 deletions lib/libcasper/services/cap_dns/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ LIBADD= nv

CFLAGS+=-I${.CURDIR}

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.lib.mk>
4 changes: 1 addition & 3 deletions lib/libcasper/services/cap_grp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ LIBADD= nv

CFLAGS+=-I${.CURDIR}

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.lib.mk>
4 changes: 1 addition & 3 deletions lib/libcasper/services/cap_pwd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ LIBADD= nv

CFLAGS+=-I${.CURDIR}

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.lib.mk>
4 changes: 1 addition & 3 deletions lib/libcasper/services/cap_sysctl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ LIBADD= nv

CFLAGS+=-I${.CURDIR}

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.lib.mk>
4 changes: 1 addition & 3 deletions lib/libcrypt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ WARNS?= 2

PRECIOUSLIB=

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.lib.mk>
.include <bsd.subdir.mk>
4 changes: 1 addition & 3 deletions lib/libmp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ CFLAGS+= -I${SRCTOP}/crypto
VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def
SYMBOL_MAPS= ${.CURDIR}/Symbol.map

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.lib.mk>
4 changes: 1 addition & 3 deletions lib/libnv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ SRCS+= msgio.c
SRCS+= nvlist.c
SRCS+= nvpair.c

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.lib.mk>
4 changes: 1 addition & 3 deletions lib/libpathconv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ SRCS= abs2rel.c rel2abs.c
#VERSION_DEF= ${SRCTOP/lib/libc/Versions.def
#SYMBOL_MAPS= ${.CURDIR}/Symbol.map

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.lib.mk>
4 changes: 1 addition & 3 deletions lib/libproc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ SHLIB_MAJOR= 4

MAN=

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.lib.mk>
4 changes: 1 addition & 3 deletions lib/librt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ PRECIOUSLIB=
VERSION_DEF=${SRCTOP}/lib/libc/Versions.def
SYMBOL_MAPS=${.CURDIR}/Symbol.map

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.lib.mk>
4 changes: 1 addition & 3 deletions lib/libthr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so
SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a
.endif

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
SUBDIR.${MK_TESTS}+= tests

.include <bsd.lib.mk>
Loading

0 comments on commit d810089

Please sign in to comment.