Commit 639308e9 authored by Sandro Santilli's avatar Sandro Santilli

Generate control file from Makefile rather than ./configure

Simplifies code to be more localized, fixed distclean and clean
to drop those generated files

git-svn-id: http://svn.osgeo.org/postgis/trunk@16269 b70326c6-7e19-0410-871a-916f4a2858ee
parent 2b198fd7
Pipeline #16085668 passed with stage
in 22 minutes and 25 seconds
......@@ -1443,8 +1443,6 @@ AC_OUTPUT([GNUmakefile
extensions/postgis_tiger_geocoder/Makefile
extensions/postgis_tiger_geocoder/postgis_tiger_geocoder.control
extensions/address_standardizer/Makefile
extensions/address_standardizer/address_standardizer.control
extensions/address_standardizer/address_standardizer_data_us.control
liblwgeom/Makefile
liblwgeom/cunit/Makefile
liblwgeom/liblwgeom.h
......
......@@ -36,6 +36,11 @@ MODULE_big = address_standardizer
EXTENSION = address_standardizer
DATA = address_standardizer_data_us.control sql/$(EXTENSION).sql sql/$(EXTENSION)_data_us.sql
DATA_built = \
$(EXTENSION).control \
$(EXTENSION)_data_us.control \
$(NULL)
all: sql/address_standardizer.sql sql/address_standardizer--1.0--$(EXTVERSION).sql sql/address_standardizer--$(EXTVERSION).sql sql/address_standardizer--$(EXTVERSION)--$(EXTVERSION)next.sql sql/address_standardizer--$(EXTVERSION)next--$(EXTVERSION).sql \
sql/$(EXTENSION)_data_us.sql sql/address_standardizer--@POSTGIS_LIB_VERSION@.sql sql/$(EXTENSION)_data_us--@POSTGIS_LIB_VERSION@.sql sql/$(EXTENSION)_data_us--$(EXTVERSION)--$(EXTVERSION)next.sql \
sql/$(EXTENSION)_data_us--$(EXTVERSION)next--$(EXTVERSION).sql \
......@@ -68,6 +73,11 @@ sql/%.sql: %.sql.in
$(SQLPP) -I../libpgcommon $< | grep -v '^#' | \
$(PERL) -lpe "s'MODULE_PATHNAME'\$$libdir/${EXTENSION}'g" > $@
%.control: %.control.in Makefile
cat $< \
| sed -e 's|@EXTVERSION@|$(EXTVERSION)|g' \
> $@
sql/address_standardizer--@POSTGIS_LIB_VERSION@.sql: sql/address_standardizer_types.sql \
sql/address_standardizer_functions.sql
cat $^ > $@
......@@ -169,6 +179,8 @@ EXTRA_CLEAN += $(wildcard expected/*--*.out)
EXTRA_CLEAN += sql/$(EXTENSION)--$(EXTVERSION).sql sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql
EXTRA_CLEAN += sql/$(EXTENSION)--$(EXTVERSION).sql sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql *.a *.so *.dll
EXTRA_CLEAN += Makefile
PGXS := @PGXS@
include $(PGXS)
PERL = @PERL@
# address_standardizer extension
comment = 'Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.'
default_version = '@POSTGIS_LIB_VERSION@'
default_version = '@EXTVERSION@'
relocatable = true
# address standardizer us dataset
comment = 'Address Standardizer US dataset example'
default_version = '@POSTGIS_LIB_VERSION@'
default_version = '@EXTVERSION@'
relocatable = true
......@@ -23,6 +23,11 @@ PREREL_PREFIX = $(shell echo $(EXTVERSION) | \
$(PERL) -pe 's/(\d+[a-zA-Z]+)\d*/\1/'
DATA = $(filter-out $(wildcard sql/*--*.sql),$(wildcard sql/*.sql))
DATA_built = \
$(EXTENSION).control \
$(NULL)
REGRESS = test-normalize_address test-upgrade
REGRESS_OPTS = --load-extension=fuzzystrmatch --load-extension=postgis --load-extension=$(EXTENSION)
......@@ -62,6 +67,11 @@ sql/test-normalize_address.sql: sql_bits/test_tuples_only_unaligned.sql.in ../..
sql/test-upgrade.sql: | sql
echo 'ALTER EXTENSION ${EXTENSION} UPDATE TO "$(EXTVERSION)next"' > $@
%.control: %.control.in Makefile
cat $< \
| sed -e 's|@EXTVERSION@|$(EXTVERSION)|g' \
> $@
expected/test-upgrade.out: sql/test-upgrade.sql | expected
cp $< $@
......
# postgis tiger geocoder extension
comment = 'PostGIS tiger geocoder and reverse geocoder'
default_version = '@POSTGIS_LIB_VERSION@'
relocatable = false
schema = tiger
requires = 'postgis,fuzzystrmatch'
# postgis tiger geocoder extension
comment = 'PostGIS tiger geocoder and reverse geocoder'
default_version = '@EXTVERSION@'
relocatable = false
schema = tiger
requires = 'postgis,fuzzystrmatch'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment