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 DIST_SUBDIRS = lib src po tests debug
15 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/xz_pipe_comp.c \
33 doc/examples/xz_pipe_decomp.c
46 build-aux/manconv.sh \
49 ACLOCAL_AMFLAGS = -I m4
51 # List of man pages to conver to PDF and plain text in the dist-hook target.
55 src/lzmainfo/lzmainfo.1 \
56 src/scripts/xzdiff.1 \
57 src/scripts/xzgrep.1 \
58 src/scripts/xzless.1 \
61 # Create ChangeLog from output of "git log --date=iso --stat".
62 # Convert the man pages to PDF and plain text (ASCII only) formats.
64 if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
65 ( cd "$(srcdir)" && git log --date=iso --stat ) \
66 > "$(distdir)/ChangeLog"; \
68 if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
69 dest="$(distdir)/doc/man" && \
70 $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \
71 for FILE in $(manfiles); do \
72 BASE=`basename $$FILE .1` && \
73 sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \
74 < "$(srcdir)/$$FILE" \
75 > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
76 sh "$(srcdir)/build-aux/manconv.sh" pdf letter \
77 < "$(srcdir)/$$FILE" \
78 > "$$dest/pdf-letter/$$BASE-letter.pdf" && \
79 sh "$(srcdir)/build-aux/manconv.sh" ascii \
80 < "$(srcdir)/$$FILE" \
81 > "$$dest/txt/$$BASE.txt"; \
85 # This works with GNU tar and gives cleaner package than normal 'make dist'.
88 if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
89 SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
90 test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
92 TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
93 $(MAKE) VERSION="$$VERSION" dist-gzip