Build: Fix Autoconf warnings about escaped backquotes.
[xz/debian.git] / Makefile.am
blob51cc56f291fe5f606a0d6f361a06081c01a5d3db
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 if COND_DOC
21 dist_doc_DATA = \
22         AUTHORS \
23         COPYING \
24         COPYING.GPLv2 \
25         NEWS \
26         README \
27         THANKS \
28         TODO \
29         doc/faq.txt \
30         doc/history.txt \
31         doc/xz-file-format.txt \
32         doc/lzma-file-format.txt
34 examplesdir = $(docdir)/examples
35 dist_examples_DATA = \
36         doc/examples/00_README.txt \
37         doc/examples/01_compress_easy.c \
38         doc/examples/02_decompress.c \
39         doc/examples/03_compress_custom.c \
40         doc/examples/Makefile
42 examplesolddir = $(docdir)/examples_old
43 dist_examplesold_DATA = \
44         doc/examples_old/xz_pipe_comp.c \
45         doc/examples_old/xz_pipe_decomp.c
46 endif
48 EXTRA_DIST = \
49         extra \
50         dos \
51         windows \
52         macosx \
53         autogen.sh \
54         Doxyfile.in \
55         COPYING.GPLv2 \
56         COPYING.GPLv3 \
57         COPYING.LGPLv2.1 \
58         INSTALL.generic \
59         PACKAGERS \
60         build-aux/manconv.sh \
61         build-aux/version.sh
63 ACLOCAL_AMFLAGS = -I m4
65 # List of man pages to conver to PDF and plain text in the dist-hook target.
66 manfiles = \
67         src/xz/xz.1 \
68         src/xzdec/xzdec.1 \
69         src/lzmainfo/lzmainfo.1 \
70         src/scripts/xzdiff.1 \
71         src/scripts/xzgrep.1 \
72         src/scripts/xzless.1 \
73         src/scripts/xzmore.1
75 # Create ChangeLog from output of "git log --date=iso --stat".
76 # Convert the man pages to PDF and plain text (ASCII only) formats.
77 dist-hook:
78         if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
79                 ( cd "$(srcdir)" && git log --date=iso --stat ) \
80                         > "$(distdir)/ChangeLog"; \
81         fi
82         if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
83                 dest="$(distdir)/doc/man" && \
84                 $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \
85                 for FILE in $(manfiles); do \
86                         BASE=`basename $$FILE .1` && \
87                         sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \
88                                 < "$(srcdir)/$$FILE" \
89                                 > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
90                         sh "$(srcdir)/build-aux/manconv.sh" pdf letter \
91                                 < "$(srcdir)/$$FILE" \
92                                 > "$$dest/pdf-letter/$$BASE-letter.pdf" && \
93                         sh "$(srcdir)/build-aux/manconv.sh" ascii \
94                                 < "$(srcdir)/$$FILE" \
95                                 > "$$dest/txt/$$BASE.txt"; \
96                 done; \
97         fi
99 # This works with GNU tar and gives cleaner package than normal 'make dist'.
100 mydist:
101         VERSION=$(VERSION); \
102         if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
103                 SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
104                 test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
105         fi; \
106         TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
107                 $(MAKE) VERSION="$$VERSION" dist-gzip