git: b13d7062b3a6 - main - libauditd: Don't build if WITHOUT_AUDIT is set

From: Lexi Winter <ivy_at_FreeBSD.org>
Date: Fri, 03 Apr 2026 13:51:42 UTC
The branch main has been updated by ivy:

URL: https://cgit.FreeBSD.org/src/commit/?id=b13d7062b3a65ba600745fef6a2b4058444e5f6c

commit b13d7062b3a65ba600745fef6a2b4058444e5f6c
Author:     Lexi Winter <ivy@FreeBSD.org>
AuthorDate: 2026-04-03 13:43:18 +0000
Commit:     Lexi Winter <ivy@FreeBSD.org>
CommitDate: 2026-04-03 13:43:18 +0000

    libauditd: Don't build if WITHOUT_AUDIT is set
    
    When WITHOUT_AUDIT is set, nothing is built that uses this library,
    so don't build the library.  This avoids building the FreeBSD-audit
    package when WITHOUT_AUDIT is set.
    
    MFC after:      never
    Reviewed by:    csjp, imp, emaste
    Differential Revision:  https://reviews.freebsd.org/D56157
    Sponsored by:           https://www.patreon.com/bsdivy
---
 lib/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Makefile b/lib/Makefile
index 6e2ff634c963..1cb2d1d89e39 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -34,7 +34,6 @@ SUBDIR=	${SUBDIR_BOOTSTRAP} \
 	lib9p \
 	libalias \
 	libarchive \
-	libauditd \
 	libbegemot \
 	libblocksruntime \
 	libbsddialog \
@@ -173,6 +172,7 @@ SUBDIR+=	clang
 .endif
 .endif
 
+SUBDIR.${MK_AUDIT}+=	libauditd
 SUBDIR.${MK_CUSE}+= 	libcuse
 SUBDIR.${MK_TOOLCHAIN}+=libpe
 SUBDIR.${MK_DIALOG}+=	libdpv libfigpar