diff --git a/gnu/usr.bin/gzip/Makefile b/gnu/usr.bin/gzip/Makefile index 77eb4a65289..6529e5ee862 100644 --- a/gnu/usr.bin/gzip/Makefile +++ b/gnu/usr.bin/gzip/Makefile @@ -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 diff --git a/gnu/usr.bin/gzip/zgrep.libz b/gnu/usr.bin/gzip/zgrep.libz new file mode 100644 index 00000000000..07d5267fa4a --- /dev/null +++ b/gnu/usr.bin/gzip/zgrep.libz @@ -0,0 +1,18 @@ +#!/bin/sh +# Copyright (c) Dec 1997 Wolfram Schneider . 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 "$@"