Index: usr.bin/Makefile
===================================================================
RCS file: /cvs/src/usr.bin/Makefile,v
retrieving revision 1.225
diff -u -r1.225 Makefile
--- usr.bin/Makefile	27 Nov 2002 17:46:26 -0000	1.225
+++ usr.bin/Makefile	30 Nov 2002 13:38:46 -0000
@@ -136,11 +136,9 @@
 	quota \
 	renice \
 	rev \
-	rlogin \
 	rpcgen \
 	rpcinfo \
 	rs \
-	rsh \
 	rup \
 	ruptime \
 	rusers \
@@ -222,6 +220,11 @@
 	dnskeygen \
 	dnsquery \
 	host
+.endif
+
+.if !defined(NO_RCMDS)
+SUBDIR+=rlogin \
+	rsh
 .endif
 
 .if !defined(NO_SENDMAIL)
Index: share/man/man5/make.conf.5
===================================================================
RCS file: /cvs/src/share/man/man5/make.conf.5,v
retrieving revision 1.63
diff -u -r1.63 make.conf.5
--- share/man/man5/make.conf.5	29 Nov 2002 11:39:19 -0000	1.63
+++ share/man/man5/make.conf.5	30 Nov 2002 13:41:06 -0000
@@ -490,6 +490,13 @@
 .Pq Vt bool
 Set to not build OpenSSL (implies
 .Va NO_OPENSSH ) .
+.It Va NO_RCMDS
+.Pq Vt bool
+Set to not build
+.Xr rcp 1 ,
+.Xr rlogin 1 ,
+.Xr rsh 1 ,
+and their corresponding daemons.
 .It Va NO_SENDMAIL
 .Pq Vt bool
 Set to not build
Index: share/examples/etc/make.conf
===================================================================
RCS file: /cvs/src/share/examples/etc/make.conf,v
retrieving revision 1.206
diff -u -r1.206 make.conf
--- share/examples/etc/make.conf	27 Nov 2002 17:46:26 -0000	1.206
+++ share/examples/etc/make.conf	30 Nov 2002 13:40:44 -0000
@@ -113,6 +113,7 @@
 #NO_OBJC=	true	# do not build Objective C support
 #NO_OPENSSH=	true	# do not build OpenSSH
 #NO_OPENSSL=	true	# do not build OpenSSL (implies NO_OPENSSH)
+#NO_RCMDS=	true	# do not build rlogin, rsh & rcp or their daemons
 #NO_SENDMAIL=	true	# do not build sendmail and related programs
 #NO_SHAREDOCS=	true	# do not build the 4.4BSD legacy docs
 #NO_TCSH=	true	# do not build and install /bin/csh (which is tcsh)
Index: libexec/Makefile
===================================================================
RCS file: /cvs/src/libexec/Makefile,v
retrieving revision 1.52
diff -u -r1.52 Makefile
--- libexec/Makefile	12 Nov 2002 17:31:12 -0000	1.52
+++ libexec/Makefile	30 Nov 2002 13:40:04 -0000
@@ -14,14 +14,11 @@
 	pppoed \
 	rbootd \
 	revnetgroup \
-	rexecd \
-	rlogind \
 	rpc.rquotad \
 	rpc.rstatd \
 	rpc.rusersd \
 	rpc.rwalld \
 	rpc.sprayd \
-	rshd \
 	rtld-elf \
 	save-entropy \
 	talkd \
@@ -32,6 +29,12 @@
 
 .if !defined(NO_BIND)
 SUBDIR+=named-xfer
+.endif
+
+.if !defined(NO_RCMDS)
+SUBDIR+=rexecd \
+	rlogind \
+	rshd
 .endif
 
 .if !defined(NO_SENDMAIL)
