Skip to content

Commit 8d5870d

Browse files
committed
Change to Makefile.pg to handle compiling against "PostgreSQL 12devel" on windows.
1 parent 35baf39 commit 8d5870d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Makefile.pg

+9-1
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,20 @@ else
77
endif
88
$(info 'PG_CONFIG=$(PG_CONFIG)' )
99
PG_VERSION = $(shell $(PG_CONFIG) --version)
10-
PG_MAJOR = $(shell $(PG_CONFIG) --version | sed -e 's/^PostgreSQL \([0-9][0-9]*[.][0-9][0-9]*\).*$$/\1/gi')
10+
PG_VERSION_UNDEV = $(shell echo $(PG_VERSION) | sed -e 's/devel/.0/')
11+
ifneq "$(PG_VERSION)" "$(PG_VERSION_UNDEV)"
12+
DEV_VERSION=1
13+
else
14+
DEV_VESRION=0
15+
endif
16+
PG_MAJOR = $(shell echo $(PG_VERSION_UNDEV) | sed -e 's/^PostgreSQL \([0-9][0-9]*[.][0-9][0-9]*\).*$$/\1/gi')
1117
PGSQL_VERSION = $(shell echo $(PG_MAJOR) | sed -e 's/[.]//' )
1218

1319
$(info 'PG_VERSION=$(PG_VERSION)')
20+
$(info 'PG_VERSION_UNDEV=$(PG_VERSION_UNDEV)')
1421
$(info 'PG_MAJOR=$(PG_MAJOR)')
1522
$(info 'PGSQL_VERSION=$(PGSQL_VERSION)')
23+
$(info 'DEV_VERSION=$(DEV_VERSION)')
1624

1725
ifeq "$(PG_MAJOR)" '9.4'
1826
CONVERSION = -Werror=conversion

0 commit comments

Comments
 (0)