-
Notifications
You must be signed in to change notification settings - Fork 122
/
Makefile.am
122 lines (110 loc) · 3.13 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
## SPDX-License-Identifier: 0BSD
## Author: Lasse Collin
# Use -n to prevent gzip from adding a timestamp to the .gz headers.
GZIP_ENV = -9n
DIST_SUBDIRS = lib src po tests debug
SUBDIRS =
if COND_GNULIB
SUBDIRS += lib
endif
SUBDIRS += src po tests
if COND_DOC
dist_doc_DATA = \
AUTHORS \
COPYING \
COPYING.0BSD \
COPYING.GPLv2 \
NEWS \
README \
THANKS \
doc/faq.txt \
doc/history.txt \
doc/xz-file-format.txt \
doc/lzma-file-format.txt
examplesdir = $(docdir)/examples
dist_examples_DATA = \
doc/examples/00_README.txt \
doc/examples/01_compress_easy.c \
doc/examples/02_decompress.c \
doc/examples/03_compress_custom.c \
doc/examples/04_compress_easy_mt.c \
doc/examples/11_file_info.c \
doc/examples/Makefile
endif
EXTRA_DIST = \
cmake \
dos \
doxygen \
extra \
po4a \
windows \
CMakeLists.txt \
COPYING.GPLv2 \
COPYING.GPLv3 \
COPYING.LGPLv2.1 \
INSTALL.generic \
PACKAGERS \
TODO \
autogen.sh \
build-aux/license-check.sh \
build-aux/manconv.sh \
build-aux/version.sh \
po/xz.pot-header
ACLOCAL_AMFLAGS = -I m4
# 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/lzmainfo/lzmainfo.1 \
src/scripts/xzdiff.1 \
src/scripts/xzgrep.1 \
src/scripts/xzless.1 \
src/scripts/xzmore.1
# Create ChangeLog from output of "git log --date=iso --stat".
# 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; then \
dest="$(distdir)/doc/man" && \
$(MKDIR_P) "$$dest/txt" && \
for FILE in $(manfiles); do \
BASE=`basename $$FILE .1` && \
$(SHELL) "$(srcdir)/build-aux/manconv.sh" ascii \
< "$(srcdir)/$$FILE" \
> "$$dest/txt/$$BASE.txt"; \
done; \
fi
cd "$(distdir)" && $(SHELL) "build-aux/license-check.sh"
# This works with GNU tar and gives cleaner package than normal 'make dist'.
# This also ensures that the translations are up to date (dist-hook
# would be too late for that).
mydist:
$(SHELL) "$(srcdir)/src/liblzma/validate_map.sh"
cd po && $(MAKE) xz.pot-update
cd "$(srcdir)/po4a" && $(SHELL) update-po
VERSION=$(VERSION); \
if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
$(SHELL) "$(srcdir)/build-aux/license-check.sh" || exit 1; \
SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
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` && \
$(SHELL) "$(srcdir)/build-aux/manconv.sh" pdf a4 \
< "$(srcdir)/$$FILE" \
> "$$dest/pdf-a4/$$BASE-a4.pdf" && \
$(SHELL) "$(srcdir)/build-aux/manconv.sh" pdf letter \
< "$(srcdir)/$$FILE" \
> "$$dest/pdf-letter/$$BASE-letter.pdf"; \
done