Commit 80f1307e authored by David King's avatar David King Committed by David King

Use mm-common for reference documentation generation

* .gitignore: Update.

* Makefile.am: Remove SUBDIRS. Make examples build and documentation
build conditional. Build reference documentation with doc-reference.am
from mm-common. Add docs/manual/libxml++.pdf target, but do not enable
it by default. Add autogen.sh and docs/manual/insert_example_code.pl to
dist_noinst_SCRIPTS. Add docs/manual/html/*.html to
MAINTAINERCLEANFILES.

* autogen.sh: Add --enable-maintainer-mode to arguments passed to
configure.

* configure.ac: Add AM_MAINTAINER_MODE. Add a configure argument to
enable the build of the examples. Use mm-common macros to add a
configure argument to enable documentation, and use the glibmm
tagfile. Check for xmllint and db2latex for DTD validation of the
DocBook manual and building the PDF documentation, repectively. Remove
the last non-toplevel Makefiles from AC_CONFIG_FILES.

* docs/Makefile.am:
* docs/Makefile_web.am_fragment:
* docs/manual/Makefile.am:
* docs/reference/Makefile.am: Remove from repository, and move content
to Makefile.am.

* docs/manual/docbook-customisation.xsl: Add DocBook customisation
parameters.

* docs/manual/libxml++_without_code.xml: Make validate.

* docs/reference/Doxyfile.in: Update from mm-common.

* docs/reference/README: Remove empty file.

* examples/README: Mention the --enable-examples configure argument.
parent 276542f0
......@@ -33,9 +33,10 @@ stamp-h?
/docs/manual/html/
/docs/manual/libxml++.xml
/docs/reference/Doxyfile
/docs/reference/doxygen.log
/docs/reference/html/
/docs/reference/libxml++_doxygen_tags
/docs/reference/xml/
/docs/reference/libxml++-2.6.devhelp2
/docs/reference/libxml++-2.6.tag
# examples
/examples/dom_build/dom_build
......
2010-03-29 David King <davidk@openismus.com>
Use mm-common for reference documentation generation
* .gitignore: Update.
* Makefile.am: Remove SUBDIRS. Make examples build and documentation
build conditional. Build reference documentation with doc-reference.am
from mm-common. Add docs/manual/libxml++.pdf target, but do not enable
it by default. Add autogen.sh and docs/manual/insert_example_code.pl to
dist_noinst_SCRIPTS. Add docs/manual/html/*.html to
MAINTAINERCLEANFILES.
* autogen.sh: Add --enable-maintainer-mode to arguments passed to
configure.
* configure.ac: Add AM_MAINTAINER_MODE. Add a configure argument to
enable the build of the examples. Use mm-common macros to add a
configure argument to enable documentation, and use the glibmm
tagfile. Check for xmllint and db2latex for DTD validation of the
DocBook manual and building the PDF documentation, repectively. Remove
the last non-toplevel Makefiles from AC_CONFIG_FILES.
* docs/Makefile.am:
* docs/Makefile_web.am_fragment:
* docs/manual/Makefile.am:
* docs/reference/Makefile.am: Remove from repository, and move content
to Makefile.am.
* docs/manual/docbook-customisation.xsl: Add DocBook customisation
parameters.
* docs/manual/libxml++_without_code.xml: Make validate.
* docs/reference/Doxyfile.in: Update from mm-common.
* docs/reference/README: Remove empty file.
2010-03-27 David King <amigadave@amigadave.com>
Fix several compiler warnings
......
ACLOCAL_AMFLAGS = -I macros ${ACLOCAL_FLAGS}
DISTCHECK_CONFIGURE_FLAGS = --enable-warnings=fatal
SUBDIRS = docs
library_configdir = $(libdir)/libxml++-@LIBXMLXX_API_VERSION@/include
library_config_DATA = libxml++config.h
......@@ -15,6 +13,7 @@ libxml___libxml___@LIBXMLXX_API_VERSION@_la_LDFLAGS = \
libxml___libxml___@LIBXMLXX_API_VERSION@_la_LIBADD = $(LIBXMLXX_LIBS)
libxml___libxml___@LIBXMLXX_API_VERSION@_la_SOURCES = $(cc_sources) $(h_sources_public)
if ENABLE_EXAMPLES
noinst_PROGRAMS = examples/dom_build/dom_build \
examples/dom_parse_entities/dom_parse_entities \
examples/dom_parser/dom_parser \
......@@ -29,6 +28,7 @@ noinst_PROGRAMS = examples/dom_build/dom_build \
examples/sax_parser_entities/sax_parser_entities \
examples/schemavalidation/schemavalidation \
examples/textreader/textreader
endif
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I. $(LIBXMLXX_CFLAGS)
AM_CXXFLAGS = $(LIBXMLXX_WXXFLAGS)
......@@ -115,6 +115,7 @@ library_nodes_include_HEADERS = $(h_nodes_sources_public)
library_parsers_include_HEADERS = $(h_parsers_sources_public)
library_validators_include_HEADERS = $(h_validators_sources_public)
if ENABLE_EXAMPLES
examples_dom_build_dom_build_SOURCES = examples/dom_build/main.cc
examples_dom_parse_entities_dom_parse_entities_SOURCES = \
examples/dom_parse_entities/main.cc
......@@ -176,10 +177,51 @@ examples_schemavalidation_schemavalidation_LDADD = \
libxml++/libxml++-$(LIBXMLXX_API_VERSION).la
examples_textreader_textreader_LDADD = \
libxml++/libxml++-$(LIBXMLXX_API_VERSION).la
endif # ENABLE_EXAMPLES
if ENABLE_DOCUMENTATION
book_name = $(LIBXMLXX_MODULE_NAME)
doc_input = $(h_sources_public)
doc_outdir = docs/reference
# Sets dist_noinst_DATA, DISTCLEANFILES and MAINTAINERCLEANFILES
include $(top_srcdir)/macros/doc-reference.am
manualdir = $(docdir)/manual
manual_htmldir = $(manualdir)/html
manual_html_files = $(wildcard docs/manual/html/*.html)
docs/manual/libxml++.xml: docs/manual/libxml++_without_code.xml docs/manual/insert_example_code.pl
$(AM_V_GEN)$(PERL) -- docs/manual/insert_example_code.pl examples $< >$@
docs/manual/html/index.html: docs/manual/libxml++.xml docs/manual/docbook-customisation.xsl
$(AM_V_at)rm -fr doc/manual/html
$(AM_V_at)$(MKDIR_P) docs/manual/html
$(AM_V_GEN)$(XSLTPROC) -o docs/manual/html/ --xinclude --catalogs \
docs/manual/docbook-customisation.xsl $<
docs/manual/libxml++.pdf: docs/manual/libxml++.xml
$(AM_V_GEN)$(DB2LATEX) -o $@ -O docs/manual -tpdf $<
dist_noinst_DATA = libxml++config.h.in \
validate_original_manual: docs/manual/libxml++_without_code.xml
$(XMLLINT) --xinclude --postvalid --noout $<
validate_manual: docs/manual/libxml++.xml
$(XMLLINT) --xinclude --postvalid --noout $<
all-local: docs/manual/html/index.html
else # !ENABLE_DOCUMENTATION
dist_noinst_DATA =
DISTCLEANFILES =
MAINTAINERCLEANFILES =
endif # ENABLE_DOCUMENTATION
dist_noinst_DATA += libxml++config.h.in \
libxml++-$(LIBXMLXX_API_VERSION).pc.in \
MAINTAINERS \
docs/manual/docbook-customisation.xsl \
$(manual_html_files) \
docs/manual/libxml++.xml \
docs/manual/libxml++_without_code.xml \
examples/README \
examples/dom_parser/example.xml \
examples/dom_parser/example_with_namespace.xml \
......@@ -249,5 +291,10 @@ dist_noinst_DATA = libxml++config.h.in \
MSVC_Net2008/examples/schemavalidation/schemavalidation.vcproj \
MSVC_Net2008/examples/textreader/textreader.vcproj
DISTCLEANFILES = MSVC_Net2005/libxml++/libxml++config.h \
dist_noinst_SCRIPTS = autogen.sh \
docs/manual/insert_example_code.pl
DISTCLEANFILES += MSVC_Net2005/libxml++/libxml++config.h \
MSVC_Net2008/libxml++/libxml++config.h
MAINTAINERCLEANFILES += docs/manual/html/*.html
......@@ -4,4 +4,4 @@ test -n "$srcdir" || srcdir=.
mm-common-prepare --copy --force "$srcdir"
autoreconf --force --install --verbose "$srcdir"
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
test -n "$NOCONFIGURE" || "$srcdir/configure" --enable-maintainer-mode "$@"
......@@ -10,6 +10,7 @@ AC_CONFIG_HEADERS([config.h libxml++config.h])
AM_INIT_AUTOMAKE([1.9 -Wno-portability dist-bzip2 no-define nostdinc subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
AM_MAINTAINER_MODE([enable])
AC_ARG_VAR([ACLOCAL_FLAGS], [aclocal flags, e.g. -I <macro dir>])
MM_PREREQ([0.8])
......@@ -27,28 +28,35 @@ PKG_CHECK_MODULES([LIBXMLXX], [libxml-2.0 >= 2.6.1 glibmm-2.4 >= 2.4.0])
AC_LANG([C++])
AC_CHECK_HEADERS([string list map], [], [AC_MSG_ERROR([required headers not found])])
AC_ARG_ENABLE([examples],
[AS_HELP_STRING([--enable-examples],
[build the examples])],
[enable_examples=$enableval],
[enable_examples=no])
AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = xyes])
# Offer the ability to omit some API from the library, to reduce the code size:
LIBXMLCPP_ARG_ENABLE_API_EXCEPTIONS()
LIBXMLCPP_ARG_ENABLE_API_EXCEPTIONS
MM_ARG_ENABLE_DOCUMENTATION
MM_ARG_WITH_TAGFILE_DOC([glibmm-2.4.tag], [glibmm-2.4])
MM_ARG_ENABLE_WARNINGS([LIBXMLXX_WXXFLAGS],
[-Wall],
[-pedantic -Wall -Wextra])
AC_PATH_PROG([XMLLINT], [xmllint], [xmllint])
AC_ARG_VAR([XMLLINT], [path to xmllint utility])
AC_PATH_PROGS([DB2LATEX], [db2latex docbook2latex], [db2latex])
AC_ARG_VAR([DB2LATEX], [path to db2latex utility])
MM_CHECK_PERL()
AC_CONFIG_FILES([
Makefile
docs/Makefile
docs/reference/Makefile
docs/reference/Doxyfile
docs/manual/Makefile
MSVC_Net2005/libxml++/libxml++.rc
MSVC_Net2008/libxml++/libxml++.rc
libxml++-2.6.pc
])
AC_CONFIG_FILES([Makefile
docs/reference/Doxyfile
MSVC_Net2005/libxml++/libxml++.rc
MSVC_Net2008/libxml++/libxml++.rc
libxml++-2.6.pc])
AC_CONFIG_COMMANDS([MSVC_Net2005/libxml++/libxml++config.h],
[cp -f libxml++config.h MSVC_Net2005/libxml++/libxml++config.h])
......
SUBDIRS = reference manual
EXTRA_DIST = Makefile_web.am_fragment
include $(top_srcdir)/docs/Makefile_web.am_fragment
html_docs = reference manual
post-html: reference/html/index.html
rsync $(rsync_args) -r index.html $$USER@shell.sourceforge.net:$(web_path_project)
rsync $(rsync_args) -r $(html_docs) $$USER@shell.sourceforge.net:$(web_path_docs)
rsync $(rsync_args) -r ../examples $$USER@shell.sourceforge.net:$(web_path_project)
web_path_project = /home/groups/l/li/libxmlplusplus/htdocs/
web_path_docs = $(web_path_project)docs/
rsync_args = -vz --rsh ssh --recursive --cvs-exclude --exclude="**1.0**" --exclude=".cvsignore" --exclude="Makefile" --exclude="Makefile.in" --exclude=".deps" --exclude=".libs"
docdir = $(datadir)/doc/libxml++-2.6/docs
EXTRA_DIST = $(docbook_docs) html libxml++.xml libxml++_without_code.xml insert_example_code.pl
# Create a DocBook source file with the code inline, instead of the special comments.
libxml++.xml: libxml++_without_code.xml insert_example_code.pl
$(PERL) insert_example_code.pl ../../examples $< >$@
docbook_docs = $(srcdir)/libxml++.xml
include $(top_srcdir)/docs/Makefile_web.am_fragment
article_upload_path = $(web_path_docs)manual
DOCBOOK_STYLESHEET ?= http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
html/index.html: $(srcdir)/libxml++.xml
-rm -rf html
$(mkinstalldirs) html
xsltproc -o html/ --catalogs $(DOCBOOK_STYLESHEET) $<
html: html/index.html
libxml++-html.tar.gz: $(srcdir)/html
tar -cf - $< | gzip > $@
%.dvi: $(srcdir)/%.xml
db2dvi $<
%.ps: $(srcdir)/%.xml
db2ps $<
%.pdf: $(srcdir)/%.xml
db2pdf $<
post-lumps: $(srcdir)/libxml++.dvi $(srcdir)/libxml++.ps $(srcdir)/libxml++.pdf $(srcdir)/libxml++-html.tar.gz
tar -cf - $^ | ssh $$SSH_OPT $$USER@libxmlplusplus.sourceforge.net "cd $(libxml++) ; tar -xvf - ; chmod a+r,g+w * ; chgrp libxmlplusplus *"
post-html: $(srcdir)/html/index.html
(cd html && tar -cf - *.html | gzip -3 | \
ssh $$SSH_OPT $$USER@libxmlplusplus.sourceforge.net "cd $(article_upload_path)/html ; gunzip | tar -xvf - ; chmod a+r,g+w * ; chgrp libxmlplusplus *")
manualdir = $(docdir)/manual/html
install-manual: $(srcdir)/html/index.html
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(manualdir)
@dir='$(<D)'; for p in $$dir/*.html ; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(manualdir)/$$f"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(manualdir)/$$f; \
done
uninstall-manual: $(srcdir)/html/index.html
@$(NORMAL_UNINSTALL)
@dir='$(<D)'; for p in $$dir/*.html ; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(manualdir)/$$f"; \
rm -f $(DESTDIR)$(manualdir)/$$f; \
done
install-data-local: install-manual
uninstall-local: uninstall-manual
all-local: $(srcdir)/html/index.html
maintainer-clean-local:
-rm -rf $(srcdir)/html
-rm -f $(srcdir)/libxml++.dvi $(srcdir)/libxml++.ps $(srcdir)/libxml++.pdf $(srcdir)/libxml++-html.tar.gz
<?xml version="1.0"?>
<!-- Customisation of DocBook processing for libxml++. -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
<xsl:param name="toc.section.depth" select="1"/>
<xsl:param name="chunker.output.indent" select="'yes'"/>
<xsl:param name="chunker.output.encoding" select="'UTF-8'"/>
<xsl:param name="toc.list.type" select="'ul'"/>
<!-- Set the use.id.as.filename param so that the chapter / section number is
not used as the filename, otherwise the URL will change every time
anything is re-ordered or inserted in the documentation. -->
<xsl:param name="use.id.as.filename" select="1"/>
</xsl:stylesheet>
This diff is collapsed.
This diff is collapsed.
doxygen_configfile = Doxyfile
doxygen_configfile_source = $(srcdir)/Doxyfile.in
include $(top_srcdir)/docs/Makefile_web.am_fragment
web_path_reference = $(web_path_docs)reference
EXTRA_DIST = README Doxyfile libxml++_doxygen_tags html \
libstdc++.tag.xml
#Ideally, libstdc++.tag.xml would be installed by gcc, instead of being copied into every project.
index_html = html/index.html
$(index_html): $(doxygen_configfile_source)
doxygen $(doxygen_configfile)
html: $(index_html)
libxml++_doxygen_tags: $(index_html)
libxml++-reference-html.tar.gz: $(index_html)
tar cf - html | gzip -c --best >$@
# Upload to the web site:
post-html:
rsync -avz --rsh ssh --cvs-exclude * $$USER@shell.sourceforge.net:$(web_path_reference)
all-local: $(index_html)
doc-clean:
-rm -rf html
-rm -f libxml++_doxygen_tags
-rm -f $libxml++-reference-html.tar.gz
referencedir = $(docdir)/reference/html
install-reference: $(index_html)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(referencedir)
@dir='$(<D)'; for p in $$dir/*.html $$dir/*.css $$dir/*.png $$dir/*.jpg $$dir/*.map $$dir/*.md5 $$dir/*.dot ; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(referencedir)/$$f"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(referencedir)/$$f; \
done
uninstall-reference: $(index_html)
@$(NORMAL_UNINSTALL)
@dir='$(<D)'; for p in $$dir/*.html $$dir/*.css $$dir/*.png $$dir/*.jpg $$dir/*.map $$dir/*.md5 $$dir/*.dot ; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(referencedir)/$$f"; \
rm -f $(DESTDIR)$(referencedir)/$$f; \
done
install-data-local: install-reference
uninstall-local: uninstall-reference
maintainer-clean-local: doc-clean
Examples:
Examples: Enable building with the --enable-examples argument to configure
Simple parsing examples:
dom_parser - Shows how to parse an XML Document with the DOM parser.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment