From 95ce24c2a0f07426653bca075c7c55deee74d6e9 Mon Sep 17 00:00:00 2001 From: Josh Kupershmidt Date: Tue, 21 May 2013 21:45:47 -0400 Subject: [PATCH] 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. --- Makefile | 2 +- lib/Makefile | 2 +- regress/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1d6c5c0..6b9b8d6 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ $(error pg_config not found) endif # 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. ifeq ($(shell echo $$(($(INTVERSION) < 803))),1) diff --git a/lib/Makefile b/lib/Makefile index 1035742..c9178c2 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -10,7 +10,7 @@ PG_CONFIG ?= pg_config # version as a number, e.g. 9.1.4 -> 901 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 MODULE_big = $(EXTENSION) diff --git a/regress/Makefile b/regress/Makefile index ece4b5c..6e1a4ee 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -10,7 +10,7 @@ PG_CONFIG ?= pg_config # version as a number, e.g. 9.1.4 -> 901 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/' )))) #