Skip to content

Commit 4211fd8

Browse files
committed
Try build pg_arman as contrib.
1 parent e01d84e commit 4211fd8

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

Makefile

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,35 @@ OBJS = backup.o \
2323

2424
EXTRA_CLEAN = datapagemap.c datapagemap.h xlogreader.c receivelog.c receivelog.h streamutil.c streamutil.h logging.h
2525

26-
PG_CPPFLAGS = -I$(libpq_srcdir) ${PTHREAD_CFLAGS}
27-
override CPPFLAGS := -DFRONTEND $(CPPFLAGS)
28-
PG_LIBS = $(libpq_pgport) ${PTHREAD_LIBS} ${PTHREAD_CFLAGS}
29-
3026
REGRESS = init option show delete backup restore
3127

3228
all: checksrcdir datapagemap.h logging.h receivelog.h streamutil.h pg_arman
3329

30+
MAKE_GLOBAL="../../src/Makefile.global"
31+
TEST_GLOBAL:=$(shell test -e ../../src/Makefile.global)
32+
ifeq ($(.SHELLSTATUS),1)
33+
PG_CONFIG = pg_config
34+
PGXS := $(shell $(PG_CONFIG) --pgxs)
35+
include $(PGXS)
36+
37+
.PHONY: checksrcdir
38+
checksrcdir:
39+
ifndef top_srcdir
40+
@echo "You must have PostgreSQL source tree available to compile."
41+
@echo "Pass the path to the PostgreSQL source tree to make, in the top_srcdir"
42+
@echo "variable: \"make top_srcdir=<path to PostgreSQL source tree>\""
43+
@exit 1
44+
endif
45+
else
46+
subdir=contrib/pg_arman
47+
top_builddir=../..
48+
include $(top_builddir)/src/Makefile.global
49+
include $(top_srcdir)/contrib/contrib-global.mk
50+
endif
51+
PG_CPPFLAGS = -I$(libpq_srcdir) ${PTHREAD_CFLAGS}
52+
override CPPFLAGS := -DFRONTEND $(CPPFLAGS) $(PG_CPPFLAGS)
53+
PG_LIBS = $(libpq_pgport) ${PTHREAD_CFLAGS}
54+
3455
# This rule's only purpose is to give the user instructions on how to pass
3556
# the path to PostgreSQL source tree to the makefile.
3657
.PHONY: checksrcdir
@@ -61,8 +82,3 @@ streamutil.c: % : $(top_srcdir)/src/bin/pg_basebackup/%
6182
rm -f && $(LN_S) $< .
6283
streamutil.h: % : $(top_srcdir)/src/bin/pg_basebackup/%
6384
rm -f && $(LN_S) $< .
64-
65-
PG_CONFIG = pg_config
66-
PGXS := $(shell $(PG_CONFIG) --pgxs)
67-
include $(PGXS)
68-

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy