Hi,
This patch adds support for use of xmlto instead of xsltproc (if found).
The echoing of warning message instead of error in case the documentation
isn't built is also in. I removed GEN_DOC, and instead use directly the
xslt program name (or no when not found) in XSLTPROGRAM.
I couldn't test the ./configure without xmlto nor xsltproc (although I could
the make in the doc subdir with XSLTPROGRAM set to no).
Pat
? Makefile.common
? Makefile.cvs
? Makefile_rpm_top_dir.diff
? aclocal.m4
? autom4te.cache
? config.log
? config.status
? configure
? eagle-usb-wait_ms_kernel_version.diff
? eagle-usb.spec-sysconfdir_and_scriptlet.diff
? eagleusb-xmlto.diff
? doc/Makefile.save
? doc/Makefile_doc.diff
? doc/html
? doc/html.ref
? doc/html.xmlto
? doc/man
? doc/man.ref
? doc/manpage.links
? doc/manpage.refs
? driver/.Dsp.o.cmd
? driver/.Me.o.cmd
? driver/.Mpoa.o.cmd
? driver/.Oam.o.cmd
? driver/.Pipes.o.cmd
? driver/.Sar.o.cmd
? driver/.Sm.o.cmd
? driver/.Uni.o.cmd
? driver/.eagle-usb.ko.cmd
? driver/.eagle-usb.mod.o.cmd
? driver/.eagle-usb.o.cmd
? driver/.eu_boot_sm.o.cmd
? driver/.eu_eth.o.cmd
? driver/.eu_main.o.cmd
? driver/.eu_msg.o.cmd
? driver/.eu_utils.o.cmd
? driver/.tmp_versions
? driver/eagle-usb.ko
? driver/eagle-usb.mod.c
? driver/eu_main.c.cvs
? driver/eu_types.h.cvs
? driver/firmware/buildDSP
? driver/firmware/dsp_code_isdn.bin
? driver/firmware/dsp_code_pots.bin
? driver/user/eaglectrl
? pppoa/pppoa
? utils/eagleconnect/tmp
? utils/scripts/tmp
Index: Makefile.common.in
===================================================================
RCS file: /cvs/eagleusb/eagleusb/Makefile.common.in,v
retrieving revision 1.18
diff -u -3 -p -u -r1.18 Makefile.common.in
--- Makefile.common.in 22 Nov 2004 06:53:27 -0000 1.18
+++ Makefile.common.in 25 Nov 2004 19:07:43 -0000
@@ -42,7 +42,7 @@ [EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
Index: configure.in
===================================================================
RCS file: /cvs/eagleusb/eagleusb/configure.in,v
retrieving revision 1.43
diff -u -3 -p -u -r1.43 configure.in
--- configure.in 22 Nov 2004 06:53:27 -0000 1.43
+++ configure.in 25 Nov 2004 19:07:43 -0000
@@ -245,37 +245,41 @@ fi
# ===== check for documentation =====
AC_CHECK_FILE(doc/man/eagleconfig.8, DOC_ALREADY_HERE="yes",
DOC_ALREADY_HERE="no")
-# ===== check for xsltproc (used to generate docs) =====
-GEN_DOC="no"
+# ===== check for xsltproc/xmlto (used to generate docs) =====
+# xmlto
+AC_CHECK_PROG(XSLTPROGRAM, xmlto, xmlto,,
+ "/bin:/usr/bin:/usr/local/bin")
+if test "z${XSLTPROGRAM}" = "z"; then
# xsltproc
-AC_CHECK_PROG(XSLTPROC, xsltproc, "yes", "no", "/bin:/usr/bin:/usr/local/bin")
-if test "${XSLTPROC}" = "no" ; then
- if test "${DOC_ALREADY_HERE}" = "no" ; then
- echo -e " *** libxslt-proc package is missing, documentation
won't be build! ***"
- else
- echo -e " *** libxslt-proc package is missing, keeping
prebuild version ***"
- fi
-else
- # stylesheets
- MAN_STYLESHEET="no" ; HTML_STYLESHEET="no"
- if test -f
/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl ; then
-
MAN_STYLESHEET=/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl
- elif test -f
/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl ; then
-
MAN_STYLESHEET=/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl
- fi
- if test -f /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl ;
then
-
HTML_STYLESHEET=/usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl
- elif test -f /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl ;
then
-
HTML_STYLESHEET=/usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl
- fi
- if test "${MAN_STYLESHEET}" = "no" || test "${HTML_STYLESHEET}" = "no"
; then
+ AC_CHECK_PROG(XSLTPROGRAM, xsltproc, xsltproc, "no",
+ "/bin:/usr/bin:/usr/local/bin")
+ if test "${XSLTPROGRAM}" = "no" ; then
if test "${DOC_ALREADY_HERE}" = "no" ; then
- echo -e " *** docbook stylesheets are missing,
documentation won't be build! ***"
+ echo -e " *** xslt package is missing, documentation
won't be build! ***"
else
- echo -e " *** docbook stylesheets are missing,
keeping prebuild version ***"
+ echo -e " *** xslt package is missing, keeping
prebuild version ***"
fi
else
- GEN_DOC="yes"
+ # stylesheets
+ MAN_STYLESHEET="no" ; HTML_STYLESHEET="no"
+ if test -f
/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl ; then
+
MAN_STYLESHEET=/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl
+ elif test -f
/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl ; then
+
MAN_STYLESHEET=/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl
+ fi
+ if test -f
/usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl ; then
+
HTML_STYLESHEET=/usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl
+ elif test -f
/usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl ; then
+
HTML_STYLESHEET=/usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl
+ fi
+ if test "${MAN_STYLESHEET}" = "no" || test "${HTML_STYLESHEET}"
= "no" ; then
+ XSLTPROGRAM="no"
+ if test "${DOC_ALREADY_HERE}" = "no" ; then
+ echo -e " *** docbook stylesheets are
missing, documentation won't be build! ***"
+ else
+ echo -e " *** docbook stylesheets are
missing, keeping prebuild version ***"
+ fi
+ fi
fi
fi
@@ -457,7 +461,6 @@ AC_SUBST(DISTVER)
AC_SUBST(DSPDIR)
AC_SUBST(USE_CMVS)
AC_SUBST(EU_LANG)
-AC_SUBST(GEN_DOC)
AC_SUBST(HTML_STYLESHEET)
AC_SUBST(KERNELSRC)
AC_SUBST(KERNELVER)
@@ -509,8 +512,8 @@ else
fi
echo -en "\ngenerate documentation\t\t\t\t"
-if test "${GEN_DOC}" = "no" ; then
- echo -en "${GEN_DOC}\n"
+if test "${XSLTPROGRAM}" != "no" ; then
+ echo -en "with ${XSLTPROGRAM}\n"
else
if test "${DOC_ALREADY_HERE}" = "no" ; then
echo -en "yes\n"
Index: doc/Makefile
===================================================================
RCS file: /cvs/eagleusb/eagleusb/doc/Makefile,v
retrieving revision 1.8
diff -u -3 -p -u -r1.8 Makefile
--- doc/Makefile 17 Nov 2004 21:01:56 -0000 1.8
+++ doc/Makefile 25 Nov 2004 19:07:43 -0000
@@ -12,25 +12,40 @@ HTML_PAGES := $(addprefix html/, ${SOURC
#HTML_PAGES :=
#endif # GEN_DOC = yes
-.PHONY: all
all: man
-
-.PHONY: man
man: ${MAN_PAGES}
+html: ${HTML_PAGES}
+
${MAN_PAGES}: man/%.8: sources/%.xml
- xsltproc --nonet -o $@ ${MAN_STYLESHEET} $<
+ifneq (${XSLTPROGRAM}, no)
+ ifeq (${XSLTPROGRAM}, xsltproc)
+ ${XSLTPROGRAM} --nonet -o $@ ${MAN_STYLESHEET} $<
+ else
+ ${XSLTPROGRAM} -o man man $<
+ endif # XMLPROGRAM = xsltproc
+else
+ @echo "Cannot build doc ($< -> $@)"
+endif # XMLPROGRAM != yes
-.PHONY: html
-html: ${HTML_PAGES}
${HTML_PAGES}: html/%.html: sources/%.xml
- xsltproc --nonet -o $@ ${HTML_STYLESHEET} $<
+ifneq (${XSLTPROGRAM}, no)
+ ifeq (${XSLTPROGRAM}, xsltproc)
+ ${XSLTPROGRAM} --nonet -o $@ ${HTML_STYLESHEET} $<
+ else
+ ${XSLTPROGRAM} -o html html-nochunks $<
+ endif #XMLPROGRAM = xsltproc
+else
+ @echo "Cannot build doc ($< -> $@)"
+endif # XMLPROGRAM != yes
-.PHONY: install
install: man
if [ -n "${MAN_PAGES}" ]; then \
$(INSTALL) -d ${MANDIR}/man8; \
cp ${MAN_PAGES} ${MANDIR}/man8; \
fi
+
+
+.PHONY: all install html man
.PHONY: uninstall
uninstall: