X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=Makefile.am;h=e892cdc8bbde3a6b0efa76436fe423f50010677d;hb=617a2126636a37d66d07aecf70875d30cd4391f9;hp=8023f5b946ac786a4d99a9b616869c7b60625820;hpb=f17cbd13a1d0a7dcf067a1cdba89e9f668ce7d15;p=debian%2Fgzip diff --git a/Makefile.am b/Makefile.am index 8023f5b..e892cdc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,7 @@ # Make gzip (GNU zip). -# Copyright (C) 1999, 2001-2002, 2006-2007, 2009 Free Software Foundation, Inc. +# Copyright (C) 1999, 2001-2002, 2006-2007, 2009-2016 Free Software Foundation, +# Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,37 +17,59 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -SUBDIRS = lib doc -ACLOCAL_AMFLAGS = -I m4 +ALL_RECURSIVE_TARGETS = +BUILT_SOURCES = + +SUBDIRS = lib doc . tests AM_CPPFLAGS = -I$(top_srcdir)/lib +AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) + +# Tell the linker to omit references to unused shared libraries. +AM_LDFLAGS = $(IGNORE_UNUSED_LIBRARIES_CFLAGS) + +noinst_LIBRARIES = libver.a +nodist_libver_a_SOURCES = version.c version.h +DISTCLEANFILES = version.c version.h man_MANS = gunzip.1 gzexe.1 gzip.1 \ zcat.1 zcmp.1 zdiff.1 zforce.1 zgrep.1 zless.1 zmore.1 znew.1 EXTRA_DIST = $(ACINCLUDE_INPUTS) $(man_MANS) \ ChangeLog-2007 \ - tests/hufts-segv.gz \ - algorithm.doc amiga/match.a amiga/Makefile.gcc amiga/Makefile.sasc \ - amiga/tailor.c amiga/utime.h atari/Makefile.st crypt.h \ - gunzip.in gzexe.in gzip.doc gzip.h lzw.h msdos/match.asm msdos/tailor.c \ - msdos/gzip.prj msdos/doturboc.bat msdos/Makefile.msc msdos/Makefile.bor \ - msdos/Makefile.djg nt/Makefile.nt os2/gzip.def os2/Makefile.os2 \ - os2/gzip16.def primos/include/errno.h primos/include/fcntl.h \ - primos/include/stdlib.h primos/include/sysStat.h \ - primos/include/sysTypes.h primos/build.cpl primos/readme \ - primos/primos.c primos/ci.opts revision.h sample/makecrc.c \ + cfg.mk \ + dist-check.mk \ + algorithm.doc \ + gunzip.in gzexe.in gzip.doc \ + revision.h sample/makecrc.c \ sample/ztouch sample/add.c sample/sub.c sample/zread.c sample/zfile \ - tailor.h vms/Makefile.mms vms/gzip.hlp vms/vms.c vms/Readme.vms \ - vms/Makefile.vms vms/Makefile.gcc vms/makegzip.com zcat.in zcmp.in zdiff.in \ + tailor.h \ + zcat.in zcmp.in zdiff.in \ zegrep.in zfgrep.in zforce.in zgrep.in zless.in zmore.in znew.in +noinst_HEADERS = gzip.h lzw.h bin_PROGRAMS = gzip bin_SCRIPTS = gunzip gzexe zcat zcmp zdiff \ zegrep zfgrep zforce zgrep zless zmore znew gzip_SOURCES = \ - bits.c crypt.c deflate.c gzip.c inflate.c lzw.c \ + bits.c deflate.c gzip.c inflate.c lzw.c \ trees.c unlzh.c unlzw.c unpack.c unzip.c util.c zip.c -gzip_LDADD = lib/libgzip.a +gzip_LDADD = libver.a lib/libgzip.a +gzip_LDADD += $(LIB_CLOCK_GETTIME) + +BUILT_SOURCES += version.c +version.c: Makefile + $(AM_V_GEN)rm -f $@ + $(AM_V_at)printf '#include \n' > $@t + $(AM_V_at)printf 'char const *Version = "$(PACKAGE_VERSION)";\n' >> $@t + $(AM_V_at)chmod a-w $@t + $(AM_V_at)mv $@t $@ + +BUILT_SOURCES += version.h +version.h: Makefile + $(AM_V_GEN)rm -f $@ + $(AM_V_at)printf 'extern char const *Version;\n' > $@t + $(AM_V_at)chmod a-w $@t + $(AM_V_at)mv $@t $@ gzip.doc: gzip.1 $(AM_V_GEN)groff -man -Tascii $(srcdir)/gzip.1 | col -b | uniq > $@-t \ @@ -59,7 +82,7 @@ SUFFIXES = .in .in: $(AM_V_GEN)sed \ -e 's|/bin/sh|$(SHELL)|g' \ - -e 's|[@]bindir@|'\''$(bindir)'\''|g' \ + -e 's|[@]GREP@|$(GREP)|g' \ -e 's|[@]VERSION@|$(VERSION)|g' \ $(srcdir)/$@.in >$@-t \ && chmod a+x $@-t \ @@ -75,29 +98,32 @@ gen_start_date = 2008-01-01 gen-ChangeLog: $(AM_V_GEN)if test -d .git; then \ $(top_srcdir)/build-aux/gitlog-to-changelog \ - --since=$(gen_start_date) > $(distdir)/cl-t; \ - rm -f $(distdir)/ChangeLog; \ - mv $(distdir)/cl-t $(distdir)/ChangeLog; \ + --since=$(gen_start_date) > $(distdir)/cl-t && \ + { rm -f $(distdir)/ChangeLog && \ + mv $(distdir)/cl-t $(distdir)/ChangeLog; } \ fi +# Prepend "." to $PATH: +new_path = PATH=.$(PATH_SEPARATOR)$$PATH + # A simple test, just of gzip -- more of a sanity check than anything else. -FILES_TO_CHECK = $(bin_SCRIPTS) $(gzip_LDADD) \ +FILES_TO_CHECK = $(bin_SCRIPTS) \ $(top_srcdir)/ChangeLog $(top_srcdir)/configure $(top_srcdir)/gzip.c check-local: $(FILES_TO_CHECK) $(bin_PROGRAMS) gzip.doc.gz - { test '$(srcdir)' != . || ./zdiff --__bindir . -c gzip.doc.gz; } - ./zdiff --__bindir . -c $(srcdir)/gzip.doc $(srcdir)/gzip.doc - ./zdiff --__bindir . $(srcdir)/gzip.doc gzip.doc.gz - ./zdiff --__bindir . -c - $(srcdir)/gzip.doc /dev/null - for file in $(FILES_TO_CHECK); do \ - ./gzip -cv -- "$$file" | ./gzip -d | cmp - "$$file" || exit 1; \ + $(AM_V_GEN)$(new_path); { test '$(srcdir)' != . \ + || zdiff -c gzip.doc.gz; } + $(AM_V_at)$(new_path); zdiff -c $(srcdir)/gzip.doc $(srcdir)/gzip.doc + $(AM_V_at)$(new_path); zdiff $(srcdir)/gzip.doc gzip.doc.gz + $(AM_V_at)$(new_path); zdiff -c - $(srcdir)/gzip.doc /dev/null + $(AM_V_at)$(new_path); \ + for opt in --rsyncable '' -1 -9; do \ + for file in $(FILES_TO_CHECK); do \ + gzip $$opt -c -- "$$file" \ + | gzip -d | cmp - "$$file" || exit 1; \ + done; \ done - ./gzip -dc $(srcdir)/tests/hufts-segv.gz > /dev/null 2>&1; \ - test $$? = 1 - k=in-$$$$; printf a | ./gzip > $$k && \ - test "`cat $$k | ./gzip -dc $$k - $$k`" = aaa && rm $$k - @echo 'Test succeeded.' install-exec-hook: remove-installed-links install-exec-hook remove-installed-links: @@ -127,6 +153,10 @@ install-exec-hook remove-installed-links: uninstall-local: remove-installed-links +ALL_RECURSIVE_TARGETS += distcheck-hook +distcheck-hook: + $(MAKE) my-distcheck + MAINTAINERCLEANFILES = gzip.doc MOSTLYCLEANFILES = _match.i match_.s _match.S gzip.doc.gz \