]> icculus.org git repositories - icculus/xz.git/blob - Makefile.am
809197e8991d7f471704b5927d4b9bd7e32e8b5d
[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 dist_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         extra \
32         dos \
33         windows \
34         autogen.sh \
35         Doxyfile.in \
36         COPYING.GPLv2 \
37         COPYING.GPLv3 \
38         COPYING.LGPLv2.1 \
39         INSTALL.generic \
40         PACKAGERS \
41         build-aux/manconv.sh \
42         build-aux/version.sh
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/lzmainfo/lzmainfo.1 \
51         src/scripts/xzdiff.1 \
52         src/scripts/xzgrep.1 \
53         src/scripts/xzless.1 \
54         src/scripts/xzmore.1
55
56 # Create ChangeLog from output of "git log --date=iso --stat".
57 # Convert the man pages to PDF and plain text (ASCII only) formats.
58 dist-hook:
59         if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
60                 ( cd "$(srcdir)" && git log --date=iso --stat ) \
61                         > "$(distdir)/ChangeLog"; \
62         fi
63         if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
64                 dest="$(distdir)/doc/man" && \
65                 $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \
66                 for FILE in $(manfiles); do \
67                         BASE=`basename $$FILE .1` && \
68                         sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \
69                                 < "$(srcdir)/$$FILE" \
70                                 > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
71                         sh "$(srcdir)/build-aux/manconv.sh" pdf letter \
72                                 < "$(srcdir)/$$FILE" \
73                                 > "$$dest/pdf-letter/$$BASE-letter.pdf" && \
74                         sh "$(srcdir)/build-aux/manconv.sh" ascii \
75                                 < "$(srcdir)/$$FILE" \
76                                 > "$$dest/txt/$$BASE.txt"; \
77                 done; \
78         fi
79
80 # This works with GNU tar and gives cleaner package than normal 'make dist'.
81 mydist:
82         if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
83                 SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
84                 test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
85         fi; \
86         TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
87                 $(MAKE) VERSION="$$VERSION" dist-gzip