diff --git a/.gitignore b/.gitignore index 189df09f6..a9aad8322 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,6 @@ pgtap.so regression.* *.html bbin -/sql/pgtap--0.* \ No newline at end of file +/sql/pgtap--1.* +/sql/pgtap-core--* +/sql/pgtap-schema--* diff --git a/Makefile b/Makefile index 12c826b35..be2f79b8d 100644 --- a/Makefile +++ b/Makefile @@ -75,14 +75,20 @@ OSNAME := $(shell ./getos.sh) all: sql/pgtap.sql sql/uninstall_pgtap.sql sql/pgtap-core.sql sql/pgtap-schema.sql # Add extension build targets on 9.1 and up. -ifeq ($(shell $(PG_CONFIG) --version | grep -qE "8[.]| 9[.]0" && echo no || echo yes),yes) -all: sql/$(EXTENSION)--$(EXTVERSION).sql +ifeq ($(shell echo $(VERSION) | grep -qE "8[.]|9[.]0" && echo no || echo yes),yes) +all: sql/$(EXTENSION)--$(EXTVERSION).sql sql/$(EXTENSION)-core--$(EXTVERSION).sql sql/$(EXTENSION)-schema--$(EXTVERSION).sql sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql cp $< $@ -DATA = $(wildcard sql/*--*.sql) sql/$(EXTENSION)--$(EXTVERSION).sql -EXTRA_CLEAN += sql/$(EXTENSION)--$(EXTVERSION).sql +sql/$(EXTENSION)-core--$(EXTVERSION).sql: sql/$(EXTENSION)-core.sql + cp $< $@ + +sql/$(EXTENSION)-schema--$(EXTVERSION).sql: sql/$(EXTENSION)-schema.sql + cp $< $@ + +DATA = $(wildcard sql/*--*.sql) sql/$(EXTENSION)--$(EXTVERSION).sql sql/$(EXTENSION)-core--$(EXTVERSION).sql sql/$(EXTENSION)-schema--$(EXTVERSION).sql +EXTRA_CLEAN += sql/$(EXTENSION)--$(EXTVERSION).sql sql/$(EXTENSION)-core--$(EXTVERSION).sql sql/$(EXTENSION)-schema--$(EXTVERSION).sql endif sql/pgtap.sql: sql/pgtap.sql.in test/setup.sql diff --git a/pgtap-core.control b/pgtap-core.control new file mode 100644 index 000000000..e0b50583a --- /dev/null +++ b/pgtap-core.control @@ -0,0 +1,6 @@ +# pgTAP Core extension +comment = 'Unit testing for PostgreSQL' +default_version = '1.0.0' +module_pathname = '$libdir/pgtap' +relocatable = true +superuser = false diff --git a/pgtap-schema.control b/pgtap-schema.control new file mode 100644 index 000000000..b0ce1fdfc --- /dev/null +++ b/pgtap-schema.control @@ -0,0 +1,6 @@ +# pgTAP Schema testing extension +comment = 'Schema unit testing for PostgreSQL' +default_version = '1.0.0' +module_pathname = '$libdir/pgtap' +relocatable = true +superuser = false