]> granicus.if.org Git - postgis/commitdiff
make install doesn't install postgis_restore.pl (#1732)
authorPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 28 Mar 2012 23:12:17 +0000 (23:12 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 28 Mar 2012 23:12:17 +0000 (23:12 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9575 b70326c6-7e19-0410-871a-916f4a2858ee

utils/Makefile.in

index 9e50169abea1ec370913309c8062e7af689503ad..3f8ddc742390a926018840b0fe92b0f350646c8e 100644 (file)
 # *
 # **********************************************************************
 
+# Separate PGXS-enabled Makefile for documentation installation (it is
+# not possible to merge into the main Makefile as has been done for
+# the shapefile loader)
+
+MODULE_doc=postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@
+MODULEDIR=contrib/$(MODULE_doc)
+
+# Files to be copied to the contrib/ directory
+DATA_built=postgis_restore.pl
+
+# PGXS information
+PG_CONFIG = @PGCONFIG@ 
+PGXS := @PGXS@
+include $(PGXS)
+
+SHELL = @SHELL@
+INSTALL = $(SHELL) ../install-sh
+
 SCRIPTS = \
        postgis_restore.pl \
        create_undef.pl \
@@ -29,8 +47,14 @@ all: postgis_restore.pl
 postgis_restore.pl: postgis_restore.pl.in
        sed 's,@SRID_MAXIMUM@,$(SRID_MAXIMUM),g;s,@SRID_USER_MAXIMUM@,$(SRID_USER_MAXIMUM),' $< >$@
 
-# We don't install utils (why?)
-install uninstall:
+installdir:
+       @mkdir -p "$(DESTDIR)$(datadir)/$(MODULEDIR)"
+
+uninstall: 
+       @rm -f "$(DESTDIR)$(datadir)/$(MODULEDIR)/postgis_restore.pl"
+
+install: installdir 
+       $(LIBTOOL) --mode=install $(INSTALL) postgis_restore.pl "$(DESTDIR)$(datadir)/$(MODULEDIR)/postgis_restore.pl"
 
 clean:
        rm -f postgis_restore.pl