Skip to content

Commit

Permalink
doc: use new macros to control doc generation
Browse files Browse the repository at this point in the history
Namely XORG_WITH_FOP for the fop backend (pdf) and
XORG_ENABLE_DEVEL_DOCS for the generation of all docs

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
  • Loading branch information
memsize committed Feb 5, 2010
1 parent 360f103 commit a76488f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
11 changes: 7 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ dist-hook: ChangeLog INSTALL
# Developer documentation - not installed on system
EXTRA_DIST += doc/fontlib.xml doc/fontlib.xsl doc/fontlib.css

if MAKE_DEVEL_DOCS
if ENABLE_DEVEL_DOCS
if HAVE_XMLTO
noinst_DATA = doc/fontlib.txt doc/fontlib.html $(srcdir)/doc/fontlib.css
if HAVE_FOP
noinst_DATA += doc/fontlib.pdf doc/fontlib.ps
endif
CLEANFILES = doc/fontlib.txt doc/fontlib.html doc/fontlib.pdf doc/fontlib.ps

doc/fontlib.txt: $(srcdir)/doc/fontlib.xml $(srcdir)/doc/fontlib.xsl
Expand All @@ -71,9 +74,9 @@ doc/fontlib.html: $(srcdir)/doc/fontlib.xml $(srcdir)/doc/fontlib.xsl
$(AM_V_GEN)$(XMLTO) -m $(srcdir)/doc/fontlib.xsl -o doc xhtml-nochunks $(srcdir)/doc/fontlib.xml

doc/fontlib.pdf: $(srcdir)/doc/fontlib.xml $(srcdir)/doc/fontlib.xsl
$(AM_V_GEN)$(XMLTO) -m $(srcdir)/doc/fontlib.xsl -o doc pdf $(srcdir)/doc/fontlib.xml
$(AM_V_GEN)$(XMLTO) --with-fop -m $(srcdir)/doc/fontlib.xsl -o doc pdf $(srcdir)/doc/fontlib.xml

doc/fontlib.ps: $(srcdir)/doc/fontlib.xml $(srcdir)/doc/fontlib.xsl
$(AM_V_GEN)$(XMLTO) -m $(srcdir)/doc/fontlib.xsl -o doc ps $(srcdir)/doc/fontlib.xml
$(AM_V_GEN)$(XMLTO) --with-fop -m $(srcdir)/doc/fontlib.xsl -o doc ps $(srcdir)/doc/fontlib.xml
endif HAVE_XMLTO
endif MAKE_DEVEL_DOCS
endif ENABLE_DEVEL_DOCS
13 changes: 4 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ AM_MAINTAINER_MODE

# Require xorg-macros: XORG_DEFAULT_OPTIONS
m4_ifndef([XORG_MACROS_VERSION],
[m4_fatal([must install xorg-macros 1.5 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.5)
[m4_fatal([must install xorg-macros 1.6 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.6)
XORG_DEFAULT_OPTIONS
XORG_ENABLE_DEVEL_DOCS
XORG_WITH_XMLTO
XORG_WITH_FOP

# Check for progs
AC_PROG_CC
Expand All @@ -51,13 +53,6 @@ dnl If the first PKG_CHECK_MODULES appears inside a conditional, pkg-config
dnl must first be located explicitly.
PKG_PROG_PKG_CONFIG

# Option to enable support for building developer internals docs
AC_ARG_ENABLE(devel-docs,
AS_HELP_STRING([--enable-devel-docs],
[Build internals documentation for developers (default: enabled)]),
[DEVEL_DOCS=$enableval], [DEVEL_DOCS=yes])
AM_CONDITIONAL([MAKE_DEVEL_DOCS], [test "x$DEVEL_DOCS" = "xyes"])

# Look for headers
AC_CHECK_HEADERS([endian.h poll.h sys/poll.h])
AC_CHECK_FUNCS([poll])
Expand Down

0 comments on commit a76488f

Please # to comment.