[PATCH app-xfs 2/2] doc: use fop backend to convert xml to pdf

Dan Nicholson dbn.lists at gmail.com
Fri Jan 22 09:39:59 PST 2010


On Fri, Jan 22, 2010 at 6:34 AM, Gaetan Nadon <memsize at videotron.ca> wrote:
> The default is passiveTex which does not work.
> Add XMLFOP and HAVE_XMLFOP to skip pdf if fop is missing.
>
> Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
> ---
>  Makefile.am  |    7 +++++--
>  configure.ac |    9 +++++++++
>  2 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index fe4639c..41abd05 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -175,7 +175,10 @@ EXTRA_DIST += doc/xfs-design.xml doc/xfs-design.css doc/xfs-design.xsl
>
>  if MAKE_DEVEL_DOCS
>  if HAVE_XMLTO
> -noinst_DATA = doc/xfs-design/index.html doc/xfs-design.pdf doc/xfs-design.txt
> +noinst_DATA = doc/xfs-design/index.html doc/xfs-design.txt
> +if HAVE_XMLFOP
> +noinst_DATA += doc/xfs-design.pdf
> +endif HAVE_XMLFOP
>  CLEANFILES += $(noinst_DATA)
>
>  doc/xfs-design/index.html: $(srcdir)/doc/xfs-design.xml $(srcdir)/doc/xfs-design.xsl doc/xfs-design/xfs-design.css
> @@ -190,7 +193,7 @@ clean-local:
>        -rm -rf doc/xfs-design
>
>  doc/xfs-design.pdf: $(srcdir)/doc/xfs-design.xml $(srcdir)/doc/xfs-design.xsl
> -       $(AM_V_GEN)$(XMLTO) -m $(srcdir)/doc/xfs-design.xsl -o doc pdf $(srcdir)/doc/xfs-design.xml
> +       $(AM_V_GEN)$(XMLTO) --with-fop -m $(srcdir)/doc/xfs-design.xsl -o doc pdf $(srcdir)/doc/xfs-design.xml
>
>  doc/xfs-design.txt: $(srcdir)/doc/xfs-design.xml $(srcdir)/doc/xfs-design.xsl
>        $(AM_V_GEN)$(XMLTO) -m $(srcdir)/doc/xfs-design.xsl -o doc txt $(srcdir)/doc/xfs-design.xml
> diff --git a/configure.ac b/configure.ac
> index b429ed5..85bcac6 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -95,6 +95,15 @@ AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [
>                                 [ FONTPATH="${DEFAULT_FONT_PATH}" ])
>  AC_SUBST([FONTPATH])
>
> +AC_PATH_PROG([XMLFOP], [fop])
> +if test "x$XMLFOP" = "x"; then
> +   AC_MSG_WARN([fop not found - pdf documentation targets will be skipped])
> +   have_xmlfop=no

Actually, AC_PATH_PROG will make the variable XMLFOP="no" when fop is
not found, not an empty string. So, the test should be "x$XMLFOP" =
xno.

> +else
> +   have_xmlfop=yes
> +fi
> +AM_CONDITIONAL([HAVE_XMLFOP], [test "$have_xmlfop" = yes])

Other than that, it looks fine to me.

Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>


More information about the xorg-devel mailing list