Skip to content

Commit

Permalink
build: remove the option to build gnugrep
Browse files Browse the repository at this point in the history
Unconditionally install bsdgrep as grep, bootstrap or not. Remove all
build glue and stop installing both gnugrep and libgnuregex now that
all consumers of the latter are gone.

Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D27732
  • Loading branch information
kevans91 committed Dec 25, 2020
1 parent eae3512 commit 8aff76f
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 68 deletions.
14 changes: 14 additions & 0 deletions ObsoleteFiles.inc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,20 @@
# xargs -n1 | sort | uniq -d;
# done

# 20201225: libregex removed
OLD_FILES+=usr/lib/libgnuregex.so
OLD_LIBS+=usr/lib/libgnuregex.so.5
OLD_FILES+=usr/lib/libgnuregex_p.a
OLD_FILES+=usr/include/gnu/posix/regex.h
OLD_DIRS+=usr/include/gnu/posix
OLD_FILES+=usr/include/gnu/regex.h
OLD_DIRS+=usr/include/gnu
OLD_FILES+=usr/include/gnuregex.h

# 20201225: gnugrep removed
OLD_FILES+=usr/bin/gnugrep
OLD_FILES+=usr/share/man/man1/gnugrep.1.gz

# 20201224: mk48txx(4) removed
OLD_FILES+=usr/share/man/man4/mk48txx.4.gz

Expand Down
4 changes: 0 additions & 4 deletions etc/mtree/BSD.include.dist
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,6 @@
virstor
..
..
gnu
posix
..
..
gssapi
..
infiniband
Expand Down
4 changes: 0 additions & 4 deletions gnu/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ SUBDIR=
SUBDIR.${MK_DIALOG}+= libdialog
SUBDIR.${MK_TESTS}+= tests

.if ${MK_GNU_GREP} != "no"
SUBDIR+= libregex
.endif

SUBDIR_PARALLEL=

.include <bsd.subdir.mk>
1 change: 0 additions & 1 deletion gnu/usr.bin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

SUBDIR.${MK_DIALOG}+= dialog
SUBDIR.${MK_GNU_DIFF}+= diff3
SUBDIR.${MK_GNU_GREP}+= grep
SUBDIR.${MK_TESTS}+= tests

SUBDIR_PARALLEL=
Expand Down
1 change: 0 additions & 1 deletion share/mk/bsd.libnames.mk
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ LIBFL?= "don't use LIBFL, use LIBL"
LIBFORM?= ${LIBDESTDIR}${LIBDIR_BASE}/libform.a
LIBG2C?= ${LIBDESTDIR}${LIBDIR_BASE}/libg2c.a
LIBGEOM?= ${LIBDESTDIR}${LIBDIR_BASE}/libgeom.a
LIBGNUREGEX?= ${LIBDESTDIR}${LIBDIR_BASE}/libgnuregex.a
LIBGPIO?= ${LIBDESTDIR}${LIBDIR_BASE}/libgpio.a
LIBGSSAPI?= ${LIBDESTDIR}${LIBDIR_BASE}/libgssapi.a
LIBGSSAPI_KRB5?= ${LIBDESTDIR}${LIBDIR_BASE}/libgssapi_krb5.a
Expand Down
2 changes: 0 additions & 2 deletions share/mk/src.libnames.mk
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ _LIBRARIES= \
fetch \
figpar \
geom \
gnuregex \
gpio \
gssapi \
gssapi_krb5 \
Expand Down Expand Up @@ -624,7 +623,6 @@ LIBOPENSMDIR= ${OBJTOP}/lib/ofed/libopensm
LIBOSMVENDORDIR=${OBJTOP}/lib/ofed/libvendor

LIBDIALOGDIR= ${OBJTOP}/gnu/lib/libdialog
LIBGNUREGEXDIR= ${OBJTOP}/gnu/lib/libregex
LIBSSPDIR= ${OBJTOP}/lib/libssp
LIBSSP_NONSHAREDDIR= ${OBJTOP}/lib/libssp_nonshared
LIBASN1DIR= ${OBJTOP}/kerberos5/lib/libasn1
Expand Down
2 changes: 0 additions & 2 deletions share/mk/src.opts.mk
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ __DEFAULT_YES_OPTIONS = \
BOOTPARAMD \
BOOTPD \
BSD_CPIO \
BSD_GREP \
BSDINSTALL \
BSNMP \
BZIP2 \
Expand Down Expand Up @@ -206,7 +205,6 @@ __DEFAULT_NO_OPTIONS = \
CLANG_FORMAT \
DTRACE_TESTS \
EXPERIMENTAL \
GNU_GREP \
HESIOD \
LIBSOFT \
LOADER_FIREWIRE \
Expand Down
26 changes: 0 additions & 26 deletions tools/build/mk/OptionalObsoleteFiles.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2312,31 +2312,6 @@ OLD_FILES+=usr/bin/diff3
OLD_FILES+=usr/share/man/man1/diff3.1.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

.if ${MK_GSSAPI} == no
OLD_FILES+=usr/include/gssapi/gssapi.h
OLD_DIRS+=usr/include/gssapi
Expand Down Expand Up @@ -7440,7 +7415,6 @@ OLD_FILES+=usr/lib/libformw_p.a
OLD_FILES+=usr/lib/libgcc_eh_p.a
OLD_FILES+=usr/lib/libgcc_p.a
OLD_FILES+=usr/lib/libgeom_p.a
OLD_FILES+=usr/lib/libgnuregex_p.a
OLD_FILES+=usr/lib/libgpio_p.a
OLD_FILES+=usr/lib/libgssapi_krb5_p.a
OLD_FILES+=usr/lib/libgssapi_ntlm_p.a
Expand Down
2 changes: 0 additions & 2 deletions tools/build/options/WITHOUT_BSD_GREP

This file was deleted.

3 changes: 0 additions & 3 deletions tools/build/options/WITHOUT_GNU_GREP

This file was deleted.

2 changes: 0 additions & 2 deletions tools/build/options/WITH_BSD_GREP

This file was deleted.

3 changes: 0 additions & 3 deletions tools/build/options/WITH_GNU_GREP

This file was deleted.

26 changes: 8 additions & 18 deletions usr.bin/grep/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,9 @@

.include <src.opts.mk>

.if ${MK_BSD_GREP} == "yes" || defined(BOOTSTRAPPING)
PROG= grep
MAN1= grep.1 zgrep.1
.else
PROG= bsdgrep
CLEANFILES+= bsdgrep.1
MAN1= bsdgrep.1 zgrep.1

bsdgrep.1: grep.1
${CP} ${.ALLSRC} ${.TARGET}
.endif
SRCS= file.c grep.c queue.c util.c

SCRIPTS= zgrep.sh
Expand All @@ -33,6 +25,10 @@ LINKS= ${BINDIR}/zgrep ${BINDIR}/zfgrep \
${BINDIR}/zgrep ${BINDIR}/zstdegrep \
${BINDIR}/zgrep ${BINDIR}/zstdegrep

LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \
${BINDIR}/grep ${BINDIR}/fgrep \
${BINDIR}/grep ${BINDIR}/rgrep \

MLINKS= zgrep.1 zfgrep.1 \
zgrep.1 zegrep.1 \
zgrep.1 bzgrep.1 \
Expand All @@ -48,17 +44,11 @@ MLINKS= zgrep.1 zfgrep.1 \
zgrep.1 zstdegrep.1 \
zgrep.1 zstdfgrep.1

CFLAGS.gcc+= --param max-inline-insns-single=500

.if ${MK_BSD_GREP} == "yes" || defined(BOOTSTRAPPING)
LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \
${BINDIR}/grep ${BINDIR}/fgrep \
${BINDIR}/grep ${BINDIR}/rgrep \
MLINKS+= grep.1 egrep.1 \
grep.1 fgrep.1 \
grep.1 rgrep.1

MLINKS+= grep.1 egrep.1 \
grep.1 fgrep.1 \
grep.1 rgrep.1
.endif
CFLAGS.gcc+= --param max-inline-insns-single=500

.if !defined(BOOTSTRAPPING)
LIBADD+= regex
Expand Down

0 comments on commit 8aff76f

Please sign in to comment.