Include debug/translation.bash in the distribution.
[xz/debian.git] / Makefile.am
blob97553fa299706998b42a2751f8052e6f1bb494dd
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         autogen.sh \
51         Doxyfile.in \
52         COPYING.GPLv2 \
53         COPYING.GPLv3 \
54         COPYING.LGPLv2.1 \
55         INSTALL.generic \
56         PACKAGERS \
57         build-aux/manconv.sh \
58         build-aux/version.sh
60 ACLOCAL_AMFLAGS = -I m4
62 # List of man pages to conver to PDF and plain text in the dist-hook target.
63 manfiles = \
64         src/xz/xz.1 \
65         src/xzdec/xzdec.1 \
66         src/lzmainfo/lzmainfo.1 \
67         src/scripts/xzdiff.1 \
68         src/scripts/xzgrep.1 \
69         src/scripts/xzless.1 \
70         src/scripts/xzmore.1
72 # Create ChangeLog from output of "git log --date=iso --stat".
73 # Convert the man pages to PDF and plain text (ASCII only) formats.
74 dist-hook:
75         if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
76                 ( cd "$(srcdir)" && git log --date=iso --stat ) \
77                         > "$(distdir)/ChangeLog"; \
78         fi
79         if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
80                 dest="$(distdir)/doc/man" && \
81                 $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \
82                 for FILE in $(manfiles); do \
83                         BASE=`basename $$FILE .1` && \
84                         sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \
85                                 < "$(srcdir)/$$FILE" \
86                                 > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
87                         sh "$(srcdir)/build-aux/manconv.sh" pdf letter \
88                                 < "$(srcdir)/$$FILE" \
89                                 > "$$dest/pdf-letter/$$BASE-letter.pdf" && \
90                         sh "$(srcdir)/build-aux/manconv.sh" ascii \
91                                 < "$(srcdir)/$$FILE" \
92                                 > "$$dest/txt/$$BASE.txt"; \
93                 done; \
94         fi
96 # This works with GNU tar and gives cleaner package than normal 'make dist'.
97 mydist:
98         VERSION=$(VERSION); \
99         if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
100                 SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
101                 test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
102         fi; \
103         TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
104                 $(MAKE) VERSION="$$VERSION" dist-gzip