postgis/utils/Makefile.in
Sandro Santilli 418bc7396d Add ad-hoc script to create skip signatures for postgis_restore.pl
Update the hardcoded skiplist to drop more things we can now generate

Fixes #5348
2023-02-28 01:02:31 +01:00

108 lines
3.1 KiB
Makefile

# **********************************************************************
# *
# * PostGIS - Spatial Types for PostgreSQL
# * http://postgis.net
# *
# * Copyright (C) 2012-2022 Sandro Santilli <strk@kbt.io>
# * Copyright (C) 2008 Mark Cave-Ayland
# *
# * This is free software; you can redistribute and/or modify it under
# * the terms of the GNU General Public Licence. See the COPYING file.
# *
# **********************************************************************
top_builddir = @top_builddir@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
datadir = @datadir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
INSTALL=@INSTALL@
INSTALL_DATA=@INSTALL_DATA@
SRID_MAXIMUM = @SRID_MAX@
SRID_USER_MAXIMUM = @SRID_USR_MAX@
PERL = @PERL@
VPATH := @srcdir@
SHELL = @SHELL@
INSTALL = $(SHELL) @top_srcdir@/build-aux/install-sh
SCRIPTS_built = postgis_restore.pl
SCRIPTS = \
create_uninstall.pl \
repo_revision.pl \
create_upgrade.pl \
profile_intersects.pl \
test_estimation.pl \
test_joinestimation.pl
all: $(SCRIPTS_built)
DROP_FILES = \
$(top_srcdir)/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in \
$(top_srcdir)/raster/rt_pg/rtpostgis_drop.sql.in \
$(top_srcdir)/postgis/postgis_after_upgrade.sql \
$(top_srcdir)/postgis/postgis_before_upgrade.sql \
$(top_srcdir)/topology/topology_after_upgrade.sql.in \
$(top_srcdir)/topology/topology_before_upgrade.sql.in \
$(top_builddir)/postgis/uninstall_postgis.sql \
$(top_builddir)/postgis/uninstall_legacy.sql \
$(top_builddir)/sfcgal/uninstall_sfcgal.sql \
$(top_builddir)/raster/rt_pg/uninstall_rtpostgis.sql \
$(top_builddir)/topology/uninstall_topology.sql
$(top_builddir)/postgis/uninstall_postgis.sql:
$(MAKE) -C ../postgis uninstall_postgis.sql
$(top_builddir)/postgis/uninstall_legacy.sql:
$(MAKE) -C ../postgis uninstall_legacy.sql
$(top_builddir)/sfcgal/uninstall_sfcgal.sql:
$(MAKE) -C ../sfcgal uninstall_sfcgal.sql
$(top_builddir)/raster/rt_pg/uninstall_rtpostgis.sql:
$(MAKE) -C ../raster/rt_pg uninstall_rtpostgis.sql
$(top_builddir)/topology/uninstall_topology.sql:
$(MAKE) -C ../topology/ uninstall_topology.sql
postgis_restore_data.hardcoded: postgis_restore.pl.in Makefile
sed -e '1,/^__END__/d' $< \
| sort -u \
> $@
postgis_restore_data.generated: $(DROP_FILES) Makefile create_skip_signatures.pl
$(PERL) @top_srcdir@/utils/create_skip_signatures.pl $(DROP_FILES) \
| sort \
> $@
postgis_restore.pl: postgis_restore.pl.in postgis_restore_data.hardcoded postgis_restore_data.generated Makefile
cat $< \
| sed '/^__END__/q' \
| sed 's,@SRID_MAXIMUM@,$(SRID_MAXIMUM),g;s,@SRID_USER_MAXIMUM@,$(SRID_USER_MAXIMUM),' \
> postgis_restore.pl
cat postgis_restore_data.hardcoded postgis_restore_data.generated \
| sort -u >> postgis_restore.pl
chmod +x $@
clean:
rm -f $(SCRIPTS_built) postgis_restore_data.generated postgis_restore_data.hardcoded
distclean: clean
rm -f Makefile
# And there's nothing to check
check check-unit check-regress:
installdir:
@mkdir -p $(DESTDIR)$(bindir)
uninstall:
rm -f $(addprefix '$(DESTDIR)$(bindir)'/, $(SCRIPTS_built))
install: installdir $(SCRIPTS_built)
$(INSTALL) $(SCRIPTS_built) '$(DESTDIR)$(bindir)/'