[PATCH app-xfs 2/2] doc: use fop backend to convert xml to pdf
Gaetan Nadon
memsize at videotron.ca
Fri Jan 22 10:52:52 PST 2010
On Fri, 2010-01-22 at 09:39 -0800, Dan Nicholson wrote:
> 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.
It does not seem to behave that way on my system:
AC_PATH_PROG([XMLFOP], [fop])
AS_ECHO("---->"$XMLFOP"<-----")
yields:
checking for fop... no
----><-----
Autoconf 2.63 on Debian
In config.log:
HAVE_XMLFOP_FALSE=''
HAVE_XMLFOP_TRUE='#' Means makefile code is commented out if true
In Makefile:
#am__append_1 = doc/xfs-design.pdf This target is commented out, no
pdf gets generated
Thanks
>
> > +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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.x.org/archives/xorg-devel/attachments/20100122/8b7f5b50/attachment.htm
More information about the xorg-devel
mailing list