summaryrefslogtreecommitdiffstats
path: root/src/interfaces/ecpg/test/Makefile.regress
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:15:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:15:05 +0000
commit46651ce6fe013220ed397add242004d764fc0153 (patch)
tree6e5299f990f88e60174a1d3ae6e48eedd2688b2b /src/interfaces/ecpg/test/Makefile.regress
parentInitial commit. (diff)
downloadpostgresql-14-upstream.tar.xz
postgresql-14-upstream.zip
Adding upstream version 14.5.upstream/14.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/interfaces/ecpg/test/Makefile.regress')
-rw-r--r--src/interfaces/ecpg/test/Makefile.regress31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/interfaces/ecpg/test/Makefile.regress b/src/interfaces/ecpg/test/Makefile.regress
new file mode 100644
index 0000000..b0647cd
--- /dev/null
+++ b/src/interfaces/ecpg/test/Makefile.regress
@@ -0,0 +1,31 @@
+# This file is included into the Makefiles of subdirectories of ecpg/test/,
+# so the file references have one more level of .. than you might expect.
+
+override CPPFLAGS := -I../../include -I$(top_srcdir)/src/interfaces/ecpg/include \
+ -I$(libpq_srcdir) $(CPPFLAGS)
+override CFLAGS += $(PTHREAD_CFLAGS)
+
+LDFLAGS_INTERNAL += -L../../ecpglib -lecpg -L../../pgtypeslib -lpgtypes $(libpq)
+
+override LIBS += $(PTHREAD_LIBS)
+
+# Standard way to invoke the ecpg preprocessor
+ECPG = ../../preproc/ecpg --regression -I$(srcdir)/../../include -I$(srcdir)
+
+# Files that most or all ecpg preprocessor test outputs depend on
+ECPG_TEST_DEPENDENCIES = ../../preproc/ecpg$(X) \
+ $(srcdir)/../regression.h \
+ $(srcdir)/../printf_hack.h \
+ $(srcdir)/../../include/sqlca.h \
+ $(srcdir)/../../include/sqlda.h \
+ $(srcdir)/../../include/sqltypes.h \
+ $(srcdir)/../../include/sql3types.h
+
+# Caution: this build rule is overridden in some child Makefiles
+# where it's necessary to use nondefault switches to ecpg;
+# make sure those rules match except for the extra switches.
+%.c: %.pgc $(ECPG_TEST_DEPENDENCIES)
+ $(ECPG) -o $@ $<
+
+clean:
+ rm -f $(TESTS) $(TESTS:%=%.o) $(TESTS:%=%.c)