[3325] | 1 | # Make gzip (GNU zip).
|
---|
| 2 |
|
---|
| 3 | # Copyright (C) 1999, 2001, 2002, 2006, 2007 Free Software Foundation, Inc.
|
---|
| 4 |
|
---|
| 5 | # This program is free software; you can redistribute it and/or modify
|
---|
| 6 | # it under the terms of the GNU General Public License as published by
|
---|
| 7 | # the Free Software Foundation; either version 2 of the License, or
|
---|
| 8 | # (at your option) any later version.
|
---|
| 9 |
|
---|
| 10 | # This program is distributed in the hope that it will be useful,
|
---|
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 13 | # GNU General Public License for more details.
|
---|
| 14 |
|
---|
| 15 | # You should have received a copy of the GNU General Public License along
|
---|
| 16 | # with this program; if not, write to the Free Software Foundation, Inc.,
|
---|
| 17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
---|
| 18 |
|
---|
| 19 | SUBDIRS = lib doc
|
---|
| 20 | ACLOCAL_AMFLAGS = -I m4
|
---|
| 21 | AM_CPPFLAGS = -I$(top_srcdir)/lib
|
---|
| 22 |
|
---|
| 23 | man_MANS = gunzip.1 gzexe.1 gzip.1 \
|
---|
| 24 | zcat.1 zcmp.1 zdiff.1 zforce.1 zgrep.1 zless.1 zmore.1 znew.1
|
---|
| 25 |
|
---|
| 26 | EXTRA_DIST = $(ACINCLUDE_INPUTS) $(man_MANS) \
|
---|
| 27 | algorithm.doc amiga/match.a amiga/Makefile.gcc amiga/Makefile.sasc \
|
---|
| 28 | amiga/tailor.c amiga/utime.h atari/Makefile.st crypt.h \
|
---|
| 29 | gunzip.in gzexe.in gzip.doc gzip.h lzw.h msdos/match.asm msdos/tailor.c \
|
---|
| 30 | msdos/gzip.prj msdos/doturboc.bat msdos/Makefile.msc msdos/Makefile.bor \
|
---|
| 31 | msdos/Makefile.djg nt/Makefile.nt os2/gzip.def os2/Makefile.os2 \
|
---|
| 32 | os2/gzip16.def primos/include/errno.h primos/include/fcntl.h \
|
---|
| 33 | primos/include/stdlib.h primos/include/sysStat.h \
|
---|
| 34 | primos/include/sysTypes.h primos/build.cpl primos/readme \
|
---|
| 35 | primos/primos.c primos/ci.opts revision.h sample/makecrc.c \
|
---|
| 36 | sample/ztouch sample/add.c sample/sub.c sample/zread.c sample/zfile \
|
---|
| 37 | tailor.h vms/Makefile.mms vms/gzip.hlp vms/vms.c vms/Readme.vms \
|
---|
| 38 | vms/Makefile.vms vms/Makefile.gcc vms/makegzip.com zcat.in zcmp.in zdiff.in \
|
---|
| 39 | zegrep.in zfgrep.in zforce.in zgrep.in zless.in zmore.in znew.in
|
---|
| 40 |
|
---|
| 41 | bin_PROGRAMS = gzip
|
---|
| 42 | bin_SCRIPTS = gunzip gzexe zcat zcmp zdiff \
|
---|
| 43 | zegrep zfgrep zforce zgrep zless zmore znew
|
---|
| 44 | gzip_SOURCES = \
|
---|
| 45 | bits.c crypt.c deflate.c gzip.c inflate.c lzw.c \
|
---|
| 46 | trees.c unlzh.c unlzw.c unpack.c unzip.c util.c zip.c
|
---|
| 47 | gzip_LDADD = lib/libgzip.a
|
---|
| 48 |
|
---|
| 49 | gzip.doc: gzip.1
|
---|
| 50 | groff -man -Tascii $(srcdir)/gzip.1 | col -b | uniq >$@
|
---|
| 51 |
|
---|
| 52 | gzip.doc.gz: gzip.doc
|
---|
| 53 | gzip <$? >$@
|
---|
| 54 |
|
---|
| 55 | SUFFIXES = .in
|
---|
| 56 | .in:
|
---|
| 57 | sed \
|
---|
| 58 | -e 's|/bin/sh|$(SHELL)|g' \
|
---|
| 59 | -e 's|BINDIR|$${GZIP_BINDIR-'\''$(bindir)'\''}|g' \
|
---|
| 60 | -e 's|[@]VERSION@|$(VERSION)|g' \
|
---|
| 61 | $(srcdir)/$@.in >$@
|
---|
| 62 | chmod a+x $@
|
---|
| 63 |
|
---|
| 64 | # A simple test, just of gzip -- more of a sanity check than anything else.
|
---|
| 65 | FILES_TO_CHECK = $(bin_SCRIPTS) $(gzip_LDADD) \
|
---|
| 66 | $(top_srcdir)/ChangeLog $(top_srcdir)/configure $(top_srcdir)/gzip.c
|
---|
| 67 | check-local: $(FILES_TO_CHECK) gzip.doc.gz
|
---|
| 68 | { test '$(srcdir)' != . || GZIP_BINDIR=. ./zdiff -c gzip.doc.gz; }
|
---|
| 69 | GZIP_BINDIR=. ./zdiff -c $(srcdir)/gzip.doc $(srcdir)/gzip.doc
|
---|
| 70 | GZIP_BINDIR=. ./zdiff $(srcdir)/gzip.doc gzip.doc.gz
|
---|
| 71 | GZIP_BINDIR=. ./zdiff -c - $(srcdir)/gzip.doc <gzip.doc.gz
|
---|
| 72 | GZIP_BINDIR=. ./zdiff -c gzip.doc.gz gzip.doc.gz
|
---|
| 73 | GZIP_BINDIR=. ./zgrep -iV >/dev/null
|
---|
| 74 | for file in $(FILES_TO_CHECK); do \
|
---|
| 75 | ./gzip -cv -- "$$file" | ./gzip -d | cmp - "$$file" || exit; \
|
---|
| 76 | done
|
---|
| 77 | @echo 'Test succeeded.'
|
---|
| 78 |
|
---|
| 79 | install-exec-hook: remove-installed-links
|
---|
| 80 | install-exec-hook remove-installed-links:
|
---|
| 81 | @for prog_ext in $(bin_PROGRAMS) $(bin_SCRIPTS); do \
|
---|
| 82 | prog=`echo "$$prog_ext"|sed 's/$(EXEEXT)$$//'`; \
|
---|
| 83 | case $$prog in \
|
---|
| 84 | gunzip) aliases='uncompress';; \
|
---|
| 85 | *) continue;; \
|
---|
| 86 | esac; \
|
---|
| 87 | transform='$(transform)'; \
|
---|
| 88 | test "X$$prog" = "X$$prog_ext" || \
|
---|
| 89 | transform="$$transform"';s/$$/$(EXEEXT)/'; \
|
---|
| 90 | destbindir=$(DESTDIR)$(bindir); \
|
---|
| 91 | source=`echo "$$prog"|sed "$$transform"`; \
|
---|
| 92 | for alias in $$aliases; do \
|
---|
| 93 | dest=`echo "$$alias"|sed "$$transform"`; \
|
---|
| 94 | (set -x; \
|
---|
| 95 | cd "$$destbindir" && \
|
---|
| 96 | rm -f "$$dest" && \
|
---|
| 97 | case $@ in \
|
---|
| 98 | install-exec-hook) \
|
---|
| 99 | ln "$$source" "$$dest" || $(LN_S) "$$source" "$$dest";; \
|
---|
| 100 | esac \
|
---|
| 101 | ) || exit; \
|
---|
| 102 | done; \
|
---|
| 103 | done
|
---|
| 104 |
|
---|
| 105 | uninstall-local: remove-installed-links
|
---|
| 106 |
|
---|
| 107 | MAINTAINERCLEANFILES = gzip.doc
|
---|
| 108 |
|
---|
| 109 | MOSTLYCLEANFILES = _match.i match_.s _match.S gzip.doc.gz \
|
---|
| 110 | gunzip gzexe zcat zcmp zdiff zegrep zfgrep zforce zgrep zless zmore znew
|
---|