Build: Don't allow empty LIST in --enable-match-finders=LIST.
[xz.git] / Makefile.am
blobe5b1265ebaed0ec818c006bd457698af81d20911
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/04_compress_easy_mt.c \
41         doc/examples/Makefile
43 examplesolddir = $(docdir)/examples_old
44 dist_examplesold_DATA = \
45         doc/examples_old/xz_pipe_comp.c \
46         doc/examples_old/xz_pipe_decomp.c
47 endif
49 EXTRA_DIST = \
50         po4a \
51         extra \
52         dos \
53         windows \
54         macosx \
55         autogen.sh \
56         Doxyfile.in \
57         COPYING.GPLv2 \
58         COPYING.GPLv3 \
59         COPYING.LGPLv2.1 \
60         INSTALL.generic \
61         PACKAGERS \
62         build-aux/manconv.sh \
63         build-aux/version.sh
65 ACLOCAL_AMFLAGS = -I m4
67 # List of man pages to convert to PDF and plain text in the dist-hook target.
68 manfiles = \
69         src/xz/xz.1 \
70         src/xzdec/xzdec.1 \
71         src/lzmainfo/lzmainfo.1 \
72         src/scripts/xzdiff.1 \
73         src/scripts/xzgrep.1 \
74         src/scripts/xzless.1 \
75         src/scripts/xzmore.1
77 # Create ChangeLog from output of "git log --date=iso --stat".
78 # Convert the man pages to PDF and plain text (ASCII only) formats.
79 dist-hook:
80         if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
81                 ( cd "$(srcdir)" && git log --date=iso --stat \
82                         b667a3ef6338a2c1db7b7706b1f6c99ea392221c^..HEAD ) \
83                         > "$(distdir)/ChangeLog"; \
84         fi
85         if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
86                 dest="$(distdir)/doc/man" && \
87                 $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \
88                 for FILE in $(manfiles); do \
89                         BASE=`basename $$FILE .1` && \
90                         sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \
91                                 < "$(srcdir)/$$FILE" \
92                                 > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
93                         sh "$(srcdir)/build-aux/manconv.sh" pdf letter \
94                                 < "$(srcdir)/$$FILE" \
95                                 > "$$dest/pdf-letter/$$BASE-letter.pdf" && \
96                         sh "$(srcdir)/build-aux/manconv.sh" ascii \
97                                 < "$(srcdir)/$$FILE" \
98                                 > "$$dest/txt/$$BASE.txt"; \
99                 done; \
100         fi
102 # This works with GNU tar and gives cleaner package than normal 'make dist'.
103 # This also ensures that the man page translations are up to date (dist-hook
104 # would be too late for that).
105 mydist:
106         sh "$(srcdir)/src/liblzma/validate_map.sh"
107         cd "$(srcdir)/po4a" && sh update-po
108         VERSION=$(VERSION); \
109         if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
110                 SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
111                 test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
112         fi; \
113         TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
114                 $(MAKE) VERSION="$$VERSION" dist-gzip