]> granicus.if.org Git - postgis/commitdiff
Have staged-install install comments when possible (#1532)
authorSandro Santilli <strk@keybit.net>
Mon, 13 Feb 2012 10:58:28 +0000 (10:58 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 13 Feb 2012 10:58:28 +0000 (10:58 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9163 b70326c6-7e19-0410-871a-916f4a2858ee

GNUmakefile.in
configure.ac
doc/Makefile.comments.in
doc/Makefile.in
regress/Makefile.in

index c81974bed5a18cce9612406a77aed4f8de955481..c17be1571bad01d3504613493e2e8437d8ba5ab5 100644 (file)
@@ -5,7 +5,7 @@
 #-----------------------------------------------------
 
 # todo: add all subdirs
-SUBDIRS = liblwgeom libpgcommon postgis regress @RASTER@ @TOPOLOGY@ loader utils @EXTENSIONS@  
+SUBDIRS = liblwgeom libpgcommon postgis regress @RASTER@ @TOPOLOGY@ loader utils @EXTENSIONS@
 
 PERL = @PERL@
 
index 1f82520dfa8fcc5f1fae822f87c679a805f13c2e..4b6888c3b920939086c5593a406aebbcb19115da 100644 (file)
@@ -133,6 +133,11 @@ if test "x$XSLTPROC" = "x"; then
        AC_MSG_WARN([xsltproc is not installed so documentation cannot be built])
 fi
 
+AC_PATH_PROG([XMLLINT], [xmllint], [])
+if test "x$XMLLINT" = "x"; then
+       AC_MSG_WARN([xmllint is not installed so documentation cannot be checked])
+fi
+
 AC_PATH_PROG([DBLATEX], [dblatex], [])
 if test "x$DBLATEX" = "x"; then
        AC_MSG_WARN([dblatex is not installed so PDF documentation cannot be built])
index b32355b6fca3bdfc7764f2de7e5ccb07e0d2e378..6b141ce03f23678b1774e548bb70885071f3b98b 100644 (file)
@@ -37,3 +37,13 @@ ifeq ($(PGXSOVERRIDE),1)
        include ../postgis/Makefile.pgxs
 endif
 
+# If REGRESS=1 passed as a parameter, change the default install paths
+# so that no prefix is included. This allows us to relocate to a temporary
+# directory for regression testing.
+ifeq ($(REGRESS),1)
+        bindir=/bin
+        pkglibdir=/lib
+        datadir=/share
+        datamoduledir=contrib/postgis
+endif
+
index ee3c679a1deacf8da3760e5555f8a2ae8873d7d9..94ace3c54e661b3d993eedac41256cf8d037203b 100644 (file)
@@ -18,6 +18,7 @@ INSTALL_DATA=@INSTALL_DATA@
 
 XSLTPROC=@XSLTPROC@
 XSLBASE=@XSLBASE@
+XMLLINT=@XMLLINT@
 
 XSLTPROC_COMMONOPTS= \
        --param section.autolabel 1 \
@@ -64,8 +65,12 @@ endif
 endif
 endif
 
+ifeq ($(XSLTPROC),)
+postgis_aggs_mm.xml: requirements_not_met_xsltproc
+else
 postgis_aggs_mm.xml: ./xsl/postgis_aggs_mm.xml.xsl postgis.xml
        $(XSLTPROC) ./xsl/postgis_aggs_mm.xml.xsl postgis.xml > $@
+endif
 
 postgis_comments.sql: ./xsl/postgis_comments.sql.xsl postgis.xml postgis_aggs_mm.xml
        $(XSLTPROC) ./xsl/postgis_comments.sql.xsl postgis.xml > $@
@@ -151,29 +156,46 @@ clean:
 maintainer-clean: clean images-clean
        rm -f postgis_comments.sql raster_comments.sql topology_comments.sql tiger_geocoder_comments.sql
 
+ifeq ($(XSLTPROC),)
+comments: requirements_not_met_xsltproc
+else
 comments: postgis_comments.sql raster_comments.sql topology_comments.sql tiger_geocoder_comments.sql
+endif
+
 cheatsheets: postgis_cheatsheet.html raster_cheatsheet.html topology_cheatsheet.html tiger_geocoder_cheatsheet.html
 
+ifeq ($(XSLTPROC),)
+comments-install: 
+else
 comments-install: comments
        $(MAKE) -f Makefile.comments install
+endif
 
 comments-uninstall:
        $(MAKE) -f Makefile.comments uninstall
 
-install: html/postgis.html man/shp2pgsql.1 man/pgsql2shp.1
-       mkdir -p $(DESTDIR)$(PGSQL_DOCDIR)/postgis
+man-install: man/shp2pgsql.1 man/pgsql2shp.1
        mkdir -p $(DESTDIR)$(PGSQL_MANDIR)/man1
-       $(INSTALL_DATA) html/postgis.html $(DESTDIR)$(PGSQL_DOCDIR)/postgis/postgis.html
-       $(INSTALL_DATA) ../README.postgis $(DESTDIR)$(PGSQL_DOCDIR)/postgis/README.postgis
        $(INSTALL_DATA) man/pgsql2shp.1 $(DESTDIR)$(PGSQL_MANDIR)/man1/pgsql2shp.1
        $(INSTALL_DATA) man/shp2pgsql.1 $(DESTDIR)$(PGSQL_MANDIR)/man1/shp2pgsql.1
 
-uninstall:
-       rm -f $(DESTDIR)$(PGSQL_DOCDIR)/postgis/postgis.html
-       rm -f $(DESTDIR)$(PGSQL_DOCDIR)/postgis/README.postgis
+man-uninstall:
        rm -f $(DESTDIR)$(PGSQL_MANDIR)/man1/shp2pgsql.1
        rm -f $(DESTDIR)$(PGSQL_MANDIR)/man1/pgsql2shp.1
 
+docs-install: html/postgis.html
+       mkdir -p $(DESTDIR)$(PGSQL_DOCDIR)/postgis
+       $(INSTALL_DATA) html/postgis.html $(DESTDIR)$(PGSQL_DOCDIR)/postgis/postgis.html
+       $(INSTALL_DATA) ../README.postgis $(DESTDIR)$(PGSQL_DOCDIR)/postgis/README.postgis
+
+docs-uninstall: 
+       rm -f $(DESTDIR)$(PGSQL_DOCDIR)/postgis/postgis.html
+       rm -f $(DESTDIR)$(PGSQL_DOCDIR)/postgis/README.postgis
+
+install: docs-install man-install comments-install
+
+uninstall: docs-uninstall man-uninstall comments-uninstall
+
 ifeq ($(XSLTPROC),)
 garden: requirements_not_met_xsltproc
 else
@@ -184,32 +206,45 @@ endif
 
 
 
-ifeq ($(XSLTPROC),)
-check: requirements_not_met_xsltproc
+ifeq ($(XMLLINT),)
+check: requirements_not_met_xmllint
 else
 check: postgis_aggs_mm.xml
-       xmllint --loaddtd --xinclude --valid postgis.xml > /dev/null
+       $(XMLLINT) --loaddtd --xinclude --valid postgis.xml > /dev/null
 endif
 
 
 requirements_not_met_xsltproc:
        @echo
-       @echo "configure was unable to find 'xsltproc' which is required to build the documentation."
-       @echo "To build the documentation, install xsltproc and then re-run configure. Alternatively "
+       @echo "configure was unable to find 'xsltproc' which is required"
+       @echo "to build the documentation."
+       @echo "Install xsltproc and then re-run configure. Alternatively "
        @echo "refer to online manual:"
        @echo
        @echo "  http://www.postgis.org/docs"
        @echo
 
-requirements_not_met_xslbase:
+requirements_not_met_xmllint:
        @echo
-       @echo "configure was unable to find the Docbook XSL stylesheet directory which is required to build the documentation."
-       @echo "To build the documentation, install the Docbook XSL stylesheets and/or re-run configure with the --with-xsldir option. Alternatively "
+       @echo "configure was unable to find 'xmllint' which is required"
+       @echo "to test the documentation."
+       @echo "Install xmllint and then re-run configure. Alternatively "
        @echo "refer to online manual:"
        @echo
        @echo "  http://www.postgis.org/docs"
        @echo
 
+requirements_not_met_xslbase:
+       @echo
+       @echo "configure was unable to find the Docbook XSL stylesheet directory"
+       @echo "which is required to build the documentation."
+       @echo "Install the Docbook XSL stylesheets and/or re-run configure "
+       @echo "with the --with-xsldir option."
+       @echo "Alternatively refer to online manual:"
+       @echo
+       @echo "  http://www.postgis.org/docs"
+       @echo
+
 requirements_not_met_imagemagick:
        @echo 
        @echo "configure was unable to find the ImageMagick's 'convert' utility program."
index 5d46ccf98c59316d941222ee7bf0f9768a7da486..9292aa386ae444f04de082e32d7d41ef29a8d5a7 100644 (file)
@@ -155,6 +155,7 @@ staged-install-raster:
 
 staged-install: staged-install-raster staged-install-topology
        $(MAKE) -C ../postgis REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install
+       $(MAKE) -C ../ REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) comments-install
        $(PERL) -pi.bak -e 's,\$$libdir,$(REGRESS_INSTALLDIR)/lib,g' $(REGRESS_INSTALLDIR)/share/contrib/postgis/*.sql
        #$(MAKE) -C ../loader REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install