]> granicus.if.org Git - postgis/commitdiff
Update documentation build so that "make install" now works. Maybe this will fix...
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Thu, 22 May 2008 14:34:32 +0000 (14:34 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Thu, 22 May 2008 14:34:32 +0000 (14:34 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@2780 b70326c6-7e19-0410-871a-916f4a2858ee

configure.in
doc/Makefile.in

index 064ede58766e5679b80db319dcb2300b0f28fcae..e280e66357ba0f9b1eadacdcf3f436fa7f33b576 100644 (file)
@@ -119,6 +119,13 @@ PGSQL_FE_CPPFLAGS=-I`$PGCONFIG --includedir`
 AC_SUBST([PGSQL_FE_LDFLAGS])
 AC_SUBST([PGSQL_FE_CPPFLAGS])
 
+dnl Extract the documentation and man page directories
+PGSQL_DOCDIR=`$PGCONFIG --docdir`
+PGSQL_MANDIR=`$PGCONFIG --mandir`
+
+AC_SUBST([PGSQL_DOCDIR])
+AC_SUBST([PGSQL_MANDIR])
+
 
 dnl Ensure that we can parse libpq-fe.h
 CPPFLAGS_SAVE="$CPPFLAGS"
index ff26e377bcafc75b753317d0a7727fba47c94b3c..104f413958ef28e7e319ca7e09819a945c08fd9d 100644 (file)
@@ -1,6 +1,13 @@
 #
 # PostGIS documentation build Makefile
 #
+# Written by Mark Cave-Ayland
+#
+# NOTE: We don't use a standard PGXS Makefile here since the DOCS target
+# only allows files to be stored within contrib/ and we currently
+# store documentation under contrib/postgis due to the possibility
+# that we could produce a large number of files (think chunked HTML)
+#
 
 XSLTPROC = @XSLTPROC@
 XSLBASE = @XSLBASE@
@@ -16,6 +23,10 @@ XSLTPROC_HTMLOPTS = \
 HTML_DOCBOOK_XSL=$(XSLBASE)/html/docbook.xsl 
 CHUNK_HTML_DOCBOOK_XSL=$(XSLBASE)/html/chunk.xsl 
 
+# Directories for documentation and man pages
+PGSQL_DOCDIR=@PGSQL_DOCDIR@
+PGSQL_MANDIR=@PGSQL_MANDIR@
+
 
 # If XSLTPROC was not found during configure, we cannot
 # build the documentation
@@ -55,18 +66,18 @@ maintainer-clean: clean
        @rm -f html/*.html
 
 install: html/postgis.html man/shp2pgsql.1 man/pgsql2shp.1
-       @mkdir -p $(DESTDIR)$(docdir)/postgis
-       @mkdir -p $(DESTDIR)$(mandir)/man1
-       $(INSTALL_DATA) html/postgis.html $(DESTDIR)$(docdir)/postgis/postgis.html
-       $(INSTALL_DATA) ../README.postgis $(DESTDIR)$(docdir)/postgis/README.postgis
-       $(INSTALL_DATA) man/pgsql2shp.1 $(DESTDIR)$(mandir)/man1/pgsql2shp.1
-       $(INSTALL_DATA) man/shp2pgsql.1 $(DESTDIR)$(mandir)/man1/shp2pgsql.1
+       @mkdir -p $(PGSQL_DOCDIR)/postgis
+       @mkdir -p $(PGSQL_MANDIR)/man1
+       cp html/postgis.html $(PGSQL_DOCDIR)/postgis/postgis.html
+       cp ../README.postgis $(PGSQL_DOCDIR)/postgis/README.postgis
+       cp man/pgsql2shp.1 $(PGSQL_MANDIR)/man1/pgsql2shp.1
+       cp man/shp2pgsql.1 $(PGSQL_MANDIR)/man1/shp2pgsql.1
 
 uninstall:
-       rm -f $(DESTDIR)$(docdir)/postgis/postgis.html
-       rm -f $(DESTDIR)$(docdir)/postgis/README.postgis
-       rm -f $(DESTDIR)$(mandir)/man1/shp2pgsql.1
-       rm -f $(DESTDIR)$(mandir)/man1/pgsql2shp.1
+       rm -f $(PGSQL_DOCDIR)/postgis/postgis.html
+       rm -f $(PGSQL_DOCDIR)/postgis/README.postgis
+       rm -f $(PGSQL_MANDIR)/man1/shp2pgsql.1
+       rm -f $(PGSQL_MANDIR)/man1/pgsql2shp.1
 
 requirements_not_met:
        @echo