svn commit: r307674 - in head: gnu/usr.bin share/mk tools/build/mk tools/build/options

Ed Maste emaste at FreeBSD.org
Thu Oct 20 14:48:59 UTC 2016


Author: emaste
Date: Thu Oct 20 14:48:57 2016
New Revision: 307674
URL: https://svnweb.freebsd.org/changeset/base/307674

Log:
  Add knobs to make GNU diff and GNU grep optional
  
  This is added to facilitate experiments building FreeBSD without
  copyleft software.
  
  If WITHOUT_GNU_DIFF is set no /usr/bin/diff or /usr/bin/diff3 will
  be built.
  
  If WITHOUT_GNU_GREP is set then BSD grep will be installed as
  /usr/bin/bsdgrep or /usr/bin/grep, depending on the WITH_BSD_GREP
  knob.
  
  Reviewed by:	brooks (earlier)
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	Differential Revision: https://reviews.freebsd.org/D8288

Added:
  head/tools/build/options/WITHOUT_GNU_DIFF   (contents, props changed)
  head/tools/build/options/WITHOUT_GNU_GREP   (contents, props changed)
Modified:
  head/gnu/usr.bin/Makefile
  head/share/mk/src.opts.mk
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/gnu/usr.bin/Makefile
==============================================================================
--- head/gnu/usr.bin/Makefile	Thu Oct 20 13:48:29 2016	(r307673)
+++ head/gnu/usr.bin/Makefile	Thu Oct 20 14:48:57 2016	(r307674)
@@ -2,10 +2,6 @@
 
 .include <src.opts.mk>
 
-SUBDIR= diff \
-	diff3 \
-	grep
-
 SUBDIR_DEPEND_gdb= ${_binutils}
 
 .if ${MK_CXX} != "no"
@@ -21,6 +17,8 @@ SUBDIR.${MK_GDB}+=	gdb
 .endif
 
 SUBDIR.${MK_GCC}+=	cc
+SUBDIR.${MK_GNU_DIFF}+=	diff diff3                                      
+SUBDIR.${MK_GNU_GREP}+=	grep                                            
 SUBDIR.${MK_GPL_DTC}+=	dtc
 SUBDIR.${MK_TESTS}+=	tests
 

Modified: head/share/mk/src.opts.mk
==============================================================================
--- head/share/mk/src.opts.mk	Thu Oct 20 13:48:29 2016	(r307673)
+++ head/share/mk/src.opts.mk	Thu Oct 20 14:48:57 2016	(r307674)
@@ -98,6 +98,8 @@ __DEFAULT_YES_OPTIONS = \
     GCOV \
     GDB \
     GNU \
+    GNU_DIFF \
+    GNU_GREP \
     GNU_GREP_COMPAT \
     GPIO \
     GPL_DTC \

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==============================================================================
--- head/tools/build/mk/OptionalObsoleteFiles.inc	Thu Oct 20 13:48:29 2016	(r307673)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc	Thu Oct 20 14:48:57 2016	(r307674)
@@ -2173,6 +2173,39 @@ OLD_FILES+=usr/share/man/man3/gpio_pin_t
 OLD_FILES+=usr/share/man/man8/gpioctl.8.gz
 .endif
 
+.if ${MK_GNU_DIFF} == no
+OLD_FILES+=usr/bin/diff
+OLD_FILES+=usr/bin/diff3
+OLD_FILES+=usr/share/man/man1/diff.1.gz
+OLD_FILES+=usr/share/man/man1/diff3.1.gz
+OLD_FILES+=usr/share/man/man7/diff.7.gz
+.endif
+
+.if ${MK_GNU_GREP} == no
+OLD_FILES+=usr/bin/gnugrep
+OLD_FILES+=usr/share/man/man1/gnugrep.1.gz
+.if ${MK_BSD_GREP} == no
+OLD_FILES+=usr/bin/bzgrep
+OLD_FILES+=usr/bin/bzegrep
+OLD_FILES+=usr/bin/bzfgrep
+OLD_FILES+=usr/bin/egrep
+OLD_FILES+=usr/bin/fgrep
+OLD_FILES+=usr/bin/grep
+OLD_FILES+=usr/bin/zegrep
+OLD_FILES+=usr/bin/zfgrep
+OLD_FILES+=usr/bin/zgrep
+OLD_FILES+=usr/share/man/man1/bzegrep.1.gz
+OLD_FILES+=usr/share/man/man1/bzfgrep.1.gz
+OLD_FILES+=usr/share/man/man1/bzgrep.1.gz
+OLD_FILES+=usr/share/man/man1/egrep.1.gz
+OLD_FILES+=usr/share/man/man1/fgrep.1.gz
+OLD_FILES+=usr/share/man/man1/grep.1.gz
+OLD_FILES+=usr/share/man/man1/zegrep.1.gz
+OLD_FILES+=usr/share/man/man1/zfgrep.1.gz
+OLD_FILES+=usr/share/man/man1/zgrep.1.gz
+.endif
+.endif
+
 # Also includes vgrind(1)
 .if ${MK_GROFF} == no
 OLD_FILES+=usr/bin/addftinfo

Added: head/tools/build/options/WITHOUT_GNU_DIFF
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/build/options/WITHOUT_GNU_DIFF	Thu Oct 20 14:48:57 2016	(r307674)
@@ -0,0 +1,5 @@
+.\" $FreeBSD$
+Set to not build GNU
+.Xr diff 1
+and
+.Xr diff3 1 .

Added: head/tools/build/options/WITHOUT_GNU_GREP
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/build/options/WITHOUT_GNU_GREP	Thu Oct 20 14:48:57 2016	(r307674)
@@ -0,0 +1,3 @@
+.\" $FreeBSD$
+Set to not build GNU
+.Xr grep 1 .


More information about the svn-src-all mailing list