diff options
author | Matthias Clasen <maclas@gmx.de> | 2003-06-17 00:37:28 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2003-06-17 00:37:28 +0000 |
commit | fcffe5a1abb031909e85a8b5b2f1adbe587389ed (patch) | |
tree | b86fa96d53bddea9393af8d416f3d01a4a9b0b56 /acinclude.m4 | |
parent | 5e4a3fbab16b7b71f4966a7e16ca8213e70a8340 (diff) | |
download | gtk+-fcffe5a1abb031909e85a8b5b2f1adbe587389ed.tar.gz |
Add rule to regenerate man pages from Docbook. (man_MANS): Add
2003-06-17 Matthias Clasen <maclas@gmx.de>
* gdk-pixbuf/Makefile.am: Add rule to regenerate man pages from
Docbook.
(man_MANS): Add gdk-pixbuf-csource.1, gdk-pixbuf-query-loaders.1.
(content_files): Add gdk-pixbuf-csource.xml,
gdk-pixbuf-query-loaders.xml.
* gdk-pixbuf/gdk-pixbuf-csource.xml: New refentry, containing the
former gdk-pixbuf/gdk-pixbuf-csource.1, converted to Docbook.
* gdk-pixbuf/gdk-pixbuf-query-loaders.xml: New refentry.
* gdk-pixbuf/gdk-pixbuf-csource.1:
* gdk-pixbuf/gdk-pixbuf-query-loaders.1: Man pages generated from
the .xml sources.
* gdk-pixbuf/gdk-pixbuf.sgml: Include gdk-pixbuf-csource.xml and
gdk-pixbuf-query-loaders.xml.
* gtk/Makefile.am: Add rule to regenerate man pages from Docbook.
(man_MANS): Add gtk-query-immodules-2.0.1
(content_files): Add gtk-query-immodules-2.0.xml
* gtk/gtk-query-immodules-2.0.xml: New refentry.
* gtk/gtk-query-immodules-2.0.1: Man page generated from the .xml
source.
* gtk/gtk-docs.sgml: Include gtk-query-immodules-2.0.xml.
* acinclude.m4 (JH_PATH_XML_CATALOG, JH_CHECK_XML_CATALOG): New
macros to check for XML catalog contents and path, borrowed from
gtk-doc.
* configure.in: New option --enable-man to enable regeneration of
man pages from Docbook, if the necessary tools are found.
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 664a989fc7..ed6e888994 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -10,3 +10,50 @@ AC_DEFUN([GLIB_AC_DIVERT_BEFORE_HELP], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl $1 AC_DIVERT_POP()])])]) + +# Checks the location of the XML Catalog +# Usage: +# JH_PATH_XML_CATALOG +# Defines XMLCATALOG and XML_CATALOG_FILE substitutions +AC_DEFUN([JH_PATH_XML_CATALOG], +[ + # check for the presence of the XML catalog + AC_ARG_WITH([xml-catalog], + AC_HELP_STRING([--with-xml-catalog=CATALOG], + [path to xml catalog to use]),, + [with_xml_catalog=/etc/xml/catalog]) + XML_CATALOG_FILE="$with_xml_catalog" + AC_MSG_CHECKING([for XML catalog ($XML_CATALOG_FILE)]) + if test -f "$XML_CATALOG_FILE"; then + AC_MSG_RESULT([found]) + else + AC_MSG_RESULT([not found]) + AC_MSG_ERROR([XML catalog not found]) + fi + AC_SUBST([XML_CATALOG_FILE]) + + # check for the xmlcatalog program + AC_PATH_PROG(XMLCATALOG, xmlcatalog, no) + if test "x$XMLCATALOG" = xno; then + AC_MSG_ERROR([could not find xmlcatalog program]) + fi +]) + +# Checks if a particular URI appears in the XML catalog +# Usage: +# JH_CHECK_XML_CATALOG(URI, [FRIENDLY-NAME], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +AC_DEFUN([JH_CHECK_XML_CATALOG], +[ + AC_REQUIRE([JH_PATH_XML_CATALOG])dnl + AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog]) + if AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then + AC_MSG_RESULT([found]) + ifelse([$3],,,[$3 +])dnl + else + AC_MSG_RESULT([not found]) + ifelse([$4],, + [AC_MSG_ERROR([could not find ifelse([$2],,[$1],[$2]) in XML catalog])], + [$4]) + fi +]) |