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