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 \
40 # Install the Doxygen generated documentation if they were built.
42 if test -d "$(srcdir)/doc/api" ; then \
43 $(MKDIR_P) "$(DESTDIR)$(docdir)/api" && \
44 $(INSTALL_DATA) "$(srcdir)"/doc/api/* \
45 "$(DESTDIR)$(docdir)/api"; \
48 # Remove the Doxygen generated documentation when uninstalling.
50 rm -rf "$(DESTDIR)$(docdir)/api"
68 build-aux/manconv.sh \
69 build-aux/version.sh \
72 ACLOCAL_AMFLAGS = -I m4
74 # List of man pages to convert to PDF and plain text in the dist-hook target.
78 src/lzmainfo/lzmainfo.1 \
79 src/scripts/xzdiff.1 \
80 src/scripts/xzgrep.1 \
81 src/scripts/xzless.1 \
84 # Create ChangeLog from output of "git log --date=iso --stat".
85 # Convert the man pages to PDF and plain text (ASCII only) formats.
87 if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
88 ( cd "$(srcdir)" && git log --date=iso --stat \
89 b69da6d4bb6bb11fc0cf066920791990d2b22a06^..HEAD ) \
90 > "$(distdir)/ChangeLog"; \
92 if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
93 dest="$(distdir)/doc/man" && \
94 $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \
95 for FILE in $(manfiles); do \
96 BASE=`basename $$FILE .1` && \
97 sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \
98 < "$(srcdir)/$$FILE" \
99 > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
100 sh "$(srcdir)/build-aux/manconv.sh" pdf letter \
101 < "$(srcdir)/$$FILE" \
102 > "$$dest/pdf-letter/$$BASE-letter.pdf" && \
103 sh "$(srcdir)/build-aux/manconv.sh" ascii \
104 < "$(srcdir)/$$FILE" \
105 > "$$dest/txt/$$BASE.txt"; \
108 if test -d "$(srcdir)/doc/api" ; then \
109 $(MKDIR_P) "$(distdir)/doc/api" && \
110 $(INSTALL_DATA) "$(srcdir)"/doc/api/* \
111 "$(distdir)/doc/api"; \
114 # This works with GNU tar and gives cleaner package than normal 'make dist'.
115 # This also ensures that the man page translations are up to date (dist-hook
116 # would be too late for that).
118 sh "$(srcdir)/src/liblzma/validate_map.sh"
119 cd "$(srcdir)/po4a" && sh update-po
120 cd "$(srcdir)/doxygen" && sh update-doxygen
121 VERSION=$(VERSION); \
122 if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
123 SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
124 test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
126 TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
127 $(MAKE) VERSION="$$VERSION" dist-gzip