]> granicus.if.org Git - postgis/commitdiff
Nicely handled missing requirements for docs build
authorSandro Santilli <strk@keybit.net>
Wed, 14 Dec 2005 12:24:26 +0000 (12:24 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 14 Dec 2005 12:24:26 +0000 (12:24 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@2180 b70326c6-7e19-0410-871a-916f4a2858ee

Makefile.config.in
configure.in
doc/Makefile

index cdd67b0a22479c2650f1826f2fc71480e9bf1831..6c499f668df46148f710cfade12f2b6185fee1f5 100644 (file)
@@ -83,6 +83,10 @@ PORTNAME=@PORTNAME@
 # Docbook
 #
 XSLBASE=@XSLBASE@
+XSLTPROC=@XSLTPROC@
+PDFXMLTEX=@PDFXMLTEX@
+JW=@JW@
+DOC_RULE=@DOC_RULE@
 
 #
 # Compilers
index bff8bb1b054021a2debbfee16ea44259e032c059..ff024b496f3aabf11d61dcb0af7e15affd73102e 100644 (file)
@@ -318,6 +318,28 @@ for p in ${SEARCHPATH}; do
        fi
 done
 
+dnl
+dnl Search for other binaries needed to build docs
+dnl
+AC_PATH_PROG([XSLTPROC], [xsltproc])
+AC_PATH_PROG([PDFXMLTEX], [pdfxmltex])
+AC_PATH_PROG([JW], [jw])
+AC_SUBST(XSLTPROC)
+AC_SUBST(PDFXMLTEX)
+AC_SUBST(JW)
+
+DOC_RULE=requirements_not_met
+if test -n "${XSLBASE}"; then
+       if test -n "${XSLTPROC}"; then
+               DOC_RULE=html/postgis.html
+       else
+               if test -n "${JW}"; then
+                       DOC_RULE=jw
+               fi
+       fi
+fi
+AC_SUBST(DOC_RULE)
+
 
 if test $USE_JTS -gt 0; then
 dnl    AC_MSG_RESULT([ GEOS disabled, using JTS.])
index f59aeca20e3e36ea45db57a34639928dde049968..e6eb6429ee9579c8ee3220bb8b0470e43027bbc6 100644 (file)
@@ -5,17 +5,22 @@ include ../Version.config
 
 LAST_RELEASE_VERSION = $(SO_MAJOR_VERSION).$(SO_MINOR_VERSION).$(SO_MICRO_VERSION)
 
-#XSLBASE?=/usr/share/sgml/docbook/xsl-stylesheets
-#XSLBASE = /usr/share/xml/docbook/stylesheet/nwalsh
+all: $(DOC_RULE)
 
-
-all: html
+requirements_not_met:
+       @echo
+       @echo "Docs building requires 'xsltproc' or 'jw'."
+       @echo "Configuration tool could not find any, either install"
+       @echo "them or refer to online manual:"
+       @echo
+       @echo "  http://postgis.refractions.net/docs"
+       @echo
 
 postgis-out.xml: postgis.xml ../Version.config
        cat $< | sed "s/@@LAST_RELEASE_VERSION@@/$(LAST_RELEASE_VERSION)/g" > $@
 
 chunked-html: postgis-out.xml
-       xsltproc \
+       $(XSLTPROC) \
                --output html/ \
                --param shade.verbatim 1 \
                --param chunk.section.depth 0 \
@@ -27,7 +32,7 @@ chunked-html: postgis-out.xml
                $<
 
 html/postgis.html: postgis-out.xml
-       xsltproc \
+       $(XSLTPROC) \
                --output html/postgis.html \
                --param shade.verbatim 1 \
                --param section.autolabel 1 \
@@ -40,7 +45,7 @@ html/postgis.html: postgis-out.xml
 html: html/postgis.html
 
 postgis.fo: postgis-out.xml
-       xsltproc \
+       $(XSLTPROC) \
                --output $@ \
                --param shade.verbatim 1 \
                --param section.autolabel 1 \
@@ -50,11 +55,11 @@ postgis.fo: postgis-out.xml
                $<
 
 postgis.pdf: postgis.fo
-       pdfxmltex $< > /dev/null ; \
-       pdfxmltex $< > /dev/null
+       $(PDFXMLTEX) $< > /dev/null ; \
+       $(PDFXMLTEX) $< > /dev/null
 
 jw: postgis-out.xml
-       jw $(COMMONOPTS) -o html/ postgis-out.xml
+       $(JW) $(COMMONOPTS) -o html/ postgis-out.xml
 
 clean:
        @rm -f \