]> git.cworth.org Git - gzip/blob - Makefile.am
Imported Debian patch 1.3.5-10sarge1
[gzip] / Makefile.am
1 # Make gzip (GNU zip).
2
3 ## Copyright (C) 1999, 2001, 2002 Free Software Foundation
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, or (at your option)
8 ## 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
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 ## 02111-1307, USA.
19
20 AUTOMAKE_OPTIONS = gnits dist-shar
21 ACLOCAL_AMFLAGS = -I m4
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 M4DIR = $(srcdir)/m4
27 ACINCLUDE_INPUTS = $(M4DIR)/shell.m4
28
29 EXTRA_DIST = $(ACINCLUDE_INPUTS) $(man_MANS) \
30   algorithm.doc amiga/match.a amiga/Makefile.gcc amiga/Makefile.sasc \
31   amiga/tailor.c amiga/utime.h atari/Makefile.st crypt.h getopt.h \
32   gzexe.in gzip.doc gzip.h lzw.h msdos/match.asm msdos/tailor.c \
33   msdos/gzip.prj msdos/doturboc.bat msdos/Makefile.msc msdos/Makefile.bor \
34   msdos/Makefile.djg nt/Makefile.nt os2/gzip.def os2/Makefile.os2 \
35   os2/gzip16.def primos/include/errno.h primos/include/fcntl.h \
36   primos/include/stdlib.h primos/include/sysStat.h \
37   primos/include/sysTypes.h primos/build.cpl primos/readme \
38   primos/primos.c primos/ci.opts revision.h sample/makecrc.c \
39   sample/ztouch sample/add.c sample/sub.c sample/zread.c sample/zfile \
40   tailor.h vms/Makefile.mms vms/gzip.hlp vms/vms.c vms/Readme.vms \
41   vms/Makefile.vms vms/Makefile.gcc vms/makegzip.com zdiff.in \
42   zforce.in zgrep.in zless.in zmore.in znew.in
43
44 bin_PROGRAMS = gzip
45 bin_SCRIPTS = gzexe zdiff zgrep zforce zless zmore znew
46 gzip_SOURCES = \
47   bits.c crypt.c deflate.c getopt.c getopt1.c gzip.c inflate.c lzw.c \
48   trees.c unlzh.c unlzw.c unpack.c unzip.c util.c yesno.c zip.c
49 gzip_LDADD = @LIBOBJS@
50
51 AM_MAKEINFOFLAGS = --no-split
52
53 info_TEXINFOS = gzip.texi
54 gzip_TEXINFOS = fdl.texi
55
56 ASCPP = @ASCPP@
57 LN_S = @LN_S@
58
59 match.$(OBJEXT): match.c
60         cp $(srcdir)/match.c _match.S
61         $(ASCPP) _match.S >_match.s
62         $(CC) -c $(CFLAGS) _match.s
63         mv _match.$(OBJEXT) match.$(OBJEXT)
64         rm -f _match.S _match.s
65
66 gzip.doc: gzip.1
67         groff -man -Tascii $(srcdir)/gzip.1 | col -b | uniq >$@
68
69 SUFFIXES = .in
70 .in:
71         sed \
72                 -e '$(SEDCMD)' \
73                 -e 's|/bin/sh|$(SHELL)|g' \
74                 -e 's|BINDIR|$(bindir)|g' \
75                 $(srcdir)/$@.in >$@
76         chmod a+x $@
77
78 install-exec-hook: remove-installed-links
79 install-exec-hook remove-installed-links:
80         @for prog_ext in $(bin_PROGRAMS) $(bin_SCRIPTS); do \
81           prog=`echo "$$prog_ext"|sed 's/$(EXEEXT)$$//'`; \
82           case $$prog in \
83           gzip) aliases='gunzip zcat';; \
84           zdiff) aliases='zcmp';; \
85           zgrep) aliases='zegrep zfgrep';; \
86           *) continue;; \
87           esac; \
88           transform='$(transform)'; \
89           test "X$$prog" = "X$$prog_ext" || \
90             transform="$$transform"';s/$$/$(EXEEXT)/'; \
91           source=$(DESTDIR)$(bindir)/`echo "$$prog"|sed "$$transform"`; \
92           for alias in $$aliases; do \
93             dest=$(DESTDIR)$(bindir)/`echo "$$alias"|sed "$$transform"`; \
94             (set -x; \
95              rm -f "$$dest" && \
96              case $@ in \
97              install-exec-hook) \
98                for ln in ln "$(LN_S)"; do \
99                  $$ln "$$source" "$$dest" && break; \
100                done;; \
101              esac \
102             ) || exit; \
103           done; \
104         done
105
106 uninstall-local: remove-installed-links
107
108 MAINTAINERCLEANFILES = gzip.doc
109
110 MOSTLYCLEANFILES = _match.s gzexe zdiff zforce zgrep zless zmore znew