ACLOCAL_AMFLAGS = -I m4
-# List of man pages to convert to PDF and plain text in the dist-hook target.
+# List of man pages to convert to plain text in the dist-hook target
+# or to PDF in the pdf-local target.
manfiles = \
src/xz/xz.1 \
src/xzdec/xzdec.1 \
src/scripts/xzmore.1
# Create ChangeLog from output of "git log --date=iso --stat".
-# Convert the man pages to PDF and plain text (ASCII only) formats.
+# Convert the man pages to plain text (ASCII only) format.
dist-hook:
if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
( cd "$(srcdir)" && git log --date=iso --stat \
b69da6d4bb6bb11fc0cf066920791990d2b22a06^..HEAD ) \
> "$(distdir)/ChangeLog"; \
fi
- if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
+ if type groff > /dev/null 2>&1; then \
dest="$(distdir)/doc/man" && \
- $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \
+ $(MKDIR_P) "$$dest/txt" && \
for FILE in $(manfiles); do \
BASE=`basename $$FILE .1` && \
- sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \
- < "$(srcdir)/$$FILE" \
- > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
- sh "$(srcdir)/build-aux/manconv.sh" pdf letter \
- < "$(srcdir)/$$FILE" \
- > "$$dest/pdf-letter/$$BASE-letter.pdf" && \
sh "$(srcdir)/build-aux/manconv.sh" ascii \
< "$(srcdir)/$$FILE" \
> "$$dest/txt/$$BASE.txt"; \
fi; \
TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
$(MAKE) VERSION="$$VERSION" dist-gzip
+
+# NOTE: This only creates the PDFs. The install rules are missing.
+pdf-local:
+ dest="doc/man" && \
+ $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" && \
+ for FILE in $(manfiles); do \
+ BASE=`basename $$FILE .1` && \
+ sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \
+ < "$(srcdir)/$$FILE" \
+ > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
+ sh "$(srcdir)/build-aux/manconv.sh" pdf letter \
+ < "$(srcdir)/$$FILE" \
+ > "$$dest/pdf-letter/$$BASE-letter.pdf"; \
+ done