xzdec: Remove unused short option -M
[xz/debian.git] / Makefile.am
blobf6e73633a6bd97bbdf2aaaf4915cf41ba8cf432e
1 ## SPDX-License-Identifier: 0BSD
2 ## Author: Lasse Collin
4 # Use -n to prevent gzip from adding a timestamp to the .gz headers.
5 GZIP_ENV = -9n
7 DIST_SUBDIRS = lib src po tests debug
8 SUBDIRS =
10 if COND_GNULIB
11 SUBDIRS += lib
12 endif
14 SUBDIRS += src po tests
16 if COND_DOC
17 dist_doc_DATA = \
18         AUTHORS \
19         COPYING \
20         COPYING.0BSD \
21         COPYING.GPLv2 \
22         NEWS \
23         README \
24         THANKS \
25         doc/faq.txt \
26         doc/history.txt \
27         doc/xz-file-format.txt \
28         doc/lzma-file-format.txt
30 examplesdir = $(docdir)/examples
31 dist_examples_DATA = \
32         doc/examples/00_README.txt \
33         doc/examples/01_compress_easy.c \
34         doc/examples/02_decompress.c \
35         doc/examples/03_compress_custom.c \
36         doc/examples/04_compress_easy_mt.c \
37         doc/examples/11_file_info.c \
38         doc/examples/Makefile
39 endif
41 EXTRA_DIST = \
42         cmake \
43         dos \
44         doxygen \
45         extra \
46         po4a \
47         windows \
48         CMakeLists.txt \
49         COPYING.GPLv2 \
50         COPYING.GPLv3 \
51         COPYING.LGPLv2.1 \
52         INSTALL.generic \
53         PACKAGERS \
54         TODO \
55         autogen.sh \
56         build-aux/manconv.sh \
57         build-aux/version.sh \
58         po/xz.pot-header
60 ACLOCAL_AMFLAGS = -I m4
62 # List of man pages to convert to plain text in the dist-hook target
63 # or to PDF in the pdf-local 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 plain text (ASCII only) format.
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                         b69da6d4bb6bb11fc0cf066920791990d2b22a06^..HEAD ) \
79                         > "$(distdir)/ChangeLog"; \
80         fi
81         if type groff > /dev/null 2>&1; then \
82                 dest="$(distdir)/doc/man" && \
83                 $(MKDIR_P) "$$dest/txt" && \
84                 for FILE in $(manfiles); do \
85                         BASE=`basename $$FILE .1` && \
86                         $(SHELL) "$(srcdir)/build-aux/manconv.sh" ascii \
87                                 < "$(srcdir)/$$FILE" \
88                                 > "$$dest/txt/$$BASE.txt"; \
89                 done; \
90         fi
92 # This works with GNU tar and gives cleaner package than normal 'make dist'.
93 # This also ensures that the translations are up to date (dist-hook
94 # would be too late for that).
95 mydist:
96         $(SHELL) "$(srcdir)/src/liblzma/validate_map.sh"
97         cd po && $(MAKE) xz.pot-update
98         cd "$(srcdir)/po4a" && $(SHELL) update-po
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
107 # NOTE: This only creates the PDFs. The install rules are missing.
108 pdf-local:
109         dest="doc/man" && \
110         $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" && \
111         for FILE in $(manfiles); do \
112                 BASE=`basename $$FILE .1` && \
113                 $(SHELL) "$(srcdir)/build-aux/manconv.sh" pdf a4 \
114                         < "$(srcdir)/$$FILE" \
115                         > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
116                 $(SHELL) "$(srcdir)/build-aux/manconv.sh" pdf letter \
117                         < "$(srcdir)/$$FILE" \
118                         > "$$dest/pdf-letter/$$BASE-letter.pdf"; \
119         done