17
17
# git clone https://github.com/postgrespro/pg_probackup postgresql/contrib/pg_probackup
18
18
# cd postgresql
19
19
# ./configure ... && make
20
- # make --no-print-directory - C contrib/pg_probackup
20
+ # make -C contrib/pg_probackup
21
21
#
22
22
# 4. out of PG source and without PGXS
23
23
# git clone https://git.postgresql.org/git/postgresql.git postgresql-src
24
24
# git clone https://github.com/postgrespro/pg_probackup postgresql-src/contrib/pg_probackup
25
25
# mkdir postgresql-build && cd postgresql-build
26
26
# ../postgresql-src/configure ... && make
27
- # make --no-print-directory - C contrib/pg_probackup
27
+ # make -C contrib/pg_probackup
28
28
#
29
29
top_pbk_srcdir := $(dir $(realpath $(firstword $(MAKEFILE_LIST ) ) ) )
30
30
31
- # get postgres version
32
- PG_MAJORVER != $(MAKE) USE_PGXS=$(USE_PGXS) PG_CONFIG=$(PG_CONFIG) --silent --makefile=$(top_pbk_srcdir)get_pg_version.mk
33
- # $(info Making with PG_MAJORVER=$(PG_MAJORVER))
34
-
35
31
PROGRAM := pg_probackup
36
32
37
33
# pg_probackup sources
@@ -47,18 +43,14 @@ OBJS += src/archive.o src/backup.o src/catalog.o src/checkdb.o src/configure.o s
47
43
BORROWED_H_SRC := \
48
44
src/include/portability/instr_time.h \
49
45
src/bin/pg_basebackup/receivelog.h \
50
- src/bin/pg_basebackup/streamutil.h
46
+ src/bin/pg_basebackup/streamutil.h \
47
+ src/bin/pg_basebackup/walmethods.h
51
48
BORROWED_C_SRC := \
52
49
src/backend/access/transam/xlogreader.c \
53
50
src/backend/utils/hash/pg_crc.c \
54
51
src/bin/pg_basebackup/receivelog.c \
55
- src/bin/pg_basebackup/streamutil.c
56
- ifneq ($(PG_MAJORVER ) , $(findstring $(PG_MAJORVER ) , 9.5 9.6) )
57
- BORROWED_H_SRC += \
58
- src/bin/pg_basebackup/walmethods.h
59
- BORROWED_C_SRC += \
52
+ src/bin/pg_basebackup/streamutil.c \
60
53
src/bin/pg_basebackup/walmethods.c
61
- endif
62
54
63
55
BORROW_DIR := src/borrowed
64
56
BORROWED_H := $(addprefix $(BORROW_DIR ) /, $(notdir $(BORROWED_H_SRC ) ) )
@@ -84,9 +76,6 @@ include $(top_builddir)/src/Makefile.global
84
76
include $(top_srcdir ) /contrib/contrib-global.mk
85
77
endif
86
78
87
- # now we can use standard MAJORVERSION variable instead of calculated PG_MAJORVER
88
- undefine PG_MAJORVER
89
-
90
79
#
91
80
PG_CPPFLAGS = -I$(libpq_srcdir ) ${PTHREAD_CFLAGS} -I$(top_pbk_srcdir ) src -I$(BORROW_DIR )
92
81
PG_CPPFLAGS += -I$(top_pbk_srcdir ) src/fu_util -Wno-declaration-after-statement
@@ -99,11 +88,8 @@ PG_LIBS_INTERNAL = $(libpq_pgport) ${PTHREAD_CFLAGS}
99
88
# additional dependencies on borrowed files
100
89
src/archive.o : $(BORROW_DIR ) /instr_time.h
101
90
src/backup.o src/catchup.o src/pg_probackup.o : $(BORROW_DIR ) /streamutil.h
102
- src/stream.o $(BORROW_DIR ) /receivelog.o $(BORROW_DIR ) /streamutil.o : $(BORROW_DIR ) /receivelog.h
103
- ifneq ($(MAJORVERSION ) , $(findstring $(MAJORVERSION ) , 9.5 9.6) )
91
+ src/stream.o $(BORROW_DIR ) /receivelog.o $(BORROW_DIR ) /streamutil.o $(BORROW_DIR ) /walmethods.o : $(BORROW_DIR ) /receivelog.h
104
92
$(BORROW_DIR ) /receivelog.h : $(BORROW_DIR ) /walmethods.h
105
- $(BORROW_DIR ) /walmethods.o : $(BORROW_DIR ) /receivelog.h
106
- endif
107
93
108
94
# generate separate makefile to handle borrowed files
109
95
borrowed.mk : $(firstword $(MAKEFILE_LIST ) )
0 commit comments