Allow building with PostgreSQL 10rc1

This is what we get:

    $ pg_config --version
    PostgreSQL 10rc1
This commit is contained in:
Daniele Varrazzo 2017-09-25 02:21:13 +01:00
parent a7e0b6748e
commit f996fd8fb3
3 changed files with 6 additions and 6 deletions

View File

@ -12,13 +12,13 @@ EXTENSION = pg_repack
.PHONY: dist/$(EXTENSION)-$(EXTVERSION).zip .PHONY: dist/$(EXTENSION)-$(EXTVERSION).zip
# Pull out PostgreSQL version number from pg_config # Pull out PostgreSQL version number from pg_config
VERSION := $(shell $(PG_CONFIG) --version | awk '{print $$2}') VERSION := $(shell $(PG_CONFIG) --version | sed 's/.* \([[:digit:].]\{1,\}\).*/\1/')
ifeq ("$(VERSION)","") ifeq ("$(VERSION)","")
$(error pg_config not found) $(error pg_config not found)
endif endif
# PostgreSQL version as a number, e.g. 9.1.4 -> 901 # PostgreSQL version as a number, e.g. 9.1.4 -> 901
INTVERSION := $(shell echo $$(($$(echo $(VERSION) | sed 's/\([[:digit:]]\{1,\}\)\.\([[:digit:]]\{1,\}\).*/\1*100+\2/')))) INTVERSION := $(shell echo $$(($$(echo $(VERSION).0 | sed 's/\([[:digit:]]\{1,\}\)\.\([[:digit:]]\{1,\}\).*/\1*100+\2/'))))
# The version number of the library # The version number of the library
EXTVERSION = $(shell grep '"version":' META.json | head -1 \ EXTVERSION = $(shell grep '"version":' META.json | head -1 \

View File

@ -9,8 +9,8 @@
PG_CONFIG ?= pg_config PG_CONFIG ?= pg_config
# version as a number, e.g. 9.1.4 -> 901 # version as a number, e.g. 9.1.4 -> 901
VERSION := $(shell $(PG_CONFIG) --version | awk '{print $$2}') VERSION := $(shell $(PG_CONFIG) --version | sed 's/.* \([[:digit:].]\{1,\}\).*/\1/')
INTVERSION := $(shell echo $$(($$(echo $(VERSION) | sed 's/\([[:digit:]]\{1,\}\)\.\([[:digit:]]\{1,\}\).*/\1*100+\2/')))) INTVERSION := $(shell echo $$(($$(echo $(VERSION).0 | sed 's/\([[:digit:]]\{1,\}\)\.\([[:digit:]]\{1,\}\).*/\1*100+\2/'))))
EXTENSION = pg_repack EXTENSION = pg_repack
MODULE_big = $(EXTENSION) MODULE_big = $(EXTENSION)

View File

@ -9,8 +9,8 @@
PG_CONFIG ?= pg_config PG_CONFIG ?= pg_config
# version as a number, e.g. 9.1.4 -> 901 # version as a number, e.g. 9.1.4 -> 901
VERSION := $(shell $(PG_CONFIG) --version | awk '{print $$2}') VERSION := $(shell $(PG_CONFIG) --version | sed 's/.* \([[:digit:].]\{1,\}\).*/\1/')
INTVERSION := $(shell echo $$(($$(echo $(VERSION) | sed 's/\([[:digit:]]\{1,\}\)\.\([[:digit:]]\{1,\}\).*/\1*100+\2/' )))) INTVERSION := $(shell echo $$(($$(echo $(VERSION).0 | sed 's/\([[:digit:]]\{1,\}\)\.\([[:digit:]]\{1,\}\).*/\1*100+\2/'))))
# #