aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2009-01-15 09:30:20 +0000
committerPeter Eisentraut <peter_e@gmx.net>2009-01-15 09:30:20 +0000
commitcbb1358b18c88216a56de8847428d1bbcc51f280 (patch)
tree93e46e9c5a48cbcb595898ccfd95c51e55b8e2ca /src
parente72187d789cfc5be62b7e5ba64cbe00b712bd640 (diff)
downloadpostgresql-cbb1358b18c88216a56de8847428d1bbcc51f280.tar.gz
postgresql-cbb1358b18c88216a56de8847428d1bbcc51f280.zip
Build needed things in src/test/regress/ first. And some build rules
normalization.
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/test/Makefile28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/interfaces/ecpg/test/Makefile b/src/interfaces/ecpg/test/Makefile
index be017e5c9ac..606348bb490 100644
--- a/src/interfaces/ecpg/test/Makefile
+++ b/src/interfaces/ecpg/test/Makefile
@@ -1,9 +1,18 @@
-# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.76 2009/01/05 09:54:13 petere Exp $
+# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.77 2009/01/15 09:30:20 petere Exp $
subdir = src/interfaces/ecpg/test
top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
+override CPPFLAGS := \
+ -I$(top_builddir)/src/port \
+ -I$(top_srcdir)/src/test/regress \
+ '-DHOST_TUPLE="$(host_tuple)"' \
+ '-DMAKEPROG="$(MAKE)"' \
+ '-DSHELLPROG="$(SHELL)"' \
+ '-DDLSUFFIX="$(DLSUFFIX)"' \
+ $(CPPFLAGS)
+
# where to find psql for testing an existing installation
PSQLDIR = $(bindir)
@@ -22,15 +31,6 @@ else
abs_builddir := $(shell pwd -W)
endif
-# stuff to pass into build of pg_regress
-EXTRADEFS = '-DHOST_TUPLE="$(host_tuple)"' \
- '-DMAKEPROG="$(MAKE)"' \
- '-DSHELLPROG="$(SHELL)"' \
- '-DDLSUFFIX="$(DLSUFFIX)"'
-
-REGRESSINCLUDES = "-I$(top_srcdir)/src/test/regress"
-REGRESSDRIVER = "$(top_builddir)/src/test/regress/pg_regress.o"
-
all install installdirs uninstall distprep:
$(MAKE) -C connect $@
$(MAKE) -C sql $@
@@ -53,12 +53,14 @@ clean distclean maintainer-clean:
all: pg_regress$(X)
-pg_regress$(X): pg_regress_ecpg.o
- $(CC) $(CFLAGS) $^ $(REGRESSDRIVER) $(REGRESSINCLUDES) $(LDFLAGS) $(LIBS) -o $@
+pg_regress$(X): pg_regress_ecpg.o $(top_builddir)/src/test/regress/pg_regress.o
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
+
+$(top_builddir)/src/test/regress/pg_regress.o:
+ $(MAKE) -C $(dir $@) $(notdir $@)
# dependencies ensure that path changes propagate
pg_regress_ecpg.o: pg_regress_ecpg.c $(top_builddir)/src/port/pg_config_paths.h
- $(CC) $(CFLAGS) $(CPPFLAGS) -I$(top_builddir)/src/port $(REGRESSINCLUDES) $(EXTRADEFS) -c -o $@ $<
$(top_builddir)/src/port/pg_config_paths.h: $(top_builddir)/src/Makefile.global
$(MAKE) -C $(top_builddir)/src/port pg_config_paths.h