Define PG_ACTUAL_VERSION_NUM

Due to [insert reason here], in the Debian package build process (and
only there), when building frontend code PG_VERSION_NUM appears to be
from the newest libpq-dev version installed, and does not necessarily
match the version of the server the code is being built against.

To work around this distribution-specific package build issue, we'll
define our own substitution variable which is taken from the value
provided in Makefile.global.
This commit is contained in:
Ian Barwick
2019-07-26 18:12:07 +09:00
parent 532a5207e2
commit 018394faa2
2 changed files with 3 additions and 1 deletions

View File

@@ -59,7 +59,8 @@ REPMGRD_OBJS = repmgrd.o repmgrd-physical.o repmgrd-bdr.o configfile.o log.o dbu
DATE=$(shell date "+%Y-%m-%d") DATE=$(shell date "+%Y-%m-%d")
repmgr_version.h: repmgr_version.h.in repmgr_version.h: repmgr_version.h.in
$(SED) '0,/REPMGR_VERSION_DATE/s,\(REPMGR_VERSION_DATE\).*,\1 "$(DATE)",' $< >$@ $(SED) '0,/REPMGR_VERSION_DATE/s,\(REPMGR_VERSION_DATE\).*,\1 "$(DATE)",' $< >$@; \
$(SED) '0,/PG_ACTUAL_VERSION_NUM/s,\(PG_ACTUAL_VERSION_NUM\).*,\1 $(VERSION_NUM),' $< >$@
$(REPMGR_CLIENT_OBJS): repmgr-client.h repmgr_version.h $(REPMGR_CLIENT_OBJS): repmgr-client.h repmgr_version.h

View File

@@ -2,3 +2,4 @@
#define REPMGR_VERSION "4.5dev" #define REPMGR_VERSION "4.5dev"
#define REPMGR_VERSION_NUM 40500 #define REPMGR_VERSION_NUM 40500
#define REPMGR_RELEASE_DATE "2019-XX-XX" #define REPMGR_RELEASE_DATE "2019-XX-XX"
#define PG_ACTUAL_VERSION_NUM