mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 08:36:30 +00:00
Dynamically generate "repmgr_version.h"
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -35,6 +35,7 @@ lib*.pc
|
|||||||
/config.log
|
/config.log
|
||||||
/config.status
|
/config.status
|
||||||
/config.h
|
/config.h
|
||||||
|
/repmgr_version.h
|
||||||
|
|
||||||
# other
|
# other
|
||||||
/.lineno
|
/.lineno
|
||||||
|
|||||||
@@ -35,8 +35,12 @@ REPMGR_CLIENT_OBJS = repmgr-client.o \
|
|||||||
repmgr-action-primary.o repmgr-action-standby.o repmgr-action-bdr.o repmgr-action-cluster.o repmgr-action-node.o \
|
repmgr-action-primary.o repmgr-action-standby.o repmgr-action-bdr.o repmgr-action-cluster.o repmgr-action-node.o \
|
||||||
configfile.o log.o strutil.o controldata.o dirutil.o compat.o dbutils.o
|
configfile.o log.o strutil.o controldata.o dirutil.o compat.o dbutils.o
|
||||||
REPMGRD_OBJS = repmgrd.o repmgrd-physical.o repmgrd-bdr.o configfile.o log.o dbutils.o strutil.o controldata.o
|
REPMGRD_OBJS = repmgrd.o repmgrd-physical.o repmgrd-bdr.o configfile.o log.o dbutils.o strutil.o controldata.o
|
||||||
|
DATE=$(shell date "+%Y-%m-%d")
|
||||||
|
|
||||||
$(REPMGR_CLIENT_OBJS): repmgr-client.h
|
repmgr_version.h: repmgr_version.h.in
|
||||||
|
sed '0,/REPMGR_VERSION_DATE/s,\(REPMGR_VERSION_DATE\).*,\1 "$(DATE)",' $< >$@
|
||||||
|
|
||||||
|
$(REPMGR_CLIENT_OBJS): repmgr-client.h repmgr_version.h
|
||||||
|
|
||||||
repmgr: $(REPMGR_CLIENT_OBJS)
|
repmgr: $(REPMGR_CLIENT_OBJS)
|
||||||
$(CC) $(CFLAGS) $(REPMGR_CLIENT_OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
|
$(CC) $(CFLAGS) $(REPMGR_CLIENT_OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#ifndef _VERSION_H_
|
#ifndef _VERSION_H_
|
||||||
#define _VERSION_H_
|
#define _VERSION_H_
|
||||||
|
|
||||||
|
#define REPMGR_VERSION_DATE ""
|
||||||
#define REPMGR_VERSION "4.0dev"
|
#define REPMGR_VERSION "4.0dev"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Reference in New Issue
Block a user