[postgis-commits] svn - r3125 - in trunk: . doc

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Thu Oct 16 11:12:35 PDT 2008


Author: kneufeld
Date: 2008-10-16 11:12:34 -0700 (Thu, 16 Oct 2008)
New Revision: 3125

Modified:
   trunk/configure.ac
   trunk/doc/Makefile.in
Log:
added dblatex as a dependency for building PDF's
added a pdf target to doc/Makefile.in

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2008-10-16 08:33:25 UTC (rev 3124)
+++ trunk/configure.ac	2008-10-16 18:12:34 UTC (rev 3125)
@@ -45,7 +45,14 @@
 POSTGIS_MINOR_VERSION=`cat Version.config | grep POSTGIS_MINOR_VERSION | sed 's/[[^=]]*=\([[0-9]]\)/\1/g'`
 POSTGIS_MICRO_VERSION=`cat Version.config | grep POSTGIS_MICRO_VERSION | sed 's/[[^=]]*=\([[0-9]]\)/\1/g'`
 
+AC_DEFINE_UNQUOTED([POSTGIS_MAJOR_VERSION], ["$POSTGIS_MAJOR_VERSION"], [PostGIS major version])
+AC_DEFINE_UNQUOTED([POSTGIS_MINOR_VERSION], ["$POSTGIS_MINOR_VERSION"], [PostGIS minor version])
+AC_DEFINE_UNQUOTED([POSTGIS_MICRO_VERSION], ["$POSTGIS_MICRO_VERSION"], [PostGIS micro version])
 
+AC_SUBST([POSTGIS_MAJOR_VERSION])
+AC_SUBST([POSTGIS_MINOR_VERSION])
+AC_SUBST([POSTGIS_MICRO_VERSION])
+
 dnl
 dnl Search for flex/bison to build the parser
 dnl
@@ -77,6 +84,17 @@
 
 
 dnl
+dnl Search for dblatex which is required for building PDF documentation
+dnl
+
+AC_PATH_PROG([DBLATEX], [dblatex], [])
+if test "x$DBLATEX" = "x"; then
+	AC_MSG_WARN([dblatex is not installed so PDF documentation cannot be built])
+fi
+
+
+
+dnl
 dnl Allow the user to specify the location of the html/docbook.xsl stylesheet
 dnl
 

Modified: trunk/doc/Makefile.in
===================================================================
--- trunk/doc/Makefile.in	2008-10-16 08:33:25 UTC (rev 3124)
+++ trunk/doc/Makefile.in	2008-10-16 18:12:34 UTC (rev 3125)
@@ -9,6 +9,10 @@
 # that we could produce a large number of files (think chunked HTML)
 #
 
+POSTGIS_MAJOR_VERSION=@POSTGIS_MAJOR_VERSION@
+POSTGIS_MINOR_VERSION=@POSTGIS_MINOR_VERSION@
+POSTGIS_MICRO_VERSION=@POSTGIS_MICRO_VERSION@
+
 XSLTPROC = @XSLTPROC@
 XSLBASE = @XSLBASE@
 
@@ -33,6 +37,9 @@
 # OpenJade's db2pdf script for PDF generation from DocBook
 DB2PDF = @DB2PDF@
 
+# DBLatex's dblatex script for PDF generation from DocBook
+DBLATEX = @DBLATEX@
+
 # Directories for documentation and man pages
 PGSQL_DOCDIR=@PGSQL_DOCDIR@
 PGSQL_MANDIR=@PGSQL_MANDIR@
@@ -53,7 +60,7 @@
 	$(XSLTPROC) ./xsl/postgis_aggs_mm.xml.xsl reference_new.xml > $@
 
 postgis-out.xml: postgis.xml introduction.xml installation.xml faq.xml using_postgis.xml performance_tips.xml reference.xml reference_new.xml postgis_aggs_mm.xml reporting.xml release_notes.xml ../Version.config
-	cat $< | sed "s/@@LAST_RELEASE_VERSION@@/1.4.0SVN/g" > $@
+	cat $< | sed "s/@@LAST_RELEASE_VERSION@@/${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}/g" > $@
 
 chunked-html: postgis-out.xml
 	$(XSLTPROC) $(XSLTPROC_COMMONOPTS) $(XSLTPROC_HTMLOPTS) \
@@ -68,6 +75,7 @@
 		$(HTML_DOCBOOK_XSL) \
 		$<
 
+# This will soon be deprecated.
 postgis.pdf: postgis-out.xml
 	@if test x"$(DB2PDF)" = x; then \
 	   echo "Error: db2pdf not found, can't build posgis.pdf"; \
@@ -77,13 +85,37 @@
 	   $(DB2PDF) $< && mv postgis-out.pdf postgis.pdf; \
 	fi
 
+postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}.pdf: postgis-out.xml
+	@if test x"$(DBLATEX)" = x; then \
+	   echo "Error: dblatex not found, can't build pdf"; \
+	   echo "       try installing dblatex and then re-run configure"; \
+	   false; \
+	else \
+		cp reference.xml reference.xml.orig; \
+		cat reference.xml.orig | sed -e "s:term:listitem:g" > reference.xml; \
+		dblatex -T native -t pdf \
+		   -I "${PWD}/html" \
+		   -P doc.collab.show=0 \
+		   -P figure.note="${PWD}/html/images/note" \
+		   -P figure.tip="${PWD}/html/images/tip" \
+		   -P figure.important="${PWD}/html/images/important" \
+		   -P figure.warning="${PWD}/html/images/warning" \
+		   -P figure.caution="${PWD}/html/images/caution" \
+		   -P latex.output.revhistory=0 \
+		   -o postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}.pdf $<; \
+		cp reference.xml.orig reference.xml; \
+		rm -rf reference.xml.orig; \
+	fi
+
+pdf: postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}.pdf
+
 clean:
 	@rm -f \
 		postgis-out.xml
 
 maintainer-clean: clean
 	@rm -f html/*.html \
-		postgis-*.pdf 
+		postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}.pdf 
 
 install: html/postgis.html man/shp2pgsql.1 man/pgsql2shp.1
 	@mkdir -p $(PGSQL_DOCDIR)/postgis



More information about the postgis-commits mailing list