xz: Fix return value type in io_write_buf().
[xz/debian.git] / Makefile.am
blob42b73fd461d76dcce76e111e9668f45a18fab573
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 ##
8 # Use -n to prevent gzip from adding a timestamp to the .gz headers.
9 GZIP_ENV = -9n
11 DIST_SUBDIRS = lib src po tests debug
12 SUBDIRS =
14 if COND_GNULIB
15 SUBDIRS += lib
16 endif
18 SUBDIRS += src po tests
20 dist_doc_DATA = \
21         AUTHORS \
22         COPYING \
23         COPYING.GPLv2 \
24         NEWS \
25         README \
26         THANKS \
27         TODO \
28         doc/faq.txt \
29         doc/history.txt \
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 \
39         doc/examples/Makefile
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
46 EXTRA_DIST = \
47         extra \
48         dos \
49         windows \
50         macosx \
51         autogen.sh \
52         Doxyfile.in \
53         COPYING.GPLv2 \
54         COPYING.GPLv3 \
55         COPYING.LGPLv2.1 \
56         INSTALL.generic \
57         PACKAGERS \
58         build-aux/manconv.sh \
59         build-aux/version.sh
61 ACLOCAL_AMFLAGS = -I m4
63 # List of man pages to conver to PDF and plain text in the dist-hook target.
64 manfiles = \
65         src/xz/xz.1 \
66         src/xzdec/xzdec.1 \
67         src/lzmainfo/lzmainfo.1 \
68         src/scripts/xzdiff.1 \
69         src/scripts/xzgrep.1 \
70         src/scripts/xzless.1 \
71         src/scripts/xzmore.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.
75 dist-hook:
76         if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
77                 ( cd "$(srcdir)" && git log --date=iso --stat ) \
78                         > "$(distdir)/ChangeLog"; \
79         fi
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"; \
94                 done; \
95         fi
97 # This works with GNU tar and gives cleaner package than normal 'make dist'.
98 mydist:
99         sh "$(srcdir)/src/liblzma/validate_map.sh"
100         VERSION=$(VERSION); \
101         if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
102                 SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
103                 test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
104         fi; \
105         TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
106                 $(MAKE) VERSION="$$VERSION" dist-gzip