Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c95277f

Browse files
committed
Simplified shardman implementation
1 parent ab422bd commit c95277f

File tree

4 files changed

+708
-1344
lines changed

4 files changed

+708
-1344
lines changed

Makefile

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,25 @@
1+
# contrib/pg_shardman/Makefile
2+
13
# the extension name
24
EXTENSION = pg_shardman
3-
EXTVERSION = 0.0.1
45
# This file will be executed by CREATE EXTENSION, so let pgxs install it.
5-
DATA_built = $(EXTENSION)--$(EXTVERSION).sql
6-
6+
DATA = pg_shardman--1.0.sql
77

88
MODULE_big = pg_shardman
9-
OBJS = src/pg_shardman.o src/udf.o src/shard.o src/copypart.o src/timeutils.o \
10-
src/shardman_hooks.o
9+
OBJS = src/pg_shardman.o
10+
PGFILEDESC = "pg_shardman - sharding for Postgres"
1111

12-
PG_CPPFLAGS += -Isrc/include
12+
PG_CPPFLAGS = -I$(libpq_srcdir)
13+
SHLIB_LINK = $(libpq)
1314

14-
# You can specify path to pg_config in PG_CONFIG var
15-
ifndef PG_CONFIG
16-
PG_CONFIG := pg_config
17-
endif
15+
ifdef USE_PGXS
16+
PG_CONFIG = pg_config
1817
PGXS := $(shell $(PG_CONFIG) --pgxs)
19-
20-
INCLUDEDIR := $(shell $(PG_CONFIG) --includedir)
21-
PG_CPPFLAGS += -I$(INCLUDEDIR) # add server's include directory for libpq-fe.h
22-
SHLIB_LINK += -lpq # add libpq
23-
24-
EXTRA_CLEAN = $(EXTENSION)--$(EXTVERSION).sql
25-
2618
include $(PGXS)
27-
28-
# Build big sql file from pieces
29-
$(EXTENSION)--$(EXTVERSION).sql: init.sql membership.sql shard.sql
30-
cat $^ > $@
19+
else
20+
SHLIB_PREREQS = submake-libpq
21+
subdir = contrib/pg_shardman
22+
top_builddir = ../..
23+
include $(top_builddir)/src/Makefile.global
24+
include $(top_srcdir)/contrib/contrib-global.mk
25+
endif

0 commit comments

Comments
 (0)