mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 15:16:29 +00:00
The BDR 2.x support was conceptual only and was never used in production. As BDR 2.x will be EOL'd shortly, there is no risk it will be needed.
133 lines
3.3 KiB
Makefile
133 lines
3.3 KiB
Makefile
# -*-makefile-*-
|
|
# Makefile.in
|
|
# @configure_input@
|
|
|
|
repmgr_subdir = .
|
|
repmgr_top_builddir = .
|
|
|
|
MODULE_big = repmgr
|
|
|
|
EXTENSION = repmgr
|
|
|
|
DATA = \
|
|
repmgr--unpackaged--4.0.sql \
|
|
repmgr--4.0.sql \
|
|
repmgr--4.0--4.1.sql \
|
|
repmgr--4.1.sql \
|
|
repmgr--4.1--4.2.sql \
|
|
repmgr--4.2.sql \
|
|
repmgr--4.2--4.3.sql \
|
|
repmgr--4.3.sql \
|
|
repmgr--4.3--4.4.sql \
|
|
repmgr--4.4.sql \
|
|
repmgr--4.4--5.0.sql \
|
|
repmgr--5.0.sql \
|
|
repmgr--5.0--5.1.sql \
|
|
repmgr--5.1.sql
|
|
|
|
REGRESS = repmgr_extension
|
|
|
|
# Hacky workaround to install the binaries
|
|
SCRIPTS_built = repmgr repmgrd
|
|
|
|
all: \
|
|
repmgr \
|
|
repmgrd
|
|
|
|
# When in development add -Werror
|
|
PG_CPPFLAGS = -std=gnu89 -I$(includedir_internal) -I$(libpq_srcdir) -Wall -Wmissing-prototypes -Wmissing-declarations $(EXTRA_CFLAGS)
|
|
SHLIB_LINK = $(libpq)
|
|
|
|
|
|
|
|
OBJS = \
|
|
repmgr.o
|
|
|
|
include Makefile.global
|
|
|
|
ifeq ($(vpath_build),yes)
|
|
HEADERS = $(wildcard *.h)
|
|
else
|
|
HEADERS_built = $(wildcard *.h)
|
|
endif
|
|
|
|
$(info Building against PostgreSQL $(MAJORVERSION))
|
|
|
|
REPMGR_CLIENT_OBJS = repmgr-client.o \
|
|
repmgr-action-primary.o repmgr-action-standby.o repmgr-action-witness.o \
|
|
repmgr-action-cluster.o repmgr-action-node.o repmgr-action-service.o repmgr-action-daemon.o \
|
|
configfile.o configfile-scan.o log.o strutil.o controldata.o dirutil.o compat.o dbutils.o sysutils.o
|
|
REPMGRD_OBJS = repmgrd.o repmgrd-physical.o configfile.o configfile-scan.o log.o dbutils.o strutil.o controldata.o compat.o sysutils.o
|
|
DATE=$(shell date "+%Y-%m-%d")
|
|
|
|
repmgr_version.h: repmgr_version.h.in
|
|
$(SED) -E 's/REPMGR_VERSION_DATE.*""/REPMGR_VERSION_DATE "$(DATE)"/' $< >$@; \
|
|
$(SED) -i -E 's/PG_ACTUAL_VERSION_NUM/PG_ACTUAL_VERSION_NUM $(VERSION_NUM)/' $@
|
|
|
|
configfile-scan.c: configfile-scan.l
|
|
|
|
$(REPMGR_CLIENT_OBJS): repmgr-client.h repmgr_version.h
|
|
|
|
repmgr: $(REPMGR_CLIENT_OBJS)
|
|
$(CC) $(CFLAGS) $(REPMGR_CLIENT_OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
|
|
|
|
repmgrd: $(REPMGRD_OBJS)
|
|
$(CC) $(CFLAGS) $(REPMGRD_OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
|
|
|
|
$(REPMGR_CLIENT_OBJS): $(HEADERS)
|
|
$(REPMGRD_OBJS): $(HEADERS)
|
|
|
|
# Ensure Makefiles are up-to-date (should we move this to Makefile.global?)
|
|
Makefile: Makefile.in config.status configure
|
|
./config.status $@
|
|
|
|
Makefile.global: Makefile.global.in config.status configure
|
|
./config.status $@
|
|
|
|
doc: repmgr_version.h
|
|
$(MAKE) -C doc html
|
|
|
|
doc-repmgr.html: repmgr_version.h
|
|
$(MAKE) -C doc repmgr.html
|
|
|
|
doc-repmgr-A4.pdf: repmgr_version.h
|
|
$(MAKE) -C doc repmgr-A4.pdf
|
|
|
|
doc-repmgr-US.pdf: repmgr_version.h
|
|
$(MAKE) -C doc repmgr-US.pdf
|
|
|
|
install-doc: doc
|
|
$(MAKE) -C doc install
|
|
|
|
clean: additional-clean
|
|
|
|
maintainer-clean: additional-maintainer-clean
|
|
|
|
additional-clean:
|
|
rm -f *.o
|
|
rm -f repmgr_version.h
|
|
$(MAKE) -C doc clean
|
|
|
|
additional-maintainer-clean: clean
|
|
$(MAKE) -C doc maintainer-clean
|
|
rm -f config.status config.log
|
|
rm -f config.h
|
|
rm -f repmgr_version.h
|
|
rm -f Makefile
|
|
rm -f Makefile.global
|
|
@rm -rf autom4te.cache/
|
|
|
|
ifeq ($(MAJORVERSION),$(filter $(MAJORVERSION),9.3 9.4))
|
|
# We must emulate SCRIPTS_built for Pg < 9.5 as PGXS doesn't support it
|
|
install: install-scripts
|
|
install-scripts:
|
|
$(INSTALL_SCRIPT) $(SCRIPTS_built) '$(DESTDIR)$(bindir)/'
|
|
.PHONY: install-scripts
|
|
installdirs: installdirs-scripts
|
|
installdirs-scripts:
|
|
$(MKDIR_P) '$(DESTDIR)$(bindir)'
|
|
.PHONY: installdirs-scripts
|
|
endif
|
|
|
|
.PHONY: doc doc-repmgr.html doc-repmgr-A4.pdf doc-repmgr-US.pdf install-doc
|