1
- # $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.76 2009/01/05 09:54:13 petere Exp $
1
+ # $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.77 2009/01/15 09:30:20 petere Exp $
2
2
3
3
subdir = src/interfaces/ecpg/test
4
4
top_builddir = ../../../..
5
5
include $(top_builddir ) /src/Makefile.global
6
6
7
+ override CPPFLAGS := \
8
+ -I$(top_builddir ) /src/port \
9
+ -I$(top_srcdir ) /src/test/regress \
10
+ '-DHOST_TUPLE="$(host_tuple ) "' \
11
+ '-DMAKEPROG="$(MAKE ) "' \
12
+ '-DSHELLPROG="$(SHELL ) "' \
13
+ '-DDLSUFFIX="$(DLSUFFIX ) "' \
14
+ $(CPPFLAGS )
15
+
7
16
# where to find psql for testing an existing installation
8
17
PSQLDIR = $(bindir )
9
18
22
31
abs_builddir := $(shell pwd -W)
23
32
endif
24
33
25
- # stuff to pass into build of pg_regress
26
- EXTRADEFS = '-DHOST_TUPLE="$(host_tuple ) "' \
27
- '-DMAKEPROG="$(MAKE ) "' \
28
- '-DSHELLPROG="$(SHELL ) "' \
29
- '-DDLSUFFIX="$(DLSUFFIX ) "'
30
-
31
- REGRESSINCLUDES = "-I$(top_srcdir ) /src/test/regress"
32
- REGRESSDRIVER = "$(top_builddir ) /src/test/regress/pg_regress.o"
33
-
34
34
all install installdirs uninstall distprep :
35
35
$(MAKE ) -C connect $@
36
36
$(MAKE ) -C sql $@
@@ -53,12 +53,14 @@ clean distclean maintainer-clean:
53
53
54
54
all : pg_regress$(X )
55
55
56
- pg_regress$(X ) : pg_regress_ecpg.o
57
- $(CC ) $(CFLAGS ) $^ $(REGRESSDRIVER ) $(REGRESSINCLUDES ) $(LDFLAGS ) $(LIBS ) -o $@
56
+ pg_regress$(X ) : pg_regress_ecpg.o $(top_builddir ) /src/test/regress/pg_regress.o
57
+ $(CC ) $(CFLAGS ) $(LDFLAGS ) $^ $(LIBS ) -o $@
58
+
59
+ $(top_builddir ) /src/test/regress/pg_regress.o :
60
+ $(MAKE ) -C $(dir $@ ) $(notdir $@ )
58
61
59
62
# dependencies ensure that path changes propagate
60
63
pg_regress_ecpg.o : pg_regress_ecpg.c $(top_builddir ) /src/port/pg_config_paths.h
61
- $(CC ) $(CFLAGS ) $(CPPFLAGS ) -I$(top_builddir ) /src/port $(REGRESSINCLUDES ) $(EXTRADEFS ) -c -o $@ $<
62
64
63
65
$(top_builddir ) /src/port/pg_config_paths.h : $(top_builddir ) /src/Makefile.global
64
66
$(MAKE ) -C $(top_builddir ) /src/port pg_config_paths.h
0 commit comments