Skip to content

Commit

Permalink
Move updates to separate folder
Browse files Browse the repository at this point in the history
Inspired by [pg_partman][1].

[1]: https://github.com/keithf4/pg_partman
  • Loading branch information
jasonmp85 committed May 27, 2015
1 parent d9af8e5 commit 54cd9dd
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Expand Up @@ -57,7 +57,4 @@
!/test/expected/*.out

# ignore latest install file
/sql/pg_shard--*.sql

# keep upgrade files
!/sql/pg_shard--*--.sql
sql/*--*.sql
15 changes: 7 additions & 8 deletions Makefile
Expand Up @@ -11,8 +11,7 @@ EXTENSION = $(shell grep -m 1 '"name":' META.json | sed -e 's/[[:space:]]*"name"
EXTVERSION = $(shell grep default_version $(EXTENSION).control | sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/")

# installation scripts
DATA = $(wildcard sql/*--*.sql)
DATA_built = sql/$(EXTENSION)--$(EXTVERSION).sql
DATA = $(wildcard updates/*--*.sql)

# documentation and executables
DOCS = $(wildcard doc/*.md)
Expand All @@ -34,7 +33,7 @@ REGRESS_OPTS += --launcher=./test/launcher.sh # use custom launcher for tests
# add coverage flags if requested
ifeq ($(enable_coverage),yes)
PG_CPPFLAGS += --coverage
SHLIB_LINK += --coverage
SHLIB_LINK += --coverage
endif

# Handle a Linux issue where the loader might resolve ambiguous symbols to
Expand All @@ -45,7 +44,11 @@ ifeq ($(OS), Linux)
SHLIB_LINK += -Wl,-Bsymbolic
endif

# let the test makefile tell us what objects to build
# be explicit about the default target
all:

# delegate to subdirectory makefiles as needed
include sql/Makefile
include test/Makefile

# detect whether to build with pgxs or build in-tree
Expand All @@ -71,7 +74,3 @@ PG93 = $(shell echo $(MAJORVERSION) | grep -qE "8\.|9\.[012]" && echo no || echo
ifeq ($(PG93),no)
$(error PostgreSQL 9.3 or higher is required to compile this extension)
endif

# define build process for latest install file
sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql
cp $< $@
5 changes: 5 additions & 0 deletions sql/Makefile
@@ -0,0 +1,5 @@
DATA_built += sql/$(EXTENSION)--$(EXTVERSION).sql

# define build process for latest install file
sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql
cp $< $@
File renamed without changes.
File renamed without changes.

0 comments on commit 54cd9dd

Please sign in to comment.