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/00_README.txt \
36 doc/examples/01_compress_easy.c \
37 doc/examples/02_decompress.c \
38 doc/examples/03_compress_custom.c \
41 examplesolddir = $(docdir)/examples_old
42 dist_examplesold_DATA = \
43 doc/examples_old/xz_pipe_comp.c \
44 doc/examples_old/xz_pipe_decomp.c
58 build-aux/manconv.sh \
61 ACLOCAL_AMFLAGS = -I m4
63 # List of man pages to conver to PDF and plain text in the dist-hook 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 PDF and plain text (ASCII only) formats.
76 if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
77 ( cd "$(srcdir)" && git log --date=iso --stat ) \
78 > "$(distdir)/ChangeLog"; \
80 if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
81 dest="$(distdir)/doc/man" && \
82 $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \
83 for FILE in $(manfiles); do \
84 BASE=`basename $$FILE .1` && \
85 sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \
86 < "$(srcdir)/$$FILE" \
87 > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
88 sh "$(srcdir)/build-aux/manconv.sh" pdf letter \
89 < "$(srcdir)/$$FILE" \
90 > "$$dest/pdf-letter/$$BASE-letter.pdf" && \
91 sh "$(srcdir)/build-aux/manconv.sh" ascii \
92 < "$(srcdir)/$$FILE" \
93 > "$$dest/txt/$$BASE.txt"; \
97 # This works with GNU tar and gives cleaner package than normal 'make dist'.
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