Added zgrep.libz. This version of zgrep(1) depend on a

grep(1) linked with libz.
This commit is contained in:
Wolfram Schneider 1997-12-20 19:20:33 +00:00
parent 50cb810d2e
commit 00caa62588
2 changed files with 27 additions and 2 deletions

View file

@ -1,5 +1,5 @@
# @(#)Makefile 5.3 (Berkeley) 5/12/90
# $Id: Makefile,v 1.14 1997/02/22 15:45:54 peter Exp $
# $Id: Makefile,v 1.15 1997/06/29 06:03:28 pst Exp $
PROG= gzip
SRCS= gzip.c zip.c deflate.c trees.c bits.c unzip.c inflate.c util.c \
@ -17,13 +17,20 @@ LINKS+= ${BINDIR}/zgrep ${BINDIR}/zfgrep
LINKS+= ${BINDIR}/zdiff ${BINDIR}/zcmp
NOSHARED?=yes
GREP_LIBZ?= YES
.if defined(GREP_LIBZ) && !empty(GREP_LIBZ)
ZGREP=zgrep.libz
.else
ZGREP=zgrep.getopt
.endif
beforeinstall:
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${.CURDIR}/zforce ${.CURDIR}/gzexe ${.CURDIR}/znew \
${.CURDIR}/zmore ${.CURDIR}/zdiff \
${DESTDIR}${BINDIR}
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${.CURDIR}/zgrep.getopt ${DESTDIR}${BINDIR}/zgrep
${.CURDIR}/${ZGREP} ${DESTDIR}${BINDIR}/zgrep
match.o: ${.CURDIR}/match.S
$(CPP) ${.CURDIR}/match.S >_match.s

View file

@ -0,0 +1,18 @@
#!/bin/sh
# Copyright (c) Dec 1997 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
# Public Domain.
#
# zgrep - Search possibly compressed files for a regular expression. This
# version of zgrep(1) depend on a grep(1) linked with libz.
#
# $Id$
PATH=/bin:/usr/bin; export PATH
case "$0" in # grep variant
*egrep) grep=${EGREP-egrep};;
*fgrep) grep=${FGREP-fgrep};;
*) grep=${GREP-grep};;
esac
exec ${grep} -Z "$@"