From 3cca7486668c91d11d5a139a0597d75a5ba1dea7 Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Sun, 1 Mar 2015 22:07:54 +0000 Subject: [PATCH] MFC r278193: Add MK_FILE to control whether or not to build file(1), libmagic(3), etc Sponsored by: EMC / Isilon Storage Division --- lib/Makefile | 6 +++++- share/mk/bsd.own.mk | 1 + tools/build/options/WITHOUT_FILE | 4 ++++ usr.bin/Makefile | 5 ++++- 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 tools/build/options/WITHOUT_FILE diff --git a/lib/Makefile b/lib/Makefile index 21471f6ed3e6..c5dfc4839398 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -59,7 +59,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libkvm \ ${_libldns} \ liblzma \ - libmagic \ + ${_libmagic} \ libmandoc \ libmemstat \ libmd \ @@ -171,6 +171,10 @@ _libbsnmp= libbsnmp _clang= clang .endif +.if ${MK_FILE} != "no" +_libmagic= libmagic +.endif + .if ${MK_GPIB} != "no" _libgpib= libgpib .endif diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index d9461bd1055d..0ca3af170240 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -280,6 +280,7 @@ __DEFAULT_YES_OPTIONS = \ ED_CRYPTO \ EE \ EXAMPLES \ + FILE \ FINGER \ FLOPPY \ FMTREE \ diff --git a/tools/build/options/WITHOUT_FILE b/tools/build/options/WITHOUT_FILE new file mode 100644 index 000000000000..636d00a7fab2 --- /dev/null +++ b/tools/build/options/WITHOUT_FILE @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr file 1 +and related programs. diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 785fdd634524..0682183ca63a 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -45,7 +45,6 @@ SUBDIR= alias \ expand \ false \ fetch \ - file \ find \ fmt \ fold \ @@ -230,6 +229,10 @@ _clang= clang SUBDIR+= ee .endif +.if ${MK_FILE} != "no" +SUBDIR+= file +.endif + .if ${MK_FINGER} != "no" SUBDIR+= finger .endif