Make doc installation work and simplify doc/Makefile.am.
Don't override the default htmldir with an unquoted copy. Don't suppress `make` echoing on Doxygen commands. Ensure the tutorial is always installed even if Doxygen isn't available. Take better advantage of the automake installation infrastructure.
This commit is contained in:
parent
142fe9a6f2
commit
44a2160c95
|
@ -99,10 +99,6 @@ AC_DEFUN([AM_CHECK_DOXYGEN],
|
|||
dnl Substitution
|
||||
dnl
|
||||
AC_SUBST([DOXYGEN])
|
||||
dnl according to the autoconf doc, htmldir == docdir == ${prefix}/share/doc/${PACKAGE_NAME}
|
||||
dnl I tried to use docdir, without success
|
||||
htmldir=${prefix}/share/doc/${PACKAGE_NAME}
|
||||
AC_SUBST(htmldir)
|
||||
AM_CONDITIONAL(BUILD_DOCS, test "x$BUILD_DOCS" = "xyes")
|
||||
])
|
||||
dnl End of acinclude.m4
|
||||
|
|
|
@ -3,38 +3,29 @@ EXTRA_DIST = \
|
|||
tutorial/index.html \
|
||||
tutorial/xcb.css
|
||||
|
||||
htmlDATA_INSTALL = cp -pR
|
||||
|
||||
html_DATA = tutorial/
|
||||
|
||||
uninstall-htmlDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(html_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
|
||||
done
|
||||
rmdir "$(DESTDIR)$(htmldir)/" || true
|
||||
|
||||
if BUILD_DOCS
|
||||
|
||||
# install documentation
|
||||
|
||||
all-local: doc-build.stamp
|
||||
|
||||
# rule to remove all old created files
|
||||
doc-prepare.stamp:
|
||||
@if test -d manual/ ; then \
|
||||
rm -rf manual/; \
|
||||
fi
|
||||
|
||||
# rule to build documentation and copy necessary files
|
||||
doc-build.stamp: doc-prepare.stamp
|
||||
@cd .. && doxygen xcb.doxygen
|
||||
manual: clean-local
|
||||
cd .. && doxygen xcb.doxygen
|
||||
|
||||
# rules to clean
|
||||
clean-local:
|
||||
@rm -rf manual/
|
||||
rm -rf manual/
|
||||
|
||||
install-data-local: install-html-local
|
||||
|
||||
# rule to install the html documentation and tutorial in $(htmldir)
|
||||
install-html-local:
|
||||
@if ! test -d "$(DESTDIR)$(htmldir)"; then \
|
||||
$(mkinstalldirs) "$(DESTDIR)$(htmldir)"; \
|
||||
fi
|
||||
@cp -pr manual/ "$(DESTDIR)$(htmldir)"
|
||||
@cp -pr tutorial/ "$(DESTDIR)$(htmldir)"
|
||||
|
||||
# rule to uninstall the documentation
|
||||
uninstall-local:
|
||||
@rm -rf $(DESTDIR)$(htmldir)
|
||||
html_DATA += manual/
|
||||
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue