PGVER: add quoting
authorMarko Kreen <markokr@gmail.com>
Mon, 7 May 2012 11:02:53 +0000 (14:02 +0300)
committerMarko Kreen <markokr@gmail.com>
Mon, 7 May 2012 11:02:53 +0000 (14:02 +0300)
This avoids breakage if pg_config is not found
and PGVER stays empty.

Makefile

index 882bc70934db5c9ff9216927e8490d392e0b8d9b..a98f53b0d04d9ba2602134198cb7f2800cd249ce 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -50,8 +50,8 @@ EXTMISC = sql/plproxy--unpackaged--2.3.0.sql
 
 # PostgreSQL version
 PGVER = $(shell $(PG_CONFIG) --version | sed 's/PostgreSQL //')
-SQLMED = $(shell test $(PGVER) "<" "8.4" && echo "false" || echo "true")
-PG91 = $(shell test $(PGVER) "<" "9.1" && echo "false" || echo "true")
+SQLMED = $(shell test "$(PGVER)" "<" "8.4" && echo "false" || echo "true")
+PG91 = $(shell test "$(PGVER)" "<" "9.1" && echo "false" || echo "true")
 
 # SQL/MED available, add foreign data wrapper and regression tests
 ifeq ($(SQLMED), true)