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
30 doc/xz-file-format.txt \
31 doc/lzma-file-format.txt
33 examplesdir = $(docdir)/examples
34 dist_examples_DATA = \
35 doc/examples/xz_pipe_comp.c \
36 doc/examples/xz_pipe_decomp.c
49 build-aux/manconv.sh \
52 ACLOCAL_AMFLAGS = -I m4
54 # List of man pages to conver to PDF and plain text in the dist-hook target.
58 src/lzmainfo/lzmainfo.1 \
59 src/scripts/xzdiff.1 \
60 src/scripts/xzgrep.1 \
61 src/scripts/xzless.1 \
64 # Create ChangeLog from output of "git log --date=iso --stat".
65 # Convert the man pages to PDF and plain text (ASCII only) formats.
67 if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
68 ( cd "$(srcdir)" && git log --date=iso --stat ) \
69 > "$(distdir)/ChangeLog"; \
71 if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
72 dest="$(distdir)/doc/man" && \
73 $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \
74 for FILE in $(manfiles); do \
75 BASE=`basename $$FILE .1` && \
76 sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \
77 < "$(srcdir)/$$FILE" \
78 > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
79 sh "$(srcdir)/build-aux/manconv.sh" pdf letter \
80 < "$(srcdir)/$$FILE" \
81 > "$$dest/pdf-letter/$$BASE-letter.pdf" && \
82 sh "$(srcdir)/build-aux/manconv.sh" ascii \
83 < "$(srcdir)/$$FILE" \
84 > "$$dest/txt/$$BASE.txt"; \
88 # This works with GNU tar and gives cleaner package than normal 'make dist'.
91 if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
92 SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
93 test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
95 TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
96 $(MAKE) VERSION="$$VERSION" dist-gzip