diff --git a/cddl/Makefile b/cddl/Makefile index 801d9cffa015..2a9b6f8089d5 100644 --- a/cddl/Makefile +++ b/cddl/Makefile @@ -1,5 +1,11 @@ # $FreeBSD$ +.include + SUBDIR= lib sbin usr.bin usr.sbin +.if ${MK_TESTS} != "no" +SUBDIR+=tests +.endif + .include diff --git a/cddl/lib/Makefile b/cddl/lib/Makefile index 53d402a7aaa8..fef13839d9ae 100644 --- a/cddl/lib/Makefile +++ b/cddl/lib/Makefile @@ -1,30 +1,35 @@ # $FreeBSD$ .include SUBDIR= ${_drti} \ libavl \ libctf \ ${_libdtrace} \ libnvpair \ libumem \ libuutil \ ${_libzfs_core} \ ${_libzfs} \ - ${_libzpool} + ${_libzpool} \ + ${_tests} + +.if ${MK_TESTS} != "no" +_tests= tests +.endif .if ${MK_ZFS} != "no" _libzfs_core= libzfs_core _libzfs= libzfs .if ${MK_LIBTHR} != "no" _libzpool= libzpool .endif .endif .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \ ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "powerpc" _drti= drti _libdtrace= libdtrace .endif .include diff --git a/cddl/lib/tests/Makefile b/cddl/lib/tests/Makefile new file mode 100644 index 000000000000..4a49d9fee849 --- /dev/null +++ b/cddl/lib/tests/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/cddl/lib + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +.include diff --git a/cddl/sbin/Makefile b/cddl/sbin/Makefile index f74307c5fd6a..4fd96f6ee0e5 100644 --- a/cddl/sbin/Makefile +++ b/cddl/sbin/Makefile @@ -1,12 +1,16 @@ # $FreeBSD$ .include -SUBDIR= ${_zfs} ${_zpool} +SUBDIR= ${_tests} ${_zfs} ${_zpool} + +.if ${MK_TESTS} != "no" +_tests= tests +.endif .if ${MK_ZFS} != "no" _zfs= zfs _zpool= zpool .endif .include diff --git a/cddl/sbin/tests/Makefile b/cddl/sbin/tests/Makefile new file mode 100644 index 000000000000..91bbaee271f4 --- /dev/null +++ b/cddl/sbin/tests/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/cddl/sbin + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +.include diff --git a/cddl/tests/Makefile b/cddl/tests/Makefile new file mode 100644 index 000000000000..34a27ea636a0 --- /dev/null +++ b/cddl/tests/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/cddl + +.PATH: ${.CURDIR:H:H}/tests +KYUAFILE= yes + +.include diff --git a/cddl/usr.bin/Makefile b/cddl/usr.bin/Makefile index 13d3a86232cb..3547ff7b6994 100644 --- a/cddl/usr.bin/Makefile +++ b/cddl/usr.bin/Makefile @@ -1,24 +1,29 @@ # $FreeBSD$ .include SUBDIR= \ ctfconvert \ ctfdump \ ctfmerge \ sgsmsg \ + ${_tests} \ ${_zinject} \ ${_zlook} \ ${_zstreamdump} \ ${_ztest} +.if ${MK_TESTS} != "no" +_tests= tests +.endif + .if ${MK_ZFS} != "no" _zinject= zinject #_zlook= zlook .if ${MK_LIBTHR} != "no" _ztest= ztest _zstreamdump = zstreamdump .endif .endif .include diff --git a/cddl/usr.bin/tests/Makefile b/cddl/usr.bin/tests/Makefile new file mode 100644 index 000000000000..c94d5910a210 --- /dev/null +++ b/cddl/usr.bin/tests/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/cddl/usr.bin + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +.include diff --git a/cddl/usr.sbin/Makefile b/cddl/usr.sbin/Makefile index fb2c43738b5c..8551c28a1a0b 100644 --- a/cddl/usr.sbin/Makefile +++ b/cddl/usr.sbin/Makefile @@ -1,34 +1,39 @@ # $FreeBSD$ .include SUBDIR= ${_dtrace} \ ${_dtruss} \ ${_lockstat} \ + ${_tests} \ ${_zdb} \ ${_zhack} +.if ${MK_TESTS} != "no" +_tests= tests +.endif + .if ${MK_ZFS} != "no" .if ${MK_LIBTHR} != "no" _zdb= zdb _zhack= zhack .endif .endif .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" _dtrace= dtrace _dtruss= dtruss _lockstat= lockstat .endif .if ${MACHINE_CPUARCH} == "mips" _dtrace= dtrace .endif .if ${MACHINE_CPUARCH} == "powerpc" _dtrace= dtrace _dtruss= dtruss _lockstat= lockstat .endif .include diff --git a/cddl/usr.sbin/tests/Makefile b/cddl/usr.sbin/tests/Makefile new file mode 100644 index 000000000000..0305aeef1d3b --- /dev/null +++ b/cddl/usr.sbin/tests/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/cddl/usr.sbin + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +.include diff --git a/etc/Makefile b/etc/Makefile index 9ca3f2d63c06..dd495e1739f2 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,396 +1,400 @@ # from: @(#)Makefile 5.11 (Berkeley) 5/21/91 # $FreeBSD$ .include .if ${MK_SENDMAIL} != "no" SUBDIR= sendmail .endif +.if ${MK_TESTS} != "no" +SUBDIR+=tests +.endif + BIN1= crontab \ devd.conf \ devfs.conf \ ddb.conf \ dhclient.conf \ disktab \ fbtab \ ftpusers \ gettytab \ group \ hosts \ hosts.allow \ hosts.equiv \ inetd.conf \ libalias.conf \ libmap.conf \ login.access \ login.conf \ mac.conf \ motd \ netconfig \ network.subr \ networks \ newsyslog.conf \ nsswitch.conf \ phones \ profile \ protocols \ rc \ rc.bsdextended \ rc.firewall \ rc.initdiskless \ rc.sendmail \ rc.shutdown \ rc.subr \ remote \ rpc \ services \ shells \ sysctl.conf \ syslog.conf \ termcap.small .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64" BIN1+= libmap32.conf .endif .if exists(${.CURDIR}/etc.${MACHINE}/ttys) BIN1+= etc.${MACHINE}/ttys .elif exists(${.CURDIR}/etc.${MACHINE_ARCH}/ttys) BIN1+= etc.${MACHINE_ARCH}/ttys .elif exists(${.CURDIR}/etc.${MACHINE_CPUARCH}/ttys) BIN1+= etc.${MACHINE_CPUARCH}/ttys .else .error etc.MACHINE/ttys missing .endif OPENBSMDIR= ${.CURDIR}/../contrib/openbsm BSM_ETC_OPEN_FILES= ${OPENBSMDIR}/etc/audit_class \ ${OPENBSMDIR}/etc/audit_event BSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \ ${OPENBSMDIR}/etc/audit_user BSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn BSM_ETC_DIR= ${DESTDIR}/etc/security # NB: keep these sorted by MK_* knobs .if ${MK_AMD} != "no" BIN1+= amd.map .endif .if ${MK_APM} != "no" BIN1+= apmd.conf .endif .if ${MK_BSNMP} != "no" BIN1+= snmpd.config .endif .if ${MK_FREEBSD_UPDATE} != "no" BIN1+= freebsd-update.conf .endif .if ${MK_LOCATE} != "no" BIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc .endif .if ${MK_LPR} != "no" BIN1+= hosts.lpd printcap .endif .if ${MK_MAIL} != "no" BIN1+= ${.CURDIR}/../usr.bin/mail/misc/mail.rc .endif .if ${MK_NTP} != "no" BIN1+= ntp.conf .endif .if ${MK_OPENSSH} != "no" SSH= ${.CURDIR}/../crypto/openssh/ssh_config \ ${.CURDIR}/../crypto/openssh/sshd_config \ ${.CURDIR}/../crypto/openssh/moduli .endif .if ${MK_OPENSSL} != "no" SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf .endif .if ${MK_NS_CACHING} != "no" BIN1+= nscd.conf .endif .if ${MK_PORTSNAP} != "no" BIN1+= portsnap.conf .endif .if ${MK_PF} != "no" BIN1+= pf.os .endif .if ${MK_TCSH} != "no" BIN1+= csh.cshrc csh.login csh.logout .endif .if ${MK_WIRELESS} != "no" BIN1+= regdomain.xml .endif # -rwxr-xr-x root:wheel, for the new cron root:wheel BIN2= netstart pccard_ether rc.suspend rc.resume MTREE= BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist .if ${MK_TESTS} != "no" MTREE+= BSD.tests.dist .endif .if ${MK_SENDMAIL} != "no" MTREE+= BSD.sendmail.dist .endif .if ${MK_DEBUG_FILES} != "no" MTREE+= BSD.debug.dist .endif PPPCNF= ppp.conf .if ${MK_SENDMAIL} == "no" ETCMAIL=mailer.conf aliases .else ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \ mailertable.sample aliases .endif # Special top level files for FreeBSD FREEBSD=COPYRIGHT # Sanitize DESTDIR DESTDIR:= ${DESTDIR:C://*:/:g} afterinstall: .if ${MK_MAN} != "no" ${_+_}cd ${.CURDIR}/../share/man; ${MAKE} makedb .endif distribute: ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION} ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} .include .if ${TARGET_ENDIANNESS} == "1234" CAP_MKDB_ENDIAN?= -l PWD_MKDB_ENDIAN?= -L .elif ${TARGET_ENDIANNESS} == "4321" CAP_MKDB_ENDIAN?= -b PWD_MKDB_ENDIAN?= -B .else CAP_MKDB_ENDIAN?= PWD_MKDB_ENDIAN?= .endif .if defined(NO_ROOT) METALOG.add?= cat -l >> ${METALOG} .endif distribution: .if !defined(DESTDIR) @echo "set DESTDIR before running \"make ${.TARGET}\"" @false .endif cd ${.CURDIR}; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${BIN1} ${DESTDIR}/etc; \ cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ ${BIN2} ${DESTDIR}/etc; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; .if ${MK_AT} == "no" sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab .endif .if ${MK_TCSH} == "no" sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd .endif pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \ ${DESTDIR}/etc/master.passwd .if defined(NO_ROOT) ( \ echo "./etc/login.conf.db type=file mode=0644 uname=root gname=wheel"; \ echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; \ echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \ echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \ ) | ${METALOG.add} .endif .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif .if ${MK_CASPER} != "no" ${_+_}cd ${.CURDIR}/casper; ${MAKE} install .endif ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install ${_+_}cd ${.CURDIR}/devd; ${MAKE} install .if ${MK_DMAGENT} != "no" ${_+_}cd ${.CURDIR}/dma; ${MAKE} install .endif ${_+_}cd ${.CURDIR}/gss; ${MAKE} install ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install ${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \ ${BSM_ETC_OPEN_FILES} ${BSM_ETC_DIR} cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0600 \ ${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR} cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \ ${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR} .if ${MK_UNBOUND} != "no" if [ ! -e ${DESTDIR}/etc/unbound ]; then \ ${INSTALL_SYMLINK} ../var/unbound ${DESTDIR}/etc/unbound; \ fi .endif .if ${MK_SENDMAIL} != "no" ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution .endif .if ${MK_OPENSSH} != "no" cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${SSH} ${DESTDIR}/etc/ssh .endif .if ${MK_OPENSSL} != "no" cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${SSL} ${DESTDIR}/etc/ssl .endif .if ${MK_KERBEROS} != "no" cd ${.CURDIR}/root; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.k5login ${DESTDIR}/root/.k5login; .endif cd ${.CURDIR}/root; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.profile ${DESTDIR}/root/.profile; \ rm -f ${DESTDIR}/.profile; \ ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile .if ${MK_TCSH} != "no" cd ${.CURDIR}/root; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.cshrc ${DESTDIR}/root/.cshrc; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.login ${DESTDIR}/root/.login; \ rm -f ${DESTDIR}/.cshrc; \ ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc .endif cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${MTREE} ${DESTDIR}/etc/mtree .if ${MK_PPP} != "no" cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ ${PPPCNF} ${DESTDIR}/etc/ppp .endif .if ${MK_MAIL} != "no" cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${ETCMAIL} ${DESTDIR}/etc/mail if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ ! -f ${DESTDIR}/etc/aliases ]; then \ ln -s mail/aliases ${DESTDIR}/etc/aliases; \ fi .endif ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \ ${DESTDIR}/etc/dumpdates ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \ ${DESTDIR}/var/db/locate.database ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \ ${DESTDIR}/var/crash cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${FREEBSD} ${DESTDIR}/ .if ${MK_BOOT} != "no" .if exists(${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints) ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${.CURDIR}/../sys/${MACHINE}/conf/GENERIC.hints \ ${DESTDIR}/boot/device.hints .endif .endif .if ${MK_NIS} == "no" sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \ ${DESTDIR}/etc/nsswitch.conf .endif MTREE_CMD?= mtree MTREES= mtree/BSD.root.dist / \ mtree/BSD.var.dist /var \ mtree/BSD.usr.dist /usr \ mtree/BSD.include.dist /usr/include .if ${MK_DEBUG_FILES} != "no" MTREES+= mtree/BSD.debug.dist /usr/lib .endif .if ${MK_GROFF} != "no" MTREES+= mtree/BSD.groff.dist /usr .endif .if ${MK_TESTS} != "no" MTREES+= mtree/BSD.tests.dist /usr .endif .if ${MK_SENDMAIL} != "no" MTREES+= mtree/BSD.sendmail.dist / .endif .for mtree in ${LOCAL_MTREE} MTREES+= ../${mtree} / .endfor distrib-dirs: ${MTREES:N/*} @set ${MTREES}; \ while test $$# -ge 2; do \ m=${.CURDIR}/$$1; \ shift; \ d=${DESTDIR}$$1; \ shift; \ ${ECHO} ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} \ -f $$m -p $$d; \ ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \ done; true .if defined(NO_ROOT) @set ${MTREES}; \ while test $$# -ge 2; do \ m=${.CURDIR}/$$1; \ shift; \ d=$$1; \ test "$$d" == "/" && d=""; \ d=${DISTBASE}$$d; \ shift; \ ${ECHO} "${MTREE_CMD:N-W} -C -f $$m -K uname,gname | " \ "sed s#^\.#.$$d# | ${METALOG.add}" ; \ ${MTREE_CMD:N-W} -C -f $$m -K uname,gname | sed s#^\.#.$$d# | \ ${METALOG.add} ; \ done; true .endif ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys cd ${DESTDIR}/usr/share/man; \ for mandir in man*; do \ ${INSTALL_SYMLINK} ../$$mandir \ ${DESTDIR}/usr/share/man/en.ISO8859-1/; \ ${INSTALL_SYMLINK} ../$$mandir \ ${DESTDIR}/usr/share/man/en.UTF-8/; \ done cd ${DESTDIR}/usr/share/openssl/man; \ for mandir in man*; do \ ${INSTALL_SYMLINK} ../$$mandir \ ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1/; \ done set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ while [ $$# -gt 0 ] ; do \ ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/man/$$1"; \ ${INSTALL_SYMLINK} "$$2" \ "${DESTDIR}/usr/share/openssl/man/$$1"; \ shift; shift; \ done set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ while [ $$# -gt 0 ] ; do \ ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/nls/$$1"; \ shift; shift; \ done etc-examples: cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${BIN1} ${BIN2} nsmb.conf opieaccess \ ${DESTDIR}/usr/share/examples/etc ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \ DESTDIR=${DESTDIR}/usr/share/examples .include diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 53b50b29f944..4cc3f87b41eb 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1,248 +1,278 @@ # $FreeBSD$ # # Please see the file src/etc/mtree/README before making changes to this file. # /set type=dir uname=root gname=wheel mode=0755 . include atf-c .. atf-c++ .. .. share aclocal .. atf .. doc atf .. .. .. tests bin date .. mv .. pax .. pkill .. sh builtins .. errors .. execution .. expansion .. parameters .. parser .. set-e .. .. test .. .. + cddl + lib + .. + sbin + .. + usr.bin + .. + usr.sbin + .. + .. + etc + .. + games + .. + gnu + lib + .. + usr.bin + .. + .. lib atf libatf-c detail .. .. libatf-c++ detail .. .. test-programs .. .. libcrypt .. .. libexec atf atf-check .. .. .. sbin dhclient .. growfs .. ifconfig .. mdconfig .. .. + secure + lib + .. + libexec + .. + usr.bin + .. + usr.sbin + .. + .. share examples tests atf .. plain .. .. .. .. sys kern .. netinet .. .. usr.bin apply .. atf atf-sh .. .. calendar .. comm .. file2c .. join .. jot .. lastcomm .. m4 .. make archives fmt_44bsd .. fmt_44bsd_mod .. fmt_oldbsd .. .. basic t0 .. t1 .. t2 .. t3 .. .. execution ellipsis .. empty .. joberr .. plus .. .. shell builtin .. meta .. path .. path_select .. replace .. select .. .. suffixes basic .. src_wild1 .. src_wild2 .. .. syntax directive-t0 .. enl .. funny-targets .. semi .. .. sysmk t0 2 1 .. .. mk .. .. t1 2 1 .. .. mk .. .. t2 2 1 .. .. mk .. .. .. variables modifier_M .. modifier_t .. opt_V .. t0 .. .. .. ncal .. printf .. sed regress.multitest.out .. .. tr .. uudecode .. uuencode .. xargs .. yacc .. .. usr.sbin etcupdate .. newsyslog .. sa .. .. .. .. diff --git a/etc/tests/Makefile b/etc/tests/Makefile new file mode 100644 index 000000000000..5aacd5b19e57 --- /dev/null +++ b/etc/tests/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/etc + +.PATH: ${.CURDIR:H:H}/tests +KYUAFILE= yes + +.include diff --git a/games/Makefile b/games/Makefile index 214a394f4495..716a7861db5d 100644 --- a/games/Makefile +++ b/games/Makefile @@ -1,17 +1,23 @@ -# @(#)Makefile 8.2 (Berkeley) 3/31/94 # $FreeBSD$ +.include + SUBDIR= \ bcd \ caesar \ factor \ fortune \ grdc \ morse \ number \ pom \ ppt \ primes \ - random + random \ + ${_tests} + +.if ${MK_TESTS} != "no" +_tests= tests +.endif .include diff --git a/games/tests/Makefile b/games/tests/Makefile new file mode 100644 index 000000000000..45f93d9343bb --- /dev/null +++ b/games/tests/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/games + +.PATH: ${.CURDIR:H:H}/tests +KYUAFILE= yes + +.include diff --git a/gnu/Makefile b/gnu/Makefile index 6656adfbdfad..b460590387ae 100644 --- a/gnu/Makefile +++ b/gnu/Makefile @@ -1,6 +1,12 @@ # @(#)Makefile 5.33.1.1 (Berkeley) 5/6/91 # $FreeBSD$ -SUBDIR= lib usr.bin +.include + +SUBDIR= lib ${_tests} usr.bin + +.if ${MK_TESTS} != "no" +_tests= tests +.endif .include diff --git a/gnu/lib/Makefile b/gnu/lib/Makefile index 61ea14bf122c..0a607d7afa86 100644 --- a/gnu/lib/Makefile +++ b/gnu/lib/Makefile @@ -1,17 +1,21 @@ # $FreeBSD$ .include SUBDIR= csu libgcc libgcov libdialog libgomp libregex libreadline .if ${MK_SSP} != "no" SUBDIR+= libssp .endif +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + # libsupc++ uses libstdc++ headers, although 'make includes' should # have taken care of that already. .if ${MK_GNUCXX} != "no" && ${MK_CXX} != "no" SUBDIR+= libstdc++ libsupc++ .endif .include diff --git a/gnu/lib/tests/Makefile b/gnu/lib/tests/Makefile new file mode 100644 index 000000000000..256e24512e30 --- /dev/null +++ b/gnu/lib/tests/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/gnu/lib + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +.include diff --git a/gnu/tests/Makefile b/gnu/tests/Makefile new file mode 100644 index 000000000000..de42fae1ec00 --- /dev/null +++ b/gnu/tests/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/gnu + +.PATH: ${.CURDIR:H:H}/tests +KYUAFILE= yes + +.include diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile index 02d0b2a95375..7e96a6f4829f 100644 --- a/gnu/usr.bin/Makefile +++ b/gnu/usr.bin/Makefile @@ -1,51 +1,56 @@ # $FreeBSD$ .include SUBDIR= ${_binutils} \ ${_cc} \ dialog \ diff \ diff3 \ ${_dtc} \ ${_gdb} \ ${_gperf} \ grep \ ${_groff} \ ${_rcs} \ sdiff \ send-pr \ + ${_tests} \ ${_texinfo} .if ${MK_CXX} != "no" _gperf= gperf .if ${MK_GROFF} != "no" _groff= groff .endif .endif .if ${MK_GPL_DTC} != "no" _dtc= dtc .endif .if ${MK_INFO} != "no" _texinfo= texinfo .endif .if ${MK_RCS} != "no" _rcs= rcs .endif +.if ${MK_TESTS} != "no" +_tests= tests +.endif + .if ${MK_BINUTILS} != "no" _binutils= binutils .endif .if ${MK_GCC} != "no" _cc= cc .endif .if ${MK_GDB} != "no" _gdb= gdb .endif SUBDIR_PARALLEL= .include diff --git a/gnu/usr.bin/tests/Makefile b/gnu/usr.bin/tests/Makefile new file mode 100644 index 000000000000..eebbff675d2e --- /dev/null +++ b/gnu/usr.bin/tests/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/gnu/usr.bin + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +.include diff --git a/secure/Makefile b/secure/Makefile index 4edfa73e2c08..4a111a25c548 100644 --- a/secure/Makefile +++ b/secure/Makefile @@ -1,37 +1,41 @@ # $FreeBSD$ .include -SUBDIR= lib libexec usr.bin usr.sbin +SUBDIR= lib libexec ${_tests} usr.bin usr.sbin + +.if ${MK_TESTS} != "no" +_tests= tests +.endif # These are the programs which depend on crypto, but not Kerberos. SPROGS= lib/libfetch lib/libpam lib/libradius lib/libtelnet \ bin/ed libexec/telnetd usr.bin/fetch usr.bin/telnet \ usr.sbin/pkg_install usr.sbin/ppp usr.sbin/tcpdump/tcpdump .if ${MK_SENDMAIL} != "no" SPROGS+=usr.sbin/sendmail .endif # This target is used to rebuild these programs with crypto. secure: .for entry in ${SPROGS} cd ${.CURDIR}/../${entry}; \ ${MAKE} cleandir; \ ${MAKE} obj; \ ${MAKE} depend; \ ${MAKE} all; \ ${MAKE} install .endfor # This target is used to rebuild these programs without crypto. insecure: .for entry in ${SPROGS} cd ${.CURDIR}/../${entry}; \ ${MAKE} MK_CRYPT=no cleandir; \ ${MAKE} MK_CRYPT=no obj; \ ${MAKE} MK_CRYPT=no depend; \ ${MAKE} MK_CRYPT=no all; \ ${MAKE} MK_CRYPT=no install .endfor .include diff --git a/secure/lib/Makefile b/secure/lib/Makefile index e27bcc39dd49..118204f67f8a 100644 --- a/secure/lib/Makefile +++ b/secure/lib/Makefile @@ -1,13 +1,17 @@ # $FreeBSD$ .include SUBDIR= .if ${MK_OPENSSL} != "no" SUBDIR+=libcrypto libssl .if ${MK_OPENSSH} != "no" SUBDIR+=libssh .endif .endif +.if ${MK_TESTS} != "no" +SUBDIR+=tests +.endif + .include diff --git a/secure/lib/tests/Makefile b/secure/lib/tests/Makefile new file mode 100644 index 000000000000..cd6bcff5f3c9 --- /dev/null +++ b/secure/lib/tests/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/secure/lib + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +.include diff --git a/secure/libexec/Makefile b/secure/libexec/Makefile index 0c680e4d7b9a..9edc8e66c197 100644 --- a/secure/libexec/Makefile +++ b/secure/libexec/Makefile @@ -1,10 +1,14 @@ # $FreeBSD$ .include SUBDIR= .if ${MK_OPENSSH} != "no" SUBDIR+=sftp-server ssh-keysign ssh-pkcs11-helper .endif +.if ${MK_TESTS} != "no" +SUBDIR+=tests +.endif + .include diff --git a/secure/libexec/tests/Makefile b/secure/libexec/tests/Makefile new file mode 100644 index 000000000000..6debef892a59 --- /dev/null +++ b/secure/libexec/tests/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/secure/libexec + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +.include diff --git a/secure/tests/Makefile b/secure/tests/Makefile new file mode 100644 index 000000000000..2e6dbc487fdc --- /dev/null +++ b/secure/tests/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/secure + +.PATH: ${.CURDIR:H:H}/tests +KYUAFILE= yes + +.include diff --git a/secure/usr.bin/Makefile b/secure/usr.bin/Makefile index b10a43b350d0..e819ba74686c 100644 --- a/secure/usr.bin/Makefile +++ b/secure/usr.bin/Makefile @@ -1,13 +1,17 @@ # $FreeBSD$ .include SUBDIR= .if ${MK_OPENSSL} != "no" SUBDIR+=bdes openssl .if ${MK_OPENSSH} != "no" SUBDIR+=scp sftp ssh ssh-add ssh-agent ssh-keygen ssh-keyscan .endif .endif +.if ${MK_TESTS} != "no" +SUBDIR+=tests +.endif + .include diff --git a/secure/usr.bin/tests/Makefile b/secure/usr.bin/tests/Makefile new file mode 100644 index 000000000000..1c06699c587a --- /dev/null +++ b/secure/usr.bin/tests/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/secure/usr.bin + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +.include diff --git a/secure/usr.sbin/Makefile b/secure/usr.sbin/Makefile index e08025c8b81b..33d945c0c683 100644 --- a/secure/usr.sbin/Makefile +++ b/secure/usr.sbin/Makefile @@ -1,10 +1,14 @@ # $FreeBSD$ .include SUBDIR= .if ${MK_OPENSSH} != "no" SUBDIR+=sshd .endif +.if ${MK_TESTS} != "no" +SUBDIR+=tests +.endif + .include diff --git a/secure/usr.sbin/tests/Makefile b/secure/usr.sbin/tests/Makefile new file mode 100644 index 000000000000..25e95f03cdea --- /dev/null +++ b/secure/usr.sbin/tests/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/secure/usr.sbin + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +.include