Build: Bump gettext version requirement to 0.18.
[xz/debian.git] / Makefile.am
blob8aa6dfc561234063044ededfaacea367b792e453
1 ##
2 ## Author: Lasse Collin
3 ##
4 ## This file has been put into the public domain.
5 ## You can do whatever you want with this file.
6 ##
8 # Use -n to prevent gzip from adding a timestamp to the .gz headers.
9 GZIP_ENV = -9n
11 DIST_SUBDIRS = lib src po tests debug
12 SUBDIRS =
14 if COND_GNULIB
15 SUBDIRS += lib
16 endif
18 SUBDIRS += src po tests
20 dist_doc_DATA = \
21         AUTHORS \
22         COPYING \
23         COPYING.GPLv2 \
24         NEWS \
25         README \
26         THANKS \
27         TODO \
28         doc/faq.txt \
29         doc/history.txt \
30         doc/xz-file-format.txt \
31         doc/lzma-file-format.txt
33 examplesdir = $(docdir)/examples
34 dist_examples_DATA = \
35         doc/examples/00_README.txt \
36         doc/examples/01_compress_easy.c \
37         doc/examples/02_decompress.c \
38         doc/examples/03_compress_custom.c \
39         doc/examples/Makefile
41 examplesolddir = $(docdir)/examples_old
42 dist_examplesold_DATA = \
43         doc/examples_old/xz_pipe_comp.c \
44         doc/examples_old/xz_pipe_decomp.c
46 EXTRA_DIST = \
47         extra \
48         dos \
49         windows \
50         macosx \
51         autogen.sh \
52         Doxyfile.in \
53         COPYING.GPLv2 \
54         COPYING.GPLv3 \
55         COPYING.LGPLv2.1 \
56         INSTALL.generic \
57         PACKAGERS \
58         build-aux/manconv.sh \
59         build-aux/version.sh
61 ACLOCAL_AMFLAGS = -I m4
63 # List of man pages to conver to PDF and plain text in the dist-hook target.
64 manfiles = \
65         src/xz/xz.1 \
66         src/xzdec/xzdec.1 \
67         src/lzmainfo/lzmainfo.1 \
68         src/scripts/xzdiff.1 \
69         src/scripts/xzgrep.1 \
70         src/scripts/xzless.1 \
71         src/scripts/xzmore.1
73 # Create ChangeLog from output of "git log --date=iso --stat".
74 # Convert the man pages to PDF and plain text (ASCII only) formats.
75 dist-hook:
76         if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
77                 ( cd "$(srcdir)" && git log --date=iso --stat ) \
78                         > "$(distdir)/ChangeLog"; \
79         fi
80         if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
81                 dest="$(distdir)/doc/man" && \
82                 $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \
83                 for FILE in $(manfiles); do \
84                         BASE=`basename $$FILE .1` && \
85                         sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \
86                                 < "$(srcdir)/$$FILE" \
87                                 > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
88                         sh "$(srcdir)/build-aux/manconv.sh" pdf letter \
89                                 < "$(srcdir)/$$FILE" \
90                                 > "$$dest/pdf-letter/$$BASE-letter.pdf" && \
91                         sh "$(srcdir)/build-aux/manconv.sh" ascii \
92                                 < "$(srcdir)/$$FILE" \
93                                 > "$$dest/txt/$$BASE.txt"; \
94                 done; \
95         fi
97 # This works with GNU tar and gives cleaner package than normal 'make dist'.
98 mydist:
99         VERSION=$(VERSION); \
100         if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
101                 SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
102                 test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
103         fi; \
104         TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
105                 $(MAKE) VERSION="$$VERSION" dist-gzip