2014-01-27 06:02:56 +03:00
|
|
|
PROGRAM = pg_arman
|
2009-12-08 02:21:28 +02:00
|
|
|
SRCS = \
|
|
|
|
backup.c \
|
|
|
|
catalog.c \
|
|
|
|
data.c \
|
|
|
|
delete.c \
|
|
|
|
dir.c \
|
2013-12-12 21:55:39 +03:00
|
|
|
fetch.c \
|
2009-12-08 02:21:28 +02:00
|
|
|
init.c \
|
|
|
|
parray.c \
|
2014-01-27 06:02:56 +03:00
|
|
|
pg_arman.c \
|
2009-12-08 02:21:28 +02:00
|
|
|
restore.c \
|
|
|
|
show.c \
|
2013-12-12 17:54:52 +03:00
|
|
|
status.c \
|
2009-12-08 02:21:28 +02:00
|
|
|
util.c \
|
|
|
|
validate.c \
|
|
|
|
xlog.c \
|
|
|
|
pgut/pgut.c \
|
|
|
|
pgut/pgut-port.c
|
|
|
|
OBJS = $(SRCS:.c=.o)
|
|
|
|
|
2014-01-27 06:02:56 +03:00
|
|
|
DOCS = doc/pg_arman.txt
|
2014-01-11 21:03:30 +03:00
|
|
|
|
|
|
|
# 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),)
|
2014-01-27 06:02:56 +03:00
|
|
|
man_DOCS = doc/pg_arman.1
|
|
|
|
DOCS += doc/pg_arman.html doc/README.html
|
2014-01-11 21:03:30 +03:00
|
|
|
endif # XMLTO
|
|
|
|
endif # ASCIIDOC
|
2013-12-24 21:48:36 +03:00
|
|
|
|
2009-12-08 02:21:28 +02:00
|
|
|
PG_CPPFLAGS = -I$(libpq_srcdir)
|
|
|
|
PG_LIBS = $(libpq_pgport)
|
|
|
|
|
2016-01-13 07:57:51 +02:00
|
|
|
REGRESS = init option show delete backup restore
|
2009-12-08 02:21:28 +02:00
|
|
|
|
|
|
|
PG_CONFIG = pg_config
|
|
|
|
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
|
|
|
include $(PGXS)
|
|
|
|
|
2010-06-01 10:10:49 +03:00
|
|
|
# remove dependency to libxml2 and libxslt
|
|
|
|
LIBS := $(filter-out -lxml2, $(LIBS))
|
|
|
|
LIBS := $(filter-out -lxslt, $(LIBS))
|
|
|
|
|
2014-01-27 06:02:56 +03:00
|
|
|
$(OBJS): pg_arman.h
|
2014-01-11 21:03:30 +03:00
|
|
|
|
|
|
|
# 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:
|
2014-01-13 13:41:59 +03:00
|
|
|
$(MKDIR_P) '$(DESTDIR)$(mandir)/man1/'
|
|
|
|
$(INSTALL_DATA) $(man_DOCS) '$(DESTDIR)$(mandir)/man1/'
|
2014-01-11 21:03:30 +03:00
|
|
|
endif # XMLTO
|
|
|
|
endif # ASCIIDOC
|
|
|
|
|
|
|
|
# Clean up documentation as well
|
|
|
|
clean: clean-docs
|
|
|
|
clean-docs:
|
|
|
|
$(MAKE) -C doc/ clean
|