mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 08:36:30 +00:00
Update Makefile
Add include file dependencies (see caveat in file). Also update comments.
This commit is contained in:
21
Makefile
21
Makefile
@@ -2,16 +2,17 @@
|
|||||||
# Makefile
|
# Makefile
|
||||||
# Copyright (c) 2ndQuadrant, 2010-2016
|
# Copyright (c) 2ndQuadrant, 2010-2016
|
||||||
|
|
||||||
|
HEADERS = $(wildcard *.h)
|
||||||
|
|
||||||
repmgrd_OBJS = dbutils.o config.o repmgrd.o log.o strutil.o
|
repmgrd_OBJS = dbutils.o config.o repmgrd.o log.o strutil.o
|
||||||
repmgr_OBJS = dbutils.o check_dir.o config.o repmgr.o log.o strutil.o
|
repmgr_OBJS = dbutils.o check_dir.o config.o repmgr.o log.o strutil.o
|
||||||
|
|
||||||
HEADERS = $(wildcard *.h)
|
|
||||||
|
|
||||||
DATA = repmgr.sql uninstall_repmgr.sql
|
DATA = repmgr.sql uninstall_repmgr.sql
|
||||||
|
|
||||||
PG_CPPFLAGS = -I$(libpq_srcdir)
|
PG_CPPFLAGS = -I$(libpq_srcdir)
|
||||||
PG_LIBS = $(libpq_pgport)
|
PG_LIBS = $(libpq_pgport)
|
||||||
|
|
||||||
|
|
||||||
all: repmgrd repmgr
|
all: repmgrd repmgr
|
||||||
$(MAKE) -C sql
|
$(MAKE) -C sql
|
||||||
|
|
||||||
@@ -22,6 +23,12 @@ repmgrd: $(repmgrd_OBJS)
|
|||||||
repmgr: $(repmgr_OBJS)
|
repmgr: $(repmgr_OBJS)
|
||||||
$(CC) -o repmgr $(CFLAGS) $(repmgr_OBJS) $(PG_LIBS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS)
|
$(CC) -o repmgr $(CFLAGS) $(repmgr_OBJS) $(PG_LIBS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS)
|
||||||
|
|
||||||
|
# Make all objects depend on all include files. This is a bit of a
|
||||||
|
# shotgun approach, but the codebase is small enough that a complete rebuild
|
||||||
|
# is very fast anyway.
|
||||||
|
$(repmgr_OBJS): $(HEADERS)
|
||||||
|
$(repmgrd_OBJS): $(HEADERS)
|
||||||
|
|
||||||
ifdef USE_PGXS
|
ifdef USE_PGXS
|
||||||
PG_CONFIG = pg_config
|
PG_CONFIG = pg_config
|
||||||
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
||||||
@@ -33,8 +40,8 @@ include $(top_builddir)/src/Makefile.global
|
|||||||
include $(top_srcdir)/contrib/contrib-global.mk
|
include $(top_srcdir)/contrib/contrib-global.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# XXX: Try to use PROGRAM construct (see pgxs.mk) someday. Right now
|
# XXX: This overrides the pgxs install target - we're building two binaries,
|
||||||
# is overriding pgxs install.
|
# which is not supported by pgxs.mk's PROGRAM construct.
|
||||||
install: install_prog install_ext
|
install: install_prog install_ext
|
||||||
|
|
||||||
install_prog:
|
install_prog:
|
||||||
@@ -45,6 +52,12 @@ install_prog:
|
|||||||
install_ext:
|
install_ext:
|
||||||
$(MAKE) -C sql install
|
$(MAKE) -C sql install
|
||||||
|
|
||||||
|
# Distribution-specific package building targets
|
||||||
|
# ----------------------------------------------
|
||||||
|
#
|
||||||
|
# XXX we recommend using the PGDG-supplied packages where possible;
|
||||||
|
# see README.md for details.
|
||||||
|
|
||||||
install_rhel:
|
install_rhel:
|
||||||
mkdir -p '$(DESTDIR)/etc/init.d/'
|
mkdir -p '$(DESTDIR)/etc/init.d/'
|
||||||
$(INSTALL_PROGRAM) RHEL/repmgrd.init '$(DESTDIR)/etc/init.d/repmgrd'
|
$(INSTALL_PROGRAM) RHEL/repmgrd.init '$(DESTDIR)/etc/init.d/repmgrd'
|
||||||
|
|||||||
Reference in New Issue
Block a user