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
This commit is contained in:
parent
7fbfba6490
commit
01ba1df6a7
@ -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
|
||||
|
||||
|
@ -98,6 +98,8 @@ __DEFAULT_YES_OPTIONS = \
|
||||
GCOV \
|
||||
GDB \
|
||||
GNU \
|
||||
GNU_DIFF \
|
||||
GNU_GREP \
|
||||
GNU_GREP_COMPAT \
|
||||
GPIO \
|
||||
GPL_DTC \
|
||||
|
@ -2173,6 +2173,39 @@ OLD_FILES+=usr/share/man/man3/gpio_pin_tristate.3.gz
|
||||
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
|
||||
|
5
tools/build/options/WITHOUT_GNU_DIFF
Normal file
5
tools/build/options/WITHOUT_GNU_DIFF
Normal file
@ -0,0 +1,5 @@
|
||||
.\" $FreeBSD$
|
||||
Set to not build GNU
|
||||
.Xr diff 1
|
||||
and
|
||||
.Xr diff3 1 .
|
3
tools/build/options/WITHOUT_GNU_GREP
Normal file
3
tools/build/options/WITHOUT_GNU_GREP
Normal file
@ -0,0 +1,3 @@
|
||||
.\" $FreeBSD$
|
||||
Set to not build GNU
|
||||
.Xr grep 1 .
|
Loading…
Reference in New Issue
Block a user