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/manconv.sh \
57 build-aux/version.sh \
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.
67 src/lzmainfo/lzmainfo.1 \
68 src/scripts/xzdiff.1 \
69 src/scripts/xzgrep.1 \
70 src/scripts/xzless.1 \
73 # Create ChangeLog from output of "git log --date=iso --stat".
74 # Convert the man pages to plain text (ASCII only) format.
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"; \
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"; \
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).
96 $(SHELL) "$(srcdir)/src/liblzma/validate_map.sh"
97 cd po && $(MAKE) xz.pot-update
98 cd "$(srcdir)/po4a" && $(SHELL) update-po
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; \
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.
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"; \