1 ## SPDX-License-Identifier: 0BSD
2 ## Author: Lasse Collin
4 # Use -n to prevent gzip from adding a timestamp to the .gz headers.
7 DIST_SUBDIRS = lib src po tests debug
14 SUBDIRS += src po tests
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 \
56 build-aux/license-check.sh \
57 build-aux/manconv.sh \
58 build-aux/version.sh \
61 ACLOCAL_AMFLAGS = -I m4
63 # List of man pages to convert to plain text in the dist-hook target
64 # or to PDF in the pdf-local target.
68 src/lzmainfo/lzmainfo.1 \
69 src/scripts/xzdiff.1 \
70 src/scripts/xzgrep.1 \
71 src/scripts/xzless.1 \
74 # Create ChangeLog from output of "git log --date=iso --stat".
75 # Convert the man pages to plain text (ASCII only) format.
77 if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
78 ( cd "$(srcdir)" && git log --date=iso --stat \
79 b69da6d4bb6bb11fc0cf066920791990d2b22a06^..HEAD ) \
80 > "$(distdir)/ChangeLog"; \
82 if type groff > /dev/null 2>&1; then \
83 dest="$(distdir)/doc/man" && \
84 $(MKDIR_P) "$$dest/txt" && \
85 for FILE in $(manfiles); do \
86 BASE=`basename $$FILE .1` && \
87 $(SHELL) "$(srcdir)/build-aux/manconv.sh" ascii \
88 < "$(srcdir)/$$FILE" \
89 > "$$dest/txt/$$BASE.txt"; \
92 cd "$(distdir)" && $(SHELL) "build-aux/license-check.sh"
94 # This works with GNU tar and gives cleaner package than normal 'make dist'.
95 # This also ensures that the translations are up to date (dist-hook
96 # would be too late for that).
98 $(SHELL) "$(srcdir)/src/liblzma/validate_map.sh"
99 cd po && $(MAKE) xz.pot-update
100 cd "$(srcdir)/po4a" && $(SHELL) update-po
101 VERSION=$(VERSION); \
102 if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
103 $(SHELL) "$(srcdir)/build-aux/license-check.sh" || exit 1; \
104 SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
105 test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
107 TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
108 $(MAKE) VERSION="$$VERSION" dist-gzip
110 # NOTE: This only creates the PDFs. The install rules are missing.
113 $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" && \
114 for FILE in $(manfiles); do \
115 BASE=`basename $$FILE .1` && \
116 $(SHELL) "$(srcdir)/build-aux/manconv.sh" pdf a4 \
117 < "$(srcdir)/$$FILE" \
118 > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
119 $(SHELL) "$(srcdir)/build-aux/manconv.sh" pdf letter \
120 < "$(srcdir)/$$FILE" \
121 > "$$dest/pdf-letter/$$BASE-letter.pdf"; \