Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit cbb1358

Browse files
committed
Build needed things in src/test/regress/ first. And some build rules
normalization.
1 parent e72187d commit cbb1358

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

src/interfaces/ecpg/test/Makefile

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
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 $
22

33
subdir = src/interfaces/ecpg/test
44
top_builddir = ../../../..
55
include $(top_builddir)/src/Makefile.global
66

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+
716
# where to find psql for testing an existing installation
817
PSQLDIR = $(bindir)
918

@@ -22,15 +31,6 @@ else
2231
abs_builddir := $(shell pwd -W)
2332
endif
2433

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-
3434
all install installdirs uninstall distprep:
3535
$(MAKE) -C connect $@
3636
$(MAKE) -C sql $@
@@ -53,12 +53,14 @@ clean distclean maintainer-clean:
5353

5454
all: pg_regress$(X)
5555

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 $@)
5861

5962
# dependencies ensure that path changes propagate
6063
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 $@ $<
6264

6365
$(top_builddir)/src/port/pg_config_paths.h: $(top_builddir)/src/Makefile.global
6466
$(MAKE) -C $(top_builddir)/src/port pg_config_paths.h

0 commit comments

Comments
 (0)