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
43 ACLOCAL_AMFLAGS = -I m4
45 # List of man pages to conver to PDF and plain text in the dist-hook target.
49 src/lzmainfo/lzmainfo.1 \
50 src/scripts/xzdiff.1 \
51 src/scripts/xzgrep.1 \
52 src/scripts/xzless.1 \
55 # Create ChangeLog from output of "git log --date=iso --stat".
56 # Convert the man pages to PDF and plain text (ASCII only) formats.
58 if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
59 ( cd "$(srcdir)" && git log --date=iso --stat ) \
60 > "$(distdir)/ChangeLog"; \
62 if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
63 dest="$(distdir)/doc/man" && \
64 $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \
65 for FILE in $(manfiles); do \
66 BASE=`basename $$FILE .1` && \
67 groff -man -t -Tps -P-pa4 < "$(srcdir)/$$FILE" \
69 > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
70 groff -man -t -Tps -P-pletter < "$(srcdir)/$$FILE" \
72 > "$$dest/pdf-letter/$$BASE-letter.pdf" && \
73 groff -man -t -Tascii < "$(srcdir)/$$FILE" \
74 | col -bx > "$$dest/txt/$$BASE.txt"; \
78 # This works with GNU tar and gives cleaner package than normal 'make dist'.
80 if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
81 SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
82 test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
84 TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
85 $(MAKE) VERSION="$$VERSION" dist-gzip