summaryrefslogtreecommitdiff
blob: 60433fedb0e873f4f4255e8fa07fe101f5fc02e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
diff --git a/GNUmakefile.in b/GNUmakefile.in
index f7bcc67..ec8fcf1 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -11,19 +11,16 @@ include $(top_builddir)/src/Makefile.global
 all:
 	$(MAKE) -C doc all
 	$(MAKE) -C src all
-	$(MAKE) -C config all
 	@echo "All of PostgreSQL successfully made. Ready to install."
 
 install:
 	$(MAKE) -C doc $@
 	$(MAKE) -C src $@
-	$(MAKE) -C config $@
 	@echo "PostgreSQL installation complete."
 
 installdirs uninstall:
 	$(MAKE) -C doc $@
 	$(MAKE) -C src $@
-	$(MAKE) -C config $@
 
 distprep:
 	$(MAKE) -C doc $@
diff --git a/contrib/Makefile b/contrib/Makefile
index c55c95c..3e9f8ba 100644
--- a/contrib/Makefile
+++ b/contrib/Makefile
@@ -26,16 +26,13 @@ WANTED_DIRS = \
 		pg_freespacemap \
 		pg_standby	\
 		pg_trgm		\
-		pgbench		\
 		pgcrypto	\
 		pgrowlocks	\
 		pgstattuple	\
 		seg		\
 		spi		\
 		tablefunc	\
-		test_parser	\
-		tsearch2	\
-		vacuumlo
+		test_parser
 
 ifeq ($(with_openssl),yes)
 WANTED_DIRS += sslinfo
diff --git a/contrib/adminpack/Makefile b/contrib/adminpack/Makefile
index e1262fb..7e27aed 100644
--- a/contrib/adminpack/Makefile
+++ b/contrib/adminpack/Makefile
@@ -1,7 +1,7 @@
 # $PostgreSQL: pgsql/contrib/adminpack/Makefile,v 1.6 2007/11/10 23:59:50 momjian Exp $
 
 MODULE_big = adminpack
-PG_CPPFLAGS = -I$(libpq_srcdir)
+PG_CPPFLAGS = -I$(libpq_srcdir) -I../../src/include/
 DATA_built = adminpack.sql
 DATA = uninstall_adminpack.sql
 OBJS = adminpack.o
diff --git a/src/Makefile b/src/Makefile
index 8d66bf6..6818ef5 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -19,14 +19,11 @@ all install installdirs uninstall distprep:
 	$(MAKE) -C backend $@
 	$(MAKE) -C backend/utils/mb/conversion_procs $@
 	$(MAKE) -C backend/snowball $@
-	$(MAKE) -C include $@
-	$(MAKE) -C interfaces $@
 	$(MAKE) -C bin $@
 	$(MAKE) -C pl $@
-	$(MAKE) -C makefiles $@
 	$(MAKE) -C test/regress $@
 
-install: install-local
+install:
 
 install-local: installdirs-local
 	$(INSTALL_DATA) Makefile.global '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.global'
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index aa41ee9..5595990 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -373,10 +373,8 @@ endif
 
 
 submake-libpq:
-	$(MAKE) -C $(libpq_builddir) all
 
 submake-libpgport:
-	$(MAKE) -C $(top_builddir)/src/port all
 
 .PHONY: submake-libpq submake-libpgport
 
@@ -419,6 +417,8 @@ ifdef PROFILE
    LDFLAGS += $(PROFILE)
 endif
 
+CFLAGS += -I${top_srcdir}/src/include
+
 
 ##########################################################################
 #
diff --git a/src/bin/Makefile b/src/bin/Makefile
index ec8f7ce..3f82a7f 100644
--- a/src/bin/Makefile
+++ b/src/bin/Makefile
@@ -13,8 +13,8 @@ subdir = src/bin
 top_builddir = ../..
 include $(top_builddir)/src/Makefile.global
 
-DIRS = initdb ipcclean pg_ctl pg_dump \
-	psql scripts pg_config pg_controldata pg_resetxlog
+DIRS = initdb ipcclean pg_ctl \
+	pg_controldata pg_resetxlog
 ifeq ($(PORTNAME), win32)
 DIRS+=pgevent
 endif
diff --git a/src/bin/initdb/Makefile b/src/bin/initdb/Makefile
index eac7a09..4fcbb0f 100644
--- a/src/bin/initdb/Makefile
+++ b/src/bin/initdb/Makefile
@@ -14,7 +14,7 @@ subdir = src/bin/initdb
 top_builddir = ../../..
 include $(top_builddir)/src/Makefile.global
 
-override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
+override CPPFLAGS := -DFRONTEND -I$(top_srcdir)/src/interfaces/libpq $(CPPFLAGS)
 
 OBJS=	initdb.o encnames.o pqsignal.o $(WIN32RES)
 
diff --git a/src/port/Makefile b/src/port/Makefile
index b113159..c786e83 100644
--- a/src/port/Makefile
+++ b/src/port/Makefile
@@ -35,11 +35,10 @@ OBJS = $(LIBOBJS) chklocale.o copydir.o dirmod.o exec.o noblock.o path.o pipe.o
 # foo_srv.o and foo.o are both built from foo.c, but only foo.o has -DFRONTEND
 OBJS_SRV = $(OBJS:%.o=%_srv.o)
 
-all: libpgport.a libpgport_srv.a
+all: libpgport_srv.a
 
 # libpgport is needed by some contrib
-install: all installdirs
-	$(INSTALL_STLIB) libpgport.a '$(DESTDIR)$(libdir)/libpgport.a'
+install:
 
 installdirs:
 	$(mkinstalldirs) '$(DESTDIR)$(libdir)'
diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile
index 4d19f9c..efb3bb9 100644
--- a/src/test/regress/GNUmakefile
+++ b/src/test/regress/GNUmakefile
@@ -135,13 +135,14 @@ all-spi:
 tablespace-setup:
 	-rm -rf ./testtablespace
 	mkdir ./testtablespace
+	chown -Rf portage .
 
 ##
 ## Run tests
 ##
 
 check: all
-	./pg_regress --temp-install=./tmp_check --top-builddir=$(top_builddir) --srcdir=$(abs_srcdir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE) $(TEMP_CONF)
+	su -s /bin/sh portage -c "PATH=\"${PATH}\" ./pg_regress --temp-install=./tmp_check --top-builddir=$(top_builddir) --srcdir=$(abs_srcdir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE) $(TEMP_CONF) --psqldir=/usr/lib/postgresql-${SLOT}/bin/"
 
 installcheck: all
 	./pg_regress --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule --srcdir=$(abs_srcdir) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index 7d4f50f..c30c47c 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -771,9 +771,6 @@ initialize_environment(void)
 		sprintf(tmp, "%s/install/%s", temp_install, datadir);
 		datadir = tmp;
 
-		/* psql will be installed into temp-install bindir */
-		psqldir = bindir;
-
 		/*
 		 * Set up shared library paths to include the temp install.
 		 *
@@ -2043,7 +2040,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
 		 */
 		snprintf(buf, sizeof(buf),
 				 SYSTEMQUOTE "\"%s/psql\" -X postgres <%s 2>%s" SYSTEMQUOTE,
-				 bindir, DEVNULL, DEVNULL);
+				 psqldir, DEVNULL, DEVNULL);
 		for (i = 0; i < 60; i++)
 		{
 			/* Done if psql succeeds */