Skip to content

Commit 90460df

Browse files
committed
Add last pg_arman.
1 parent 80d2f4c commit 90460df

26 files changed

+1176
-426
lines changed

contrib/pg_arman/Makefile

Lines changed: 13 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ OBJS = backup.o \
1616
datapagemap.o \
1717
parsexlog.o \
1818
xlogreader.o \
19+
streamutil.o \
20+
receivelog.o \
1921
pgut/pgut.o \
2022
pgut/pgut-port.o
2123

@@ -25,17 +27,7 @@ EXTRA_CLEAN = datapagemap.c datapagemap.h xlogreader.c
2527

2628
REGRESS = init option show delete backup restore
2729

28-
# asciidoc and xmlto are present, so install the html documentation and man
29-
# pages as well. html is part of the vanilla documentation. Man pages need a
30-
# special handling at installation.
31-
ifneq ($(ASCIIDOC),)
32-
ifneq ($(XMLTO),)
33-
man_DOCS = doc/pg_arman.1
34-
DOCS += doc/pg_arman.html doc/README.html
35-
endif # XMLTO
36-
endif # ASCIIDOC
37-
38-
all: docs datapagemap.h pg_arman
30+
all: datapagemap.h receivelog.h streamutil.h pg_arman
3931
ifdef $(USE_PGXS)
4032
PG_CONFIG = pg_config
4133
PGXS := $(shell $(PG_CONFIG) --pgxs)
@@ -55,11 +47,9 @@ top_builddir=../..
5547
include $(top_builddir)/src/Makefile.global
5648
include $(top_srcdir)/contrib/contrib-global.mk
5749
endif
58-
PG_CPPFLAGS = -I$(libpq_srcdir)
50+
PG_CPPFLAGS = -I$(libpq_srcdir) ${PTHREAD_CFLAGS}
5951
override CPPFLAGS := -DFRONTEND $(CPPFLAGS) $(PG_CPPFLAGS)
60-
PG_LIBS = $(libpq_pgport)
61-
62-
52+
PG_LIBS = $(libpq_pgport) ${PTHREAD_CFLAGS}
6353

6454
envtest:
6555
: top_srcdir=$(top_srcdir)
@@ -74,33 +64,14 @@ datapagemap.c: % : $(top_srcdir)/src/bin/pg_rewind/%
7464
rm -f $@ && $(LN_S) $< .
7565
datapagemap.h: % : $(top_srcdir)/src/bin/pg_rewind/%
7666
rm -f && $(LN_S) $< .
77-
78-
# Part related to documentation
79-
# Compile documentation as well is ASCIIDOC and XMLTO are defined
80-
ifneq ($(ASCIIDOC),)
81-
ifneq ($(XMLTO),)
82-
docs:
83-
$(MAKE) -C doc/
84-
85-
# Special handling for man pages, they need to be in a dedicated folder
86-
install: install-man
87-
88-
install-man:
89-
$(MKDIR_P) '$(DESTDIR)$(mandir)/man1/'
90-
$(INSTALL_DATA) $(man_DOCS) '$(DESTDIR)$(mandir)/man1/'
91-
else
92-
docs:
93-
@echo "No docs to build"
94-
endif # XMLTO
95-
else
96-
docs:
97-
@echo "No docs to build"
98-
endif # ASCIIDOC
99-
100-
# Clean up documentation as well
101-
clean: clean-docs
102-
clean-docs:
103-
$(MAKE) -C doc/ clean
67+
receivelog.c: % : $(top_srcdir)/src/bin/pg_basebackup/%
68+
rm -f && $(LN_S) $< .
69+
receivelog.h: % : $(top_srcdir)/src/bin/pg_basebackup/%
70+
rm -f && $(LN_S) $< .
71+
streamutil.c: % : $(top_srcdir)/src/bin/pg_basebackup/%
72+
rm -f && $(LN_S) $< .
73+
streamutil.h: % : $(top_srcdir)/src/bin/pg_basebackup/%
74+
rm -f && $(LN_S) $< .
10475

10576
# Disable make check
10677
check:

contrib/pg_arman/README renamed to contrib/pg_arman/README.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,7 @@ pg_arman has been tested on Linux and Unix-based platforms.
3838
Documentation
3939
-------------
4040

41-
All the documentation is maintained in doc/ as text file, that is then
42-
fetched by asciidoc to generate automatically man pages and html
43-
documentation.
44-
45-
In order to generate the documentation, the variables XMLTO and ASCIIDOC
46-
need to be set to proper values indicating where are located the binaries
47-
of respectively xmlto and asciidoc. An example of build is as follows:
48-
49-
make top_srcdir=<path to PostgreSQL source tree> \
50-
ASCIIDOC=asciidoc XMLTO=xmlto
51-
52-
They could as well be set as environment variables for development
53-
purposes.
54-
55-
On OSX, it is necessary to set XML_CATALOG_FILES to point to the correct
56-
xml catalogs. In the case of an environment with Homebrew after having
57-
install xmlto and asciidoc:
58-
59-
export XML_CATALOG_FILES="/usr/local/etc/xml/catalog"
41+
All the documentation you can find [here](doc/pg_arman.md).
6042

6143
Regression tests
6244
----------------

0 commit comments

Comments
 (0)