Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Makefile #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
EXTENSION = currency
EXTVERSION = $(shell grep default_version $(EXTENSION).control | \
sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/")
DATA = $(wildcard sql/*--*.sql)

DATA_built = $(EXTENSION)--$(EXTVERSION).sql

MODULE_big = currency
OBJS = src/currency.o
Expand All @@ -11,13 +12,6 @@ TESTS = setup $(filter-out test/sql/setup.sql test/sql/update.sql, $(wild
REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
REGRESS_OPTS = --inputdir=test --load-language=plpgsql

all: concat

concat:
echo > sql/$(EXTENSION)--$(EXTVERSION).sql
cat $(filter-out $(wildcard sql/*--*.sql),$(wildcard sql/*.sql)) >> sql/$(EXTENSION)--$(EXTVERSION).sql


PG_CONFIG ?= pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
Expand All @@ -26,3 +20,8 @@ ifeq ($(shell test $(VERSION_NUM) -lt 90600; echo $$?),0)
REGRESS := $(filter-out parallel_test, $(REGRESS))
endif

$(EXTENSION)--$(EXTVERSION).sql: concat

concat:
echo > $(EXTENSION)--$(EXTVERSION).sql
cat $(filter-out $(wildcard sql/*--*.sql),$(wildcard sql/*.sql)) >> $(EXTENSION)--$(EXTVERSION).sql