From f37dfa5cfd07afc9b5cc234a048dbc76c14862a4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ra=C3=BAl=20Mar=C3=ADn=20Rodr=C3=ADguez?= Date: Wed, 21 Nov 2018 16:21:52 +0000 Subject: [PATCH] Uniformize how PGXS is used Closes #4250 Closes https://github.com/postgis/postgis/pull/341 git-svn-id: http://svn.osgeo.org/postgis/trunk@17044 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/Makefile.comments.in | 2 +- extensions/address_standardizer/Makefile.in | 5 +---- extensions/postgis/Makefile.in | 5 ++--- extensions/postgis_raster/Makefile.in | 5 ++--- extensions/postgis_sfcgal/Makefile.in | 5 ++--- extensions/postgis_tiger_geocoder/Makefile.in | 5 ++--- extensions/postgis_topology/Makefile.in | 5 ++--- loader/Makefile.in | 2 +- postgis/Makefile.in | 2 +- raster/rt_pg/Makefile.in | 2 +- topology/Makefile.in | 2 +- utils/Makefile.in | 2 +- 12 files changed, 17 insertions(+), 25 deletions(-) diff --git a/doc/Makefile.comments.in b/doc/Makefile.comments.in index ba507b9fb..a334c75ea 100644 --- a/doc/Makefile.comments.in +++ b/doc/Makefile.comments.in @@ -20,7 +20,7 @@ MODULEDIR=contrib/$(MODULE_doc) DATA_built=postgis_comments.sql raster_comments.sql topology_comments.sql sfcgal_comments.sql # PGXS information -PG_CONFIG = @PG_CONFIG@ +PG_CONFIG := @PG_CONFIG@ PGXS := @PGXS@ include $(PGXS) diff --git a/extensions/address_standardizer/Makefile.in b/extensions/address_standardizer/Makefile.in index 90fa5f2c3..ae5ee5999 100644 --- a/extensions/address_standardizer/Makefile.in +++ b/extensions/address_standardizer/Makefile.in @@ -56,10 +56,6 @@ SHLIB_LINK = @SHLIB_LINK@ -lpcre EXTRA_CLEAN = usps-st-city-name.txt mk-st-regexp mk-city-regex test_main REGRESS = test-init-extensions test-parseaddress test-standardize_address_1 test-standardize_address_2 -# PGXS information -PG_CONFIG = @PG_CONFIG@ - -PGVER := $(shell $(PG_CONFIG) --version) # Borrow the $libdir substitution from PGXS but customise by running the preprocessor # and adding the version number @@ -184,6 +180,7 @@ EXTRA_CLEAN += sql/$(EXTENSION)--$(EXTVERSION).sql sql/$(EXTENSION)--unpackaged- distclean: clean rm Makefile +PG_CONFIG := @PG_CONFIG@ PGXS := @PGXS@ include $(PGXS) PERL = @PERL@ diff --git a/extensions/postgis/Makefile.in b/extensions/postgis/Makefile.in index cab097cb6..30a7cf129 100644 --- a/extensions/postgis/Makefile.in +++ b/extensions/postgis/Makefile.in @@ -59,8 +59,6 @@ RASTER_DROP_SCRIPTS = \ ../../raster/rt_pg/rtpostgis_drop.sql \ ../../raster/rt_pg/uninstall_rtpostgis.sql -PG_CONFIG = @PG_CONFIG@ - SQL_BITS = $(wildcard sql/*.sql) EXTRA_CLEAN += ${SQL_BITS} sql/*.sql @@ -131,6 +129,7 @@ include ../upgrade-paths-rules.mk distclean: clean rm -f Makefile -PGXS := $(shell $(PG_CONFIG) --pgxs) +PG_CONFIG := @PG_CONFIG@ +PGXS := @PGXS@ include $(PGXS) PERL = @PERL@ diff --git a/extensions/postgis_raster/Makefile.in b/extensions/postgis_raster/Makefile.in index 0a726597e..410948992 100644 --- a/extensions/postgis_raster/Makefile.in +++ b/extensions/postgis_raster/Makefile.in @@ -51,8 +51,6 @@ EXTENSION_UPGRADE_SCRIPTS = \ EXTENSION_UNPACKAGED_UPGRADE_SCRIPTS = \ sql/rtpostgis.sql -PG_CONFIG = @PG_CONFIG@ - SQL_BITS = $(wildcard sql/*.sql) EXTRA_CLEAN += ${SQL_BITS} sql/*.sql @@ -109,6 +107,7 @@ include ../upgrade-paths-rules.mk distclean: clean rm -f Makefile -PGXS := $(shell $(PG_CONFIG) --pgxs) +PG_CONFIG := @PG_CONFIG@ +PGXS := @PGXS@ include $(PGXS) PERL = @PERL@ diff --git a/extensions/postgis_sfcgal/Makefile.in b/extensions/postgis_sfcgal/Makefile.in index 4fd33122b..31e92404f 100644 --- a/extensions/postgis_sfcgal/Makefile.in +++ b/extensions/postgis_sfcgal/Makefile.in @@ -39,8 +39,6 @@ EXTENSION_UNPACKAGED_UPGRADE_SCRIPTS = \ sql_bits/sfcgal.sql \ ../../utils/create_unpackaged.pl -PG_CONFIG = @PG_CONFIG@ - SQL_BITS = $(wildcard sql_bits/*.sql) EXTRA_CLEAN += sql/*.sql ${SQL_BITS} @@ -108,6 +106,7 @@ include ../upgrade-paths-rules.mk distclean: clean rm Makefile -PGXS := $(shell $(PG_CONFIG) --pgxs) +PG_CONFIG := @PG_CONFIG@ +PGXS := @PGXS@ include $(PGXS) PERL = @PERL@ diff --git a/extensions/postgis_tiger_geocoder/Makefile.in b/extensions/postgis_tiger_geocoder/Makefile.in index 83f9d93f1..631627cce 100644 --- a/extensions/postgis_tiger_geocoder/Makefile.in +++ b/extensions/postgis_tiger_geocoder/Makefile.in @@ -31,8 +31,6 @@ DATA_built = \ REGRESS = test-normalize_address test-upgrade REGRESS_OPTS = --load-extension=fuzzystrmatch --load-extension=postgis --load-extension=$(EXTENSION) -PG_CONFIG = @PG_CONFIG@ - SQL_BITS = $(wildcard sql_bits/*.sql) EXTRA_CLEAN += sql/*.sql ${SQL_BITS} @@ -249,6 +247,7 @@ EXTRA_CLEAN += $(wildcard expected/*--*.out) distclean: clean rm Makefile -PGXS := $(shell $(PG_CONFIG) --pgxs) +PG_CONFIG := @PG_CONFIG@ +PGXS := @PGXS@ include $(PGXS) PERL=@PERL@ diff --git a/extensions/postgis_topology/Makefile.in b/extensions/postgis_topology/Makefile.in index ed9edac71..feeea22e4 100644 --- a/extensions/postgis_topology/Makefile.in +++ b/extensions/postgis_topology/Makefile.in @@ -40,8 +40,6 @@ EXTENSION_UPGRADE_SCRIPTS = \ sql_bits/topology_comments.sql \ ../postgis_extension_helper_uninstall.sql -PG_CONFIG = @PG_CONFIG@ - SQL_BITS = $(wildcard sql_bits/*.sql) EXTRA_CLEAN += sql/*.sql ${SQL_BITS} @@ -99,6 +97,7 @@ include ../upgrade-paths-rules.mk distclean: clean rm Makefile -PGXS := $(shell $(PG_CONFIG) --pgxs) +PG_CONFIG := @PG_CONFIG@ +PGXS := @PGXS@ include $(PGXS) PERL=@PERL@ diff --git a/loader/Makefile.in b/loader/Makefile.in index 6954a6cd4..9bf83564a 100644 --- a/loader/Makefile.in +++ b/loader/Makefile.in @@ -15,7 +15,7 @@ # the DESTDIR variable so we can get the correct install paths. # Hence we include the PGXS Makefile here, but ensure that we override the # 'all' and 'install' targets with the ones we really want to use below. -PG_CONFIG = @PG_CONFIG@ +PG_CONFIG := @PG_CONFIG@ PGXS := @PGXS@ include $(PGXS) diff --git a/postgis/Makefile.in b/postgis/Makefile.in index f32fd9db0..5d86682ef 100644 --- a/postgis/Makefile.in +++ b/postgis/Makefile.in @@ -158,7 +158,7 @@ EXTRA_CLEAN=$(SQL_OBJS) \ geobuf.pb-c.h # PGXS information -PG_CONFIG = @PG_CONFIG@ +PG_CONFIG := @PG_CONFIG@ PGXS := @PGXS@ # NO_TEMP_INSTALL is a workaround for a 9.5dev bug. See: # http://www.postgresql.org/message-id/CAB7nPqTsR5o3g-fBi6jbsVdhfPiLFWQ_0cGU5=94Rv_8W3qvFA@mail.gmail.com diff --git a/raster/rt_pg/Makefile.in b/raster/rt_pg/Makefile.in index 0d939e4a2..91b0ec9a5 100644 --- a/raster/rt_pg/Makefile.in +++ b/raster/rt_pg/Makefile.in @@ -82,7 +82,7 @@ SHLIB_LINK_F = ../rt_core/librtcore.a $(LIBLWGEOM_LDFLAGS) $(LIBPGCOMMON_LDFLAGS EXTRA_CLEAN=$(SQL_OBJS) $(DATA_built) rtpostgis_upgrade.sql.in rtpostgis_upgrade_for_extension.sql.in # PGXS information -PG_CONFIG = @PG_CONFIG@ +PG_CONFIG := @PG_CONFIG@ PGXS := @PGXS@ # NO_TEMP_INSTALL is a workaround for a 9.5dev bug. See: # http://www.postgresql.org/message-id/CAB7nPqTsR5o3g-fBi6jbsVdhfPiLFWQ_0cGU5=94Rv_8W3qvFA@mail.gmail.com diff --git a/topology/Makefile.in b/topology/Makefile.in index 62c0259f9..48e71ddaf 100644 --- a/topology/Makefile.in +++ b/topology/Makefile.in @@ -64,7 +64,7 @@ endif EXTRA_CLEAN=$(SQL_OBJS) topology_upgrade.sql.in # PGXS information -PG_CONFIG = @PG_CONFIG@ +PG_CONFIG := @PG_CONFIG@ PGXS := @PGXS@ # NO_TEMP_INSTALL is a workaround for a 9.5dev bug. See: # http://www.postgresql.org/message-id/CAB7nPqTsR5o3g-fBi6jbsVdhfPiLFWQ_0cGU5=94Rv_8W3qvFA@mail.gmail.com diff --git a/utils/Makefile.in b/utils/Makefile.in index 4d3922895..5202b6cfa 100644 --- a/utils/Makefile.in +++ b/utils/Makefile.in @@ -21,7 +21,7 @@ MODULEDIR=contrib/$(MODULE_doc) DATA_built=postgis_restore.pl # PGXS information -PG_CONFIG = @PG_CONFIG@ +PG_CONFIG := @PG_CONFIG@ PGXS := @PGXS@ include $(PGXS) -- 2.40.0