f9143caa99
It's not available in some UNIX systems as it's not POSIX standard git-svn-id: http://svn.osgeo.org/postgis/trunk@17822 b70326c6-7e19-0410-871a-916f4a2858ee
25 lines
830 B
Makefile
25 lines
830 B
Makefile
EXTDIR=$(DESTDIR)$(datadir)/$(datamoduledir)
|
|
|
|
install: install-upgrade-paths
|
|
|
|
# The "next" lines are a cludge to allow upgrading between different
|
|
# revisions of the same version
|
|
install-upgrade-paths:
|
|
tpl='$(EXTENSION)--ANY--$(EXTVERSION).sql'; \
|
|
$(INSTALL_DATA) sql/$${tpl} "$(EXTDIR)/$${tpl}"; \
|
|
ln -fs "$${tpl}" $(EXTDIR)/$(EXTENSION)--$(EXTVERSION)--$(EXTVERSION)next.sql; \
|
|
ln -fs "$${tpl}" $(EXTDIR)/$(EXTENSION)--$(EXTVERSION)next--$(EXTVERSION).sql; \
|
|
for OLD_VERSION in $(UPGRADEABLE_VERSIONS); do \
|
|
ln -fs "$${tpl}" $(EXTDIR)/$(EXTENSION)--$$OLD_VERSION--$(EXTVERSION).sql; \
|
|
done
|
|
|
|
uninstall: uninstall-upgrade-paths
|
|
|
|
INSTALLED_UPGRADE_SCRIPTS = \
|
|
$(wildcard $(EXTDIR)/*$(EXTVERSION).sql) \
|
|
$(wildcard $(EXTDIR)/*$(EXTVERSION)next.sql) \
|
|
$(NULL)
|
|
|
|
uninstall-upgrade-paths:
|
|
rm -f $(INSTALLED_UPGRADE_SCRIPTS)
|