]> icculus.org git repositories - icculus/xz.git/blob - Makefile.am
Fix the debug directory.
[icculus/xz.git] / Makefile.am
1 ##
2 ## Author: Lasse Collin
3 ##
4 ## This file has been put into the public domain.
5 ## You can do whatever you want with this file.
6 ##
7
8 DIST_SUBDIRS = lib src po tests debug
9 SUBDIRS =
10
11 if COND_GNULIB
12 SUBDIRS += lib
13 endif
14
15 SUBDIRS += src po tests
16
17 doc_DATA = \
18         AUTHORS \
19         COPYING \
20         COPYING.GPLv2 \
21         NEWS \
22         README \
23         THANKS \
24         TODO \
25         doc/faq.txt \
26         doc/history.txt \
27         doc/xz-file-format.txt \
28         doc/lzma-file-format.txt
29
30 EXTRA_DIST = \
31         doc \
32         extra \
33         dos \
34         windows \
35         autogen.sh \
36         version.sh \
37         Doxyfile.in \
38         COPYING.GPLv2 \
39         COPYING.GPLv3 \
40         COPYING.LGPLv2.1 \
41         INSTALL.generic \
42         PACKAGERS
43
44 ACLOCAL_AMFLAGS = -I m4
45
46 # List of man pages to conver to PDF and plain text in the dist-hook target.
47 manfiles = \
48         src/xz/xz.1 \
49         src/xzdec/xzdec.1 \
50         src/scripts/xzdiff.1 \
51         src/scripts/xzgrep.1 \
52         src/scripts/xzless.1 \
53         src/scripts/xzmore.1
54
55 # Create ChangeLog from output of "git log --date=iso --stat".
56 # Convert the man pages to PDF and plain text (ASCII only) formats.
57 dist-hook:
58         test -d "$(srcdir)/.git" && type git > /dev/null 2>&1 \
59                 && ( cd "$(srcdir)" && git log --date=iso --stat ) \
60                         > "$(distdir)/ChangeLog"
61         if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
62                 dest="$(distdir)/doc/man" && \
63                 mkdir "$$dest" && \
64                 mkdir "$$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" \
68                                 | ps2pdf - - \
69                                 > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
70                         groff -man -t -Tps -P-pletter < "$(srcdir)/$$FILE" \
71                                 | ps2pdf - - \
72                                 > "$$dest/pdf-letter/$$BASE-letter.pdf" && \
73                         groff -man -t -Tascii < "$(srcdir)/$$FILE" \
74                                 | col -bx > "$$dest/txt/$$BASE.txt"; \
75                 done; \
76         fi
77
78 # This works with GNU tar and gives cleaner package than normal 'make dist'.
79 mydist:
80         TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
81                 $(MAKE) dist-gzip