liblzma: Omit CRC tables when not needed with ARM64 optimizations.
[xz.git] / Makefile.am
blob310846e230fe714c8d07241dd1d5f5be00036766
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 if COND_DOC
21 dist_doc_DATA = \
22         AUTHORS \
23         COPYING \
24         COPYING.GPLv2 \
25         NEWS \
26         README \
27         THANKS \
28         TODO \
29         doc/faq.txt \
30         doc/history.txt \
31         doc/xz-file-format.txt \
32         doc/lzma-file-format.txt
34 examplesdir = $(docdir)/examples
35 dist_examples_DATA = \
36         doc/examples/00_README.txt \
37         doc/examples/01_compress_easy.c \
38         doc/examples/02_decompress.c \
39         doc/examples/03_compress_custom.c \
40         doc/examples/04_compress_easy_mt.c \
41         doc/examples/Makefile
43 examplesolddir = $(docdir)/examples_old
44 dist_examplesold_DATA = \
45         doc/examples_old/xz_pipe_comp.c \
46         doc/examples_old/xz_pipe_decomp.c
48 # Install the Doxygen generated documentation if they were built.
49 install-data-local:
50         if test -d "$(srcdir)/doc/api" ; then \
51                 $(MKDIR_P) "$(DESTDIR)$(docdir)/api" && \
52                 $(INSTALL_DATA) "$(srcdir)"/doc/api/* \
53                         "$(DESTDIR)$(docdir)/api"; \
54         fi
56 # Remove the Doxygen generated documentation when uninstalling.
57 uninstall-local:
58         rm -rf "$(DESTDIR)$(docdir)/api"
59 endif
61 EXTRA_DIST = \
62         po4a \
63         extra \
64         doc/xz-logo.png \
65         dos \
66         doxygen \
67         windows \
68         macosx \
69         cmake \
70         CMakeLists.txt \
71         autogen.sh \
72         COPYING.CC-BY-SA-4.0 \
73         COPYING.GPLv2 \
74         COPYING.GPLv3 \
75         COPYING.LGPLv2.1 \
76         INSTALL.generic \
77         PACKAGERS \
78         build-aux/manconv.sh \
79         build-aux/version.sh
81 ACLOCAL_AMFLAGS = -I m4
83 # List of man pages to convert to PDF and plain text in the dist-hook target.
84 manfiles = \
85         src/xz/xz.1 \
86         src/xzdec/xzdec.1 \
87         src/lzmainfo/lzmainfo.1 \
88         src/scripts/xzdiff.1 \
89         src/scripts/xzgrep.1 \
90         src/scripts/xzless.1 \
91         src/scripts/xzmore.1
93 # Create ChangeLog from output of "git log --date=iso --stat".
94 # Convert the man pages to PDF and plain text (ASCII only) formats.
95 dist-hook:
96         if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
97                 ( cd "$(srcdir)" && git log --date=iso --stat \
98                         6060f7dc76fd6c2a8a1f8e85d0e4d86bb78273e6^..HEAD ) \
99                         > "$(distdir)/ChangeLog"; \
100         fi
101         if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
102                 dest="$(distdir)/doc/man" && \
103                 $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \
104                 for FILE in $(manfiles); do \
105                         BASE=`basename $$FILE .1` && \
106                         sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \
107                                 < "$(srcdir)/$$FILE" \
108                                 > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
109                         sh "$(srcdir)/build-aux/manconv.sh" pdf letter \
110                                 < "$(srcdir)/$$FILE" \
111                                 > "$$dest/pdf-letter/$$BASE-letter.pdf" && \
112                         sh "$(srcdir)/build-aux/manconv.sh" ascii \
113                                 < "$(srcdir)/$$FILE" \
114                                 > "$$dest/txt/$$BASE.txt"; \
115                 done; \
116         fi
117         if test -d "$(srcdir)/doc/api" ; then \
118                 $(MKDIR_P) "$(distdir)/doc/api" && \
119                 $(INSTALL_DATA) "$(srcdir)"/doc/api/* \
120                         "$(distdir)/doc/api"; \
121         fi
123 # This works with GNU tar and gives cleaner package than normal 'make dist'.
124 # This also ensures that the man page translations are up to date (dist-hook
125 # would be too late for that).
126 mydist:
127         sh "$(srcdir)/src/liblzma/validate_map.sh"
128         cd "$(srcdir)/po4a" && sh update-po
129         cd "$(srcdir)/doxygen" && sh update-doxygen
130         VERSION=$(VERSION); \
131         if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
132                 SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
133                 test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
134         fi; \
135         TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
136                 $(MAKE) VERSION="$$VERSION" dist-gzip