Skip to content

Commit 366290b

Browse files
committed
Remove output plugin from Makefile and make 9.4 automatically detected there
1 parent 0760415 commit 366290b

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

Makefile

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,26 @@ SHLIB_LINK = $(libpq)
2020

2121
REGRESS = init basic extended toasted replication_set add_table matview bidirectional foreign_key functions drop
2222

23-
ifdef PG94
24-
PG_CPPFLAGS += -Icompat
25-
OBJS += compat/pglogical_compat.o
26-
endif
27-
2823
ifdef USE_PGXS
2924

25+
3026
# For regression checks
3127
# http://www.postgresql.org/message-id/CAB7nPqTsR5o3g-fBi6jbsVdhfPiLFWQ_0cGU5=94Rv_8W3qvFA@mail.gmail.com
3228
# this makes "make check" give a useful error
3329
abs_top_builddir = .
3430
NO_TEMP_INSTALL = yes
3531

36-
PG_CPPFLAGS += -Ipglogical_output
37-
3832
PG_CONFIG = pg_config
33+
34+
#PG_CPPFLAGS += -Ipglogical_output
35+
36+
PGVER := $(shell $(PG_CONFIG) --version | sed 's/[^0-9\.]//g' | awk -F . '{ print $$1$$2 }')
37+
38+
ifeq ($(PGVER),94)
39+
PG_CPPFLAGS += -Icompat
40+
OBJS += compat/pglogical_compat.o
41+
endif
42+
3943
PGXS := $(shell $(PG_CONFIG) --pgxs)
4044
include $(PGXS)
4145

@@ -54,7 +58,7 @@ pglogical_create_subscriber: pglogical_create_subscriber.o pglogical_fe.o
5458
# write permissions to their production PostgreSQL install (right?)
5559
# but this is still not ideal.
5660

57-
ifdef PG94
61+
ifeq ($(PGVER),94)
5862
regresscheck: ;
5963
else
6064
regresscheck:
@@ -66,13 +70,7 @@ regresscheck:
6670
--create-role=logical \
6771
$(REGRESS)
6872

69-
pglogical_output:
70-
$(MAKE) -C pglogical_output clean all
71-
72-
pglogical_output_install: pglogical_output
73-
$(MAKE) -C pglogical_output install
74-
75-
check: pglogical_output_install install regresscheck ;
73+
check: install regresscheck ;
7674

7775
endif
7876

@@ -93,4 +91,4 @@ EXTRA_REGRESS_OPTS += $(top_srcdir)/contrib/regress-postgresql.conf
9391

9492
endif
9593

96-
.PHONY: regresscheck pglogical_output pglogical_output_install
94+
.PHONY: regresscheck

0 commit comments

Comments
 (0)