summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorPeter Eisentraut2000-10-20 21:04:27 +0000
committerPeter Eisentraut2000-10-20 21:04:27 +0000
commit805e431a3868ac71681316927403d1ba389e113b (patch)
treee20ff81ccb4be79cbd43e87cf76f33ee5fb1887d /src/test
parent039f3f1b051b189e7ccf0c28d86d415e693ee8d6 (diff)
Add support for VPATH builds, that is, building somewhere else than in the
source directory. This involves mostly makefiles using $(srcdir) when they might have used ".". (Regression tests don't work with this, yet.) Sort out usage of CPPFLAGS, CFLAGS (and CXXFLAGS). Add "override" keyword in most places, to preserve necessary flags even when the user overrode the flags.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/bench/Makefile5
-rw-r--r--src/test/examples/Makefile8
-rw-r--r--src/test/locale/Makefile5
-rw-r--r--src/test/regress/GNUmakefile7
4 files changed, 9 insertions, 16 deletions
diff --git a/src/test/bench/Makefile b/src/test/bench/Makefile
index 04218870d45..97ab8247092 100644
--- a/src/test/bench/Makefile
+++ b/src/test/bench/Makefile
@@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/test/bench/Attic/Makefile,v 1.7 2000/08/31 16:12:20 petere Exp $
+# $Header: /cvsroot/pgsql/src/test/bench/Attic/Makefile,v 1.8 2000/10/20 21:04:19 petere Exp $
#
#-------------------------------------------------------------------------
@@ -18,7 +18,8 @@ include $(top_builddir)/src/Makefile.global
CREATEFILES= create.sql bench.sql
OUTFILES= bench.out bench.out.perquery
-CFLAGS+= -I$(libpq_srcdir) $(CFLAGS_SL)
+override CPPFLAGS += -I$(libpq_srcdir)
+override CFLAGS += $(CFLAGS_SL)
all: $(CREATEFILES)
diff --git a/src/test/examples/Makefile b/src/test/examples/Makefile
index 9dd159e2f2e..b07c84efe5b 100644
--- a/src/test/examples/Makefile
+++ b/src/test/examples/Makefile
@@ -6,9 +6,8 @@ subdir = src/test/examples
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
-CPPFLAGS+= -I$(libpq_srcdir)
-
-LDFLAGS+= $(libpq)
+override CPPFLAGS+= -I$(libpq_srcdir)
+LIBS += $(libpq)
# PROGS= testlibpq0 testlibpq1 testlibpq2 testlibpq3 testlibpq4 testlo
@@ -16,8 +15,5 @@ PROGS = testlibpq testlibpq2 testlibpq3 testlibpq4 testlo testlo2
all: $(PROGS)
-$(PROGS): % : %.c
- $(CC) $(CFLAGS) -o $@ $@.c $(LDFLAGS)
-
clean:
rm -f $(PROGS)
diff --git a/src/test/locale/Makefile b/src/test/locale/Makefile
index 33eaa02c540..6ecf6cdb90d 100644
--- a/src/test/locale/Makefile
+++ b/src/test/locale/Makefile
@@ -1,4 +1,4 @@
-# $Header: /cvsroot/pgsql/src/test/locale/Makefile,v 1.5 2000/08/31 16:12:25 petere Exp $
+# $Header: /cvsroot/pgsql/src/test/locale/Makefile,v 1.6 2000/10/20 21:04:24 petere Exp $
subdir = src/test/locale
top_builddir = ../../..
@@ -10,9 +10,6 @@ DIRS = koi8-r ISO8859-7 koi8-to-win1251
all: $(PROGS)
-$(PROGS): % : %.c
- $(CC) $(CFLAGS) -o $@ $@.c $(LDFLAGS)
-
clean:
rm -f $(PROGS) *.out
for d in $(DIRS); do \
diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile
index a721b0ac6d8..6c26e96cee9 100644
--- a/src/test/regress/GNUmakefile
+++ b/src/test/regress/GNUmakefile
@@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.27 2000/10/18 16:16:14 momjian Exp $
+# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.28 2000/10/20 21:04:25 petere Exp $
#
#-------------------------------------------------------------------------
@@ -17,9 +17,8 @@ include $(top_builddir)/src/Makefile.global
contribdir := $(top_builddir)/contrib
-CFLAGS+= -I$(libpq_srcdir) $(CFLAGS_SL)
-
-LDADD+= $(libpq)
+override CPPFLAGS += -I$(libpq_srcdir)
+override CFLAGS += $(CFLAGS_SL)
##