forked from greenplum-db/gpdb-postgres-merge-Archived
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGNUmakefile.in
271 lines (240 loc) · 8.35 KB
/
GNUmakefile.in
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
#
# PostgreSQL top level makefile
#
# $PostgreSQL: pgsql/GNUmakefile.in,v 1.58 2010/03/30 00:10:46 petere Exp $
#
subdir =
top_builddir = .
include $(top_builddir)/src/Makefile.global
all:
$(MAKE) -C src all
$(MAKE) -C config all
$(MAKE) -C contrib/xlogdump all
$(MAKE) -C contrib/formatter all
$(MAKE) -C contrib/formatter_fixedwidth all
$(MAKE) -C contrib/fuzzystrmatch all
$(MAKE) -C contrib/extprotocol all
$(MAKE) -C contrib/dblink all
$(MAKE) -C contrib/gp_sparse_vector all
$(MAKE) -C contrib/gp_distribution_policy all
$(MAKE) -C contrib/gp_inject_fault all
$(MAKE) -C contrib/gp_internal_tools all
$(MAKE) -C contrib/gp_cancel_query all
$(MAKE) -C contrib/indexscan all
$(MAKE) -C contrib/pg_upgrade_support all
$(MAKE) -C contrib/pg_upgrade all
$(MAKE) -C contrib/hstore all
$(MAKE) -C contrib/pgcrypto all
$(MAKE) -C gpAux/extensions all
$(MAKE) -C gpAux/gpperfmon all
$(MAKE) -C gpAux/platform all
@echo "All of Greenplum Database successfully made. Ready to install."
docs:
$(MAKE) -C doc all
world:
$(MAKE) -C doc all
$(MAKE) -C src all
$(MAKE) -C config all
$(MAKE) -C contrib all
@echo "PostgreSQL, contrib, and documentation successfully made. Ready to install."
html man:
$(MAKE) -C doc $@
install:
$(MAKE) -C src $@
$(MAKE) -C config $@
$(MAKE) -C contrib/xlogdump $@
$(MAKE) -C contrib/formatter $@
$(MAKE) -C contrib/formatter_fixedwidth $@
$(MAKE) -C contrib/fuzzystrmatch $@
$(MAKE) -C contrib/extprotocol $@
$(MAKE) -C contrib/dblink $@
$(MAKE) -C contrib/gp_sparse_vector $@
$(MAKE) -C contrib/gp_distribution_policy $@
$(MAKE) -C contrib/gp_inject_fault $@
$(MAKE) -C contrib/gp_internal_tools $@
$(MAKE) -C contrib/gp_cancel_query $@
$(MAKE) -C contrib/indexscan $@
$(MAKE) -C contrib/pg_upgrade_support $@
$(MAKE) -C contrib/pg_upgrade $@
$(MAKE) -C contrib/hstore $@
$(MAKE) -C contrib/pgcrypto $@
$(MAKE) -C gpMgmt $@
$(MAKE) -C gpAux/extensions $@
$(MAKE) -C gpAux/gpperfmon $@
$(MAKE) -C gpAux/platform $@
@echo "Greenplum Database installation complete."
install-docs:
$(MAKE) -C doc install
install-world:
$(MAKE) -C doc install
$(MAKE) -C src install
$(MAKE) -C config install
$(MAKE) -C contrib install
@echo "PostgreSQL, contrib, and documentation installation complete."
installdirs uninstall coverage:
# $(MAKE) -C doc $@
$(MAKE) -C src $@
$(MAKE) -C config $@
$(MAKE) -C contrib/xlogdump $@
$(MAKE) -C contrib/formatter $@
$(MAKE) -C contrib/formatter_fixedwidth $@
$(MAKE) -C contrib/fuzzystrmatch $@
$(MAKE) -C contrib/extprotocol $@
$(MAKE) -C contrib/dblink $@
$(MAKE) -C contrib/gp_sparse_vector $@
$(MAKE) -C contrib/gp_distribution_policy $@
$(MAKE) -C contrib/gp_inject_fault $@
$(MAKE) -C contrib/gp_internal_tools $@
$(MAKE) -C contrib/gp_cancel_query $@
$(MAKE) -C contrib/indexscan $@
$(MAKE) -C contrib/pg_upgrade_support $@
$(MAKE) -C contrib/pg_upgrade $@
$(MAKE) -C contrib/hstore $@
$(MAKE) -C contrib/pgcrypto $@
distprep:
# $(MAKE) -C doc $@
$(MAKE) -C src $@
$(MAKE) -C config $@
$(MAKE) -C contrib $@
# clean, distclean, etc should apply to contrib too, even though
# it's not built by default
clean:
# $(MAKE) -C doc $@
$(MAKE) -C contrib $@
$(MAKE) -C src $@
$(MAKE) -C config $@
$(MAKE) -C contrib/xlogdump $@
$(MAKE) -C contrib/formatter $@
$(MAKE) -C contrib/formatter_fixedwidth $@
$(MAKE) -C contrib/fuzzystrmatch $@
$(MAKE) -C contrib/extprotocol $@
$(MAKE) -C contrib/dblink $@
$(MAKE) -C contrib/gp_sparse_vector $@
$(MAKE) -C contrib/gp_distribution_policy $@
$(MAKE) -C contrib/gp_inject_fault $@
$(MAKE) -C contrib/gp_internal_tools $@
$(MAKE) -C contrib/gp_cancel_query $@
$(MAKE) -C contrib/indexscan $@
$(MAKE) -C contrib/pg_upgrade_support $@
$(MAKE) -C contrib/pg_upgrade $@
$(MAKE) -C contrib/hstore $@
$(MAKE) -C contrib/pgcrypto $@
# leap over gpAux/Makefile into subdirectories to avoid circular dependency.
# gpAux/Makefile is the entry point for the enterprise build, which ends up
# calling top-level configure and this Makefile
$(MAKE) -C gpAux/extensions $@
$(MAKE) -C gpAux/gpperfmon $@
$(MAKE) -C gpAux/platform $@
$(MAKE) -C gpMgmt $@
# Garbage from autoconf:
@rm -rf autom4te.cache/
# Important: distclean `src' last, otherwise Makefile.global
# will be gone too soon.
distclean maintainer-clean:
# $(MAKE) -C doc $@
$(MAKE) -C gpAux/extensions $@
$(MAKE) -C gpAux/gpperfmon $@
$(MAKE) -C gpAux/platform $@
$(MAKE) -C contrib $@
$(MAKE) -C config $@
$(MAKE) -C gpMgmt $@
$(MAKE) -C src $@
rm -f config.cache config.log config.status GNUmakefile
# Garbage from autoconf:
@rm -rf autom4te.cache/
# This is a top-level target that runs "all" regression test suites against
# a running server. This is what the CI pipeline runs.
installcheck-world:
$(MAKE) -C src/test installcheck-good
$(MAKE) -C src/test/fsync installcheck
$(MAKE) -C src/test/walrep installcheck
$(MAKE) -C src/test/heap_checksum installcheck
$(MAKE) -C src/test/isolation installcheck
$(MAKE) -C src/test/isolation2 installcheck
$(MAKE) -C src/pl installcheck
#$(MAKE) -C src/interfaces/ecpg installcheck
#$(MAKE) -C contrib installcheck
$(MAKE) -C contrib/formatter_fixedwidth installcheck
$(MAKE) -C contrib/extprotocol installcheck
$(MAKE) -C contrib/dblink installcheck
$(MAKE) -C contrib/indexscan installcheck
$(MAKE) -C contrib/hstore installcheck
$(MAKE) -C contrib/pgcrypto installcheck
$(MAKE) -C gpAux/extensions installcheck
$(MAKE) -C src/bin/gpfdist installcheck
$(MAKE) -C src/interfaces/gppc installcheck
$(MAKE) -C src/test/kerberos installcheck
$(MAKE) -C gpMgmt/bin installcheck
gpcheckcat -A
# Verify the filesystem objects are consistent between primary and mirror
$(MAKE) -C contrib/gp_replica_check installcheck
$(MAKE) -C contrib/pg_upgrade check
installcheck-resgroup:
$(MAKE) -C src/test/isolation2 $@
# Create or destory a demo cluster.
create-demo-cluster:
$(MAKE) -C gpAux/gpdemo create-demo-cluster
destroy-demo-cluster:
$(MAKE) -C gpAux/gpdemo destroy-demo-cluster
create-tinc-test-cluster: destroy-demo-cluster
$(MAKE) -C gpAux/gpdemo DEFAULT_QD_MAX_CONNECT=150 NUM_PRIMARY_MIRROR_PAIRS=2
. gpAux/gpdemo/gpdemo-env.sh && createdb gptest
# Run mock tests, that don't require a running server. Arguably these should
# be part of [install]check-world, but we treat them more like part of
# compilation than regression testing, in the CI. But they are too heavy-weight
# to put into "make all", either.
.PHONY : unittest-check
unittest-check:
$(MAKE) -C src/backend unittest-check
$(MAKE) -C src/bin unittest-check
$(MAKE) -C gpAux/extensions unittest-check
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
./config.status $@
##########################################################################
distdir = postgresql-$(VERSION)
dummy = =install=
garbage = =* "#"* ."#"* *~* *.orig *.rej core postgresql-*
dist: $(distdir).tar.gz $(distdir).tar.bz2
rm -rf $(distdir)
$(distdir).tar: distdir
$(TAR) chf $@ $(distdir)
.INTERMEDIATE: $(distdir).tar
distdir-location:
@echo $(distdir)
distdir:
rm -rf $(distdir)* $(dummy)
for x in `cd $(top_srcdir) && find . \( -name CVS -prune \) -o \( -name .git -prune \) -o -print`; do \
file=`expr X$$x : 'X\./\(.*\)'`; \
if test -d "$(top_srcdir)/$$file" ; then \
mkdir "$(distdir)/$$file" && chmod 777 "$(distdir)/$$file"; \
else \
ln "$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev/null 2>&1 \
|| cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
fi || exit; \
done
$(MAKE) -C $(distdir) distprep
#$(MAKE) -C $(distdir)/doc/src/sgml/ HISTORY INSTALL regress_README
#cp $(distdir)/doc/src/sgml/HISTORY $(distdir)/
#cp $(distdir)/doc/src/sgml/INSTALL $(distdir)/
#cp $(distdir)/doc/src/sgml/regress_README $(distdir)/src/test/regress/README
$(MAKE) -C $(distdir) distclean
#rm -f $(distdir)/README.git
distcheck: dist
rm -rf $(dummy)
mkdir $(dummy)
$(GZIP) -d -c $(distdir).tar.gz | $(TAR) xf -
install_prefix=`cd $(dummy) && pwd`; \
cd $(distdir) \
&& ./configure --prefix="$$install_prefix"
$(MAKE) -C $(distdir) -q distprep
$(MAKE) -C $(distdir)
$(MAKE) -C $(distdir) install
$(MAKE) -C $(distdir) uninstall
@echo "checking whether \`$(MAKE) uninstall' works"
test `find $(dummy) ! -type d | wc -l` -eq 0
$(MAKE) -C $(distdir) dist
# Room for improvement: Check here whether this distribution tarball
# is sufficiently similar to the original one.
rm -rf $(distdir) $(dummy)
@echo "Distribution integrity checks out."
.PHONY: dist distdir distcheck docs install-docs