Files
gnatcoll-db/pgxs/Makefile
Vadim Godunko 59a249cd93 SC06-078 Substitute path to server's header files.
Change-Id: If4040bafe41d3a4614532bb8e408acdbc90a0857
2020-06-23 13:09:21 +03:00

28 lines
842 B
Makefile

all: setup
gprbuild -p -P example/module.gpr -XPG_CONFIG_INCLUDEDIR_SERVER=`pg_config --includedir-server`
gprbuild -p -P testsuite/module.gpr -XPG_CONFIG_INCLUDEDIR_SERVER=`pg_config --includedir-server`
setup:
sed "s/@MODULEDIR@/`pwd | sed 's/\\//\\\\\\//g'`\/.libs/" example/module.sql.in > example/module.sql
sed "s/@MODULEDIR@/`pwd | sed 's/\\//\\\\\\//g'`\/.libs/" testsuite/module.sql.in > testsuite/module.sql
clean:
rm -rf .objs .libs
rm -f example/module.sql testsuite/module.sql
rm -f test_pgxs.output
initdb_ordinary:
dropdb test || true
createdb test
psql test -f testsuite/schema.sql
initdb_super:
psql test -f example/module.sql
psql test -f testsuite/module.sql
check:
psql -q -t test -f testsuite/test_pgxs.sql > test_pgxs.output
diff -u testsuite/test_pgxs.expected test_pgxs.output
rm test_pgxs.output