1
0
mirror of https://github.com/GNOME/libxml2.git synced 2025-05-08 21:07:54 +08:00
libxml2/doc/Makefile.am
Nick Wellnhofer bbe5827c94 doc: Build docs with Doxygen and xsltproc
Build the documentation as part of the build process with support for
all build systems. This adds a new configuration option --with-docs to
build documentation. Required tools are Doxygen, xsltproc and the
DocBook 4 XSLT stylesheets. Doxygen will also be required to build the
Python bindings.
2025-05-02 13:33:34 +02:00

54 lines
1.2 KiB
Makefile

## Process this file with automake to produce Makefile.in
EXTRA_DIST = \
libxml2-api.xml \
xmlcatalog.xml \
xmllint.xml \
meson.build
all-local: html.stamp
html.stamp: $(top_srcdir)/Doxyfile
SOURCE_ROOT=$(top_srcdir)/ BUILD_ROOT=$(top_builddir)/ \
$(DOXYGEN) -q $<
@touch $@
CLEANFILES = html.stamp
clean-local:
rm -rf html xml
if WITH_DOCS
man_MANS = xml2-config.1 xmllint.1
doc_DATA = xmllint.html
CLEANFILES += xmllint.1 xmllint.html
if WITH_CATALOG_SOURCES
if WITH_OUTPUT_SOURCES
man_MANS += xmlcatalog.1
doc_DATA += xmlcatalog.html
CLEANFILES += xmlcatalog.1 xmlcatalog.html
endif
endif
DOCBOOK_MAN = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
DOCBOOK_HTML = http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
.xml.1:
$(XSLTPROC) --nonet --novalid --param man.output.quietly 1 \
-o $@ $(DOCBOOK_MAN) $<
.xml.html:
$(XSLTPROC) --nonet --novalid -o $@ $(DOCBOOK_HTML) $<
install-data-local:
$(MKDIR_P) $(DESTDIR)$(docdir)/html/search
find html -type f -exec $(INSTALL_DATA) {} $(DESTDIR)$(docdir)/html \;
find html/search -type f -exec $(INSTALL_DATA) {} $(DESTDIR)$(docdir)/html/search \;
uninstall-local:
-rm -rf $(DESTDIR)$(docdir)/html
endif