From 561744a3cc6934047981f1aba2f539c92fe25f88 Mon Sep 17 00:00:00 2001 From: mmdolze Date: Wed, 19 Jan 2011 19:04:54 +0000 Subject: [PATCH] Check for xmlto using configure and use that when creating the user and developer guides. Add some convenience targets to help creating documentation releases. --- configure.in | 3 ++- docs/lcdproc-dev/Makefile.am | 19 +++++++++++++++---- docs/lcdproc-user/Makefile.am | 19 +++++++++++++++---- 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/configure.in b/configure.in index c70876e..aa932a4 100644 --- a/configure.in +++ b/configure.in @@ -73,6 +73,7 @@ AC_PROG_CPP AC_PROG_INSTALL AC_PROG_RANLIB AM_PROG_CC_C_O +AC_PATH_PROG([XMLTO], [xmlto], [no]) dnl Avoid unused static function warnings CFLAGS="-Wall $CFLAGS" @@ -303,7 +304,7 @@ AC_ARG_ENABLE(libhid, fi ], [ enable_libhid=yes ] ) -AC_MSG_RESULT($enable_libhid) +AC_MSG_RESULT($enable_libhid) if test "$enable_libhid" = "yes"; then ifdef([PKG_CHECK_MODULES], diff --git a/docs/lcdproc-dev/Makefile.am b/docs/lcdproc-dev/Makefile.am index 37d1aa8..477a5c5 100644 --- a/docs/lcdproc-dev/Makefile.am +++ b/docs/lcdproc-dev/Makefile.am @@ -16,15 +16,26 @@ EXTRA_DIST = add-your-driver.docbook \ ## convenience targets -xmlto ?= /usr/bin/xmlto developerguidedir ?= $(DESTDIR)$(htmldir)/developer-guide/ +docreleasedir = lcdproc-$(PACKAGE_VERSION)-dev-html -.PHONY: install-html-developerguide +.PHONY: install-html-developerguide doc-release doc-online -install-html-developerguide: $(xmlto) lcdproc-dev.docbook lcdproc-dev.css +install-html-developerguide: lcdproc-dev.docbook lcdproc-dev.css $(mkinstalldirs) $(developerguidedir) - $(xmlto) html -o $(developerguidedir) \ + $(XMLTO) html -o $(developerguidedir) \ --stringparam html.stylesheet=lcdproc-dev.css lcdproc-dev.docbook cp lcdproc-dev.css $(developerguidedir) +doc-release: lcdproc-dev.docbook lcdproc-dev.css + $(XMLTO) html -o $(docreleasedir) \ + --stringparam html.stylesheet=lcdproc-dev.css lcdproc-dev.docbook + cp lcdproc-dev.css $(docreleasedir) + $(AMTAR) -czf $(docreleasedir).tar.gz $(docreleasedir) + +doc-online: lcdproc-dev.docbook + $(XMLTO) html-nochunks \ + --stringparam html.stylesheet=lcdproc-dev.css lcdproc-dev.docbook && \ + mv lcdproc-dev.html current-dev.html + ## EOF diff --git a/docs/lcdproc-user/Makefile.am b/docs/lcdproc-user/Makefile.am index 79ff064..c4f7345 100644 --- a/docs/lcdproc-user/Makefile.am +++ b/docs/lcdproc-user/Makefile.am @@ -18,15 +18,26 @@ EXTRA_DIST = bookinfo.docbook \ ## convenience targets -xmlto ?= /usr/bin/xmlto userguidedir ?= $(DESTDIR)$(htmldir)/user-guide/ +docreleasedir = lcdproc-$(PACKAGE_VERSION)-user-html -.PHONY: install-html-userguide +.PHONY: install-html-userguide doc-release doc-online -install-html-userguide: $(xmlto) lcdproc-user.docbook lcdproc-user.css +install-html-userguide: lcdproc-user.docbook lcdproc-user.css $(mkinstalldirs) $(userguidedir) - $(xmlto) html -o $(userguidedir) \ + $(XMLTO) html -o $(userguidedir) \ --stringparam html.stylesheet=lcdproc-user.css lcdproc-user.docbook cp lcdproc-user.css $(userguidedir) +doc-release: lcdproc-user.docbook lcdproc-user.css + $(XMLTO) html -o $(docreleasedir) \ + --stringparam html.stylesheet=lcdproc-user.css lcdproc-user.docbook + cp lcdproc-user.css $(docreleasedir) + $(AMTAR) -czf $(docreleasedir).tar.gz $(docreleasedir) + +doc-online: lcdproc-user.docbook + $(XMLTO) html-nochunks \ + --stringparam html.stylesheet=lcdproc-user.css lcdproc-user.docbook && \ + mv lcdproc-user.html current-user.html + ## EOF