More sed tweaks to Makefile for portability.

The -E flag to specify extended regular expressions apparently is
not portable to all platforms, such as CentOS 4.5. Use an uglier
but hopefully more portable basic regular expression in Makefiles.
This commit is contained in:
Josh Kupershmidt 2013-05-21 21:45:47 -04:00
parent dc31920616
commit 95ce24c2a0
3 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ $(error pg_config not found)
endif endif
# version as a number, e.g. 9.1.4 -> 901 # version as a number, e.g. 9.1.4 -> 901
INTVERSION := $(shell echo $$(($$(echo $(VERSION) | sed -E 's/([0-9]+)\.([0-9]+).*/\1*100+\2/')))) INTVERSION := $(shell echo $$(($$(echo $(VERSION) | sed 's/\([[:digit:]]\{1,\}\)\.\([[:digit:]]\{1,\}\).*/\1*100+\2/'))))
# We support PostgreSQL 8.3 and later. # We support PostgreSQL 8.3 and later.
ifeq ($(shell echo $$(($(INTVERSION) < 803))),1) ifeq ($(shell echo $$(($(INTVERSION) < 803))),1)

View File

@ -10,7 +10,7 @@ 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 | awk '{print $$2}')
INTVERSION := $(shell echo $$(($$(echo $(VERSION) | sed -E 's/([0-9]+)\.([0-9]+).*/\1*100+\2/')))) INTVERSION := $(shell echo $$(($$(echo $(VERSION) | sed 's/\([[:digit:]]\{1,\}\)\.\([[:digit:]]\{1,\}\).*/\1*100+\2/'))))
EXTENSION = pg_repack EXTENSION = pg_repack
MODULE_big = $(EXTENSION) MODULE_big = $(EXTENSION)

View File

@ -10,7 +10,7 @@ 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 | awk '{print $$2}')
INTVERSION := $(shell echo $$(($$(echo $(VERSION) | sed -E 's/([0-9]+)\.([0-9]+).*/\1*100+\2/')))) INTVERSION := $(shell echo $$(($$(echo $(VERSION) | sed 's/\([[:digit:]]\{1,\}\)\.\([[:digit:]]\{1,\}\).*/\1*100+\2/' ))))
# #