# *
# **********************************************************************
+# 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 \
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