2 ## Author: Lasse Collin
4 ## This file has been put into the public domain.
5 ## You can do whatever you want with this file.
8 # Use -n to prevent gzip from adding a timestamp to the .gz headers.
11 DIST_SUBDIRS = lib src po tests debug
18 SUBDIRS += src po tests
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 \
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
48 # Install the Doxygen generated documentation if they were built.
50 if test -d "$(srcdir)/doc/api" ; then \
51 $(MKDIR_P) "$(DESTDIR)$(docdir)/api" && \
52 $(INSTALL_DATA) "$(srcdir)"/doc/api/* \
53 "$(DESTDIR)$(docdir)/api"; \
56 # Remove the Doxygen generated documentation when uninstalling.
58 rm -rf "$(DESTDIR)$(docdir)/api"
76 build-aux/manconv.sh \
79 ACLOCAL_AMFLAGS = -I m4
81 # List of man pages to convert to PDF and plain text in the dist-hook target.
85 src/lzmainfo/lzmainfo.1 \
86 src/scripts/xzdiff.1 \
87 src/scripts/xzgrep.1 \
88 src/scripts/xzless.1 \
91 # Create ChangeLog from output of "git log --date=iso --stat".
92 # Convert the man pages to PDF and plain text (ASCII only) formats.
94 if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
95 ( cd "$(srcdir)" && git log --date=iso --stat \
96 6060f7dc76fd6c2a8a1f8e85d0e4d86bb78273e6^..HEAD ) \
97 > "$(distdir)/ChangeLog"; \
99 if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
100 dest="$(distdir)/doc/man" && \
101 $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \
102 for FILE in $(manfiles); do \
103 BASE=`basename $$FILE .1` && \
104 sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \
105 < "$(srcdir)/$$FILE" \
106 > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
107 sh "$(srcdir)/build-aux/manconv.sh" pdf letter \
108 < "$(srcdir)/$$FILE" \
109 > "$$dest/pdf-letter/$$BASE-letter.pdf" && \
110 sh "$(srcdir)/build-aux/manconv.sh" ascii \
111 < "$(srcdir)/$$FILE" \
112 > "$$dest/txt/$$BASE.txt"; \
115 if test -d "$(srcdir)/doc/api" ; then \
116 $(MKDIR_P) "$(distdir)/doc/api" && \
117 $(INSTALL_DATA) "$(srcdir)"/doc/api/* \
118 "$(distdir)/doc/api"; \
121 # This works with GNU tar and gives cleaner package than normal 'make dist'.
122 # This also ensures that the man page translations are up to date (dist-hook
123 # would be too late for that).
125 sh "$(srcdir)/src/liblzma/validate_map.sh"
126 cd "$(srcdir)/po4a" && sh update-po
127 cd "$(srcdir)/doxygen" && sh update-doxygen
128 VERSION=$(VERSION); \
129 if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
130 SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
131 test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
133 TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
134 $(MAKE) VERSION="$$VERSION" dist-gzip