Skip to content

Commit

Permalink
Make temporal extension work as EXTENSION or not.
Browse files Browse the repository at this point in the history
This is necessary both for supporting versions of PostgreSQL that
don't have EXTENSION support, and for the test infrastructure to work.

The .sql.in file is used both to create the current extension version
.sql file and to generate a .sql file. However, the .sql.in file and
the generated .sql file need to live in the top level directory, or
the MODULE_PATHNAME is not replaced properly.
  • Loading branch information
jeff-davis-aster committed Jun 3, 2011
1 parent 2a6409f commit 0097ec9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ EXTENSION = temporal
EXTVERSION = $(shell grep default_version $(EXTENSION).control | sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/")

DATA = $(filter-out $(wildcard sql/*--*.sql),$(wildcard sql/*.sql))
DATA_built = $(patsubst %.sql.in,%.sql,$(wildcard *.sql.in))
#DOCS = $(wildcard doc/*.txt)
TESTS = $(wildcard test/sql/*.sql)
REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
Expand All @@ -13,7 +14,7 @@ PG91 = $(shell $(PG_CONFIG) --version | grep -qE " 8\.| 9\.0" && echo no
ifeq ($(PG91),yes)
all: sql/$(EXTENSION)--$(EXTVERSION).sql

sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql
sql/$(EXTENSION)--$(EXTVERSION).sql: $(EXTENSION).sql.in
cp $< $@

DATA = $(wildcard sql/*--*.sql) sql/$(EXTENSION)--$(EXTVERSION).sql
Expand Down
File renamed without changes.

0 comments on commit 0097ec9

Please sign in to comment.