From d6d1ee211af13dc90f5084666e542a54239df6fc Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 24 Apr 2014 23:17:40 +0000 Subject: [PATCH] Add option WITHOUT_VI to not build/install vi. vi was the largest binary without a knob to turn it off. --- share/mk/bsd.opts.mk | 1 + tools/build/options/WITHOUT_VI | 2 ++ usr.bin/Makefile | 5 ++++- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 tools/build/options/WITHOUT_VI diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk index ba3955a698d..23d5aedc0cf 100644 --- a/share/mk/bsd.opts.mk +++ b/share/mk/bsd.opts.mk @@ -166,6 +166,7 @@ __DEFAULT_YES_OPTIONS = \ UNBOUND \ USB \ UTMPX \ + VI \ WIRELESS \ WPA_SUPPLICANT_EAPOL \ ZFS \ diff --git a/tools/build/options/WITHOUT_VI b/tools/build/options/WITHOUT_VI new file mode 100644 index 00000000000..7455c21b6cf --- /dev/null +++ b/tools/build/options/WITHOUT_VI @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to not build and install vi, view, ex and related programs. diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 7403aa545af..ef9381b2710 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -182,7 +182,6 @@ SUBDIR= alias \ unvis \ uudecode \ uuencode \ - vi \ vis \ vmstat \ w \ @@ -361,6 +360,10 @@ SUBDIR+= xstr SUBDIR+= yacc .endif +.if ${MK_VI} != "no" +SUBDIR+= vi +.endif + .if ${MK_USB} != "no" SUBDIR+= usbhidaction SUBDIR+= usbhidctl