aboutsummaryrefslogtreecommitdiff
path: root/cddl/usr.sbin
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2022-07-06 13:03:48 +0000
committerBrooks Davis <brooks@FreeBSD.org>2022-07-06 13:03:48 +0000
commit3bf66365129a13933f77d1f4421d5136861cffb4 (patch)
tree06c0728c42aa0fb1331bf118c0fb2a399e9fbe3c /cddl/usr.sbin
parent513e1bbc739239c9479367b15e5f863a5f891d66 (diff)
downloadsrc-3bf66365129a13933f77d1f4421d5136861cffb4.tar.gz
src-3bf66365129a13933f77d1f4421d5136861cffb4.zip
cddl/*: add a WITH(OUT)_DTRACE option
Add an option to enable/disable DTrace without disabling ZFS. New architectures such as CHERI may support ZFS before they support DTrace and the old model of WITHOUT_CDDL disabling both wasn't helpful. For compatiblity, the CDDL option remains and WITHOUT_CDDL implies WITHOUT_DTRACE. WITHOUT_DTRACE also implies WITHOUT_CTF. As part of this change, largely convert cddl/*/Makefile to using the more compact SUBDIR.${MK_<FOO>}+= form rather than using intermediate variables. Reviewed by: markj Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D35718
Diffstat (limited to 'cddl/usr.sbin')
-rw-r--r--cddl/usr.sbin/Makefile20
1 files changed, 8 insertions, 12 deletions
diff --git a/cddl/usr.sbin/Makefile b/cddl/usr.sbin/Makefile
index 4dde136dc412..68dc735b3d1b 100644
--- a/cddl/usr.sbin/Makefile
+++ b/cddl/usr.sbin/Makefile
@@ -2,23 +2,19 @@
.include <src.opts.mk>
-SUBDIR= ${_dtrace} \
+SUBDIR.${MK_DTRACE}+= \
+ ${_dtrace} \
${_dwatch} \
${_lockstat} \
- ${_plockstat} \
- ${_zdb} \
- ${_zfsd} \
- ${_zhack}
+ ${_plockstat}
SUBDIR.${MK_TESTS}+= tests
-.if ${MK_ZFS} != "no"
-_zdb= zdb
-_zhack= zhack
-. if ${MK_CXX} != "no"
-_zfsd= zfsd
-. endif
-.endif
+SUBDIR.${MK_ZFS}+= \
+ zdb \
+ zhack
+SUBDIR.${MK_ZFS}.${MK_CXX}+= \
+ zfsd
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
_dtrace= dtrace