From 8f26887dfbbe6f1237d94a1e4915e3d33e6f0316 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Thu, 30 Jan 2014 21:37:43 +0000 Subject: [PATCH] Merge from CheriBSD: commit 2d581e8caf79d7a0f5a24590eccd06da90cccb74 Author: Brooks Davis Date: Mon Jan 27 22:57:51 2014 +0000 Add WITHOUT_FMTREE to disable building fmtree. MFC after: 4 weeks Sponsored by: DARPA, AFRL --- share/mk/bsd.own.mk | 1 + tools/build/mk/OptionalObsoleteFiles.inc | 5 +++++ tools/build/options/WITHOUT_FMTREE | 3 +++ usr.sbin/Makefile | 6 +++++- 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 tools/build/options/WITHOUT_FMTREE diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 7fe2b04ba98..5e5eab9783f 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -275,6 +275,7 @@ __DEFAULT_YES_OPTIONS = \ ED_CRYPTO \ EXAMPLES \ FLOPPY \ + FMTREE \ FORMAT_EXTENSIONS \ FORTH \ FP_LIBC \ diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 1cf40b3c7fe..91a5aaf54a5 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -600,6 +600,11 @@ OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/libexec/cc1plus .endif +.if ${MK_FMTREE} == no +OLD_FILES+=usr/sbin/fmtree +OLD_FILES+=usr/share/man/man8/fmtree.8.gz +.endif + .if ${MK_GNUCXX} == no OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/include/c++/4.2/algorithm diff --git a/tools/build/options/WITHOUT_FMTREE b/tools/build/options/WITHOUT_FMTREE new file mode 100644 index 00000000000..f8225c1e90c --- /dev/null +++ b/tools/build/options/WITHOUT_FMTREE @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build and install +.Pa /usr/sbin/fmtree . diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 730495bf37b..c3f93ccb7a1 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -48,7 +48,7 @@ SUBDIR= adduser \ mountd \ mptutil \ mtest \ - mtree \ + ${_mtree} \ newsyslog \ nfscbd \ nfsd \ @@ -142,6 +142,10 @@ SUBDIR+= fdread SUBDIR+= fdwrite .endif +.if ${MK_FMTREE} != "no" +SUBDIR+= mtree +.endif + .if ${MK_FREEBSD_UPDATE} != "no" SUBDIR+= freebsd-update .endif