summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2023-03-16 21:34:36 +0800
committerJia Tan <jiat0218@gmail.com>2023-03-17 01:42:28 +0800
commitb1216a7772952d2fe7fe9c6acfcbd98d30abbc7b (patch)
tree31d62a0d121388a4fa2f5ee3a88076b0cd723466
parentc97d12f300b2a94c9f54a44c8931c8bc08cf0a73 (diff)
downloadxz-b1216a7772952d2fe7fe9c6acfcbd98d30abbc7b.tar.gz
Build: Install Doxygen docs and include in distribution if generated.
Added a install-data-local target to install the Doxygen documentation only when it has been generated. In order to correctly remove the docs, a corresponding uninstall-local target was added. If the doxygen docs exist in the source tree, they will also be included in the distribution now too.
-rw-r--r--Makefile.am18
1 files changed, 18 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 1756e5c..0df658f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -44,12 +44,25 @@ examplesolddir = $(docdir)/examples_old
dist_examplesold_DATA = \
doc/examples_old/xz_pipe_comp.c \
doc/examples_old/xz_pipe_decomp.c
+
+# Install the Doxygen generated documentation if they were built.
+install-data-local:
+ if test -d "$(srcdir)/doc/liblzma" ; then \
+ $(MKDIR_P) "$(DESTDIR)$(docdir)/liblzma" && \
+ $(INSTALL_DATA) "$(srcdir)"/doc/liblzma/* \
+ "$(DESTDIR)$(docdir)/liblzma"; \
+ fi
+
+# Remove the Doxygen generated documentation when uninstalling.
+uninstall-local:
+ rm -rf "$(DESTDIR)$(docdir)/liblzma"
endif
EXTRA_DIST = \
po4a \
extra \
dos \
+ doxygen \
windows \
macosx \
cmake \
@@ -99,6 +112,11 @@ dist-hook:
> "$$dest/txt/$$BASE.txt"; \
done; \
fi
+ if test -d "$(srcdir)/doc/liblzma" ; then \
+ $(MKDIR_P) "$(distdir)/doc/liblzma" && \
+ $(INSTALL_DATA) "$(srcdir)"/doc/liblzma/* \
+ "$(distdir)/doc/liblzma"; \
+ fi
# This works with GNU tar and gives cleaner package than normal 'make dist'.
# This also ensures that the man page translations are up to date (dist-hook