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:
parent
dc31920616
commit
95ce24c2a0
2
Makefile
2
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)
|
||||
|
@ -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)
|
||||
|
@ -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/' ))))
|
||||
|
||||
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user