1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-11-24 08:52:38 +02:00
pg_probackup/Makefile
Michael Paquier 6de8b16403 Incorporate new test facility in pg_arman
This new facility has the advantage on not relying on static data when
generating the tests making the whole facility more robust. This is
basically taken from the upstream project pg_rman and adapted for the
sake of this pet project, so most of the credit go to Kyotaro Horiguchi
and Amit Langote regarding this facility. However I have adapted a bunch
of things and fixed a lot of redundancy and code duplication.
2016-01-13 14:57:51 +09:00

70 lines
1.4 KiB
Makefile

PROGRAM = pg_arman
SRCS = \
backup.c \
catalog.c \
data.c \
delete.c \
dir.c \
fetch.c \
init.c \
parray.c \
pg_arman.c \
restore.c \
show.c \
status.c \
util.c \
validate.c \
xlog.c \
pgut/pgut.c \
pgut/pgut-port.c
OBJS = $(SRCS:.c=.o)
DOCS = doc/pg_arman.txt
# asciidoc and xmlto are present, so install the html documentation and man
# pages as well. html is part of the vanilla documentation. Man pages need a
# special handling at installation.
ifneq ($(ASCIIDOC),)
ifneq ($(XMLTO),)
man_DOCS = doc/pg_arman.1
DOCS += doc/pg_arman.html doc/README.html
endif # XMLTO
endif # ASCIIDOC
PG_CPPFLAGS = -I$(libpq_srcdir)
PG_LIBS = $(libpq_pgport)
REGRESS = init option show delete backup restore
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
# remove dependency to libxml2 and libxslt
LIBS := $(filter-out -lxml2, $(LIBS))
LIBS := $(filter-out -lxslt, $(LIBS))
$(OBJS): pg_arman.h
# Part related to documentation
# Compile documentation as well is ASCIIDOC and XMLTO are defined
ifneq ($(ASCIIDOC),)
ifneq ($(XMLTO),)
all: docs
docs:
$(MAKE) -C doc/
# Special handling for man pages, they need to be in a dedicated folder
install: install-man
install-man:
$(MKDIR_P) '$(DESTDIR)$(mandir)/man1/'
$(INSTALL_DATA) $(man_DOCS) '$(DESTDIR)$(mandir)/man1/'
endif # XMLTO
endif # ASCIIDOC
# Clean up documentation as well
clean: clean-docs
clean-docs:
$(MAKE) -C doc/ clean