GNUmakefile.in 5.6 KB
Newer Older
1 2 3
#
# PostgreSQL top level makefile
#
4
# $PostgreSQL: pgsql/GNUmakefile.in,v 1.46 2007/02/09 15:55:57 petere Exp $
5 6
#

7
subdir =
8
top_builddir = .
9
include $(top_builddir)/src/Makefile.global
10

11

12
all:
13
#	$(MAKE) -C doc all
14
	$(MAKE) -C src all
15
	$(MAKE) -C config all
16
	$(MAKE) -C contrib/xlogdump all
17 18 19 20 21 22 23 24 25 26
	$(MAKE) -C contrib/changetrackingdump 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/gp_sparse_vector all
	$(MAKE) -C contrib/gp_distribution_policy all
	$(MAKE) -C contrib/gp_internal_tools all
	$(MAKE) -C contrib/gp_cancel_query all
	$(MAKE) -C contrib/indexscan all
27
	$(MAKE) -C gpAux/extensions mapreduce
28
	@echo "All of Greenplum Database successfully made. Ready to install."
29 30

install:
31
#	$(MAKE) -C doc $@
32 33
	$(MAKE) -C src $@
	$(MAKE) -C config $@
34
	$(MAKE) -C contrib/xlogdump $@
35 36 37 38 39 40 41 42 43 44 45
	$(MAKE) -C contrib/changetrackingdump $@
	$(MAKE) -C contrib/formatter $@
	$(MAKE) -C contrib/formatter_fixedwidth $@
	$(MAKE) -C contrib/fuzzystrmatch $@
	$(MAKE) -C contrib/extprotocol $@
	$(MAKE) -C contrib/gp_sparse_vector $@
	$(MAKE) -C contrib/gp_distribution_policy $@
	$(MAKE) -C contrib/gp_internal_tools $@
	$(MAKE) -C contrib/gp_cancel_query $@
	$(MAKE) -C contrib/indexscan $@ 
	$(MAKE) -C gpMgmt $@
46
	$(MAKE) -C gpAux/extensions $@
47 48

	@echo "Greenplum Database installation complete."
49

50
installdirs uninstall:
51
#	$(MAKE) -C doc $@
52
	$(MAKE) -C src $@
53
	$(MAKE) -C config $@
54
	$(MAKE) -C contrib/xlogdump $@
55 56 57 58 59 60 61 62 63 64
	$(MAKE) -C contrib/changetrackingdump $@
	$(MAKE) -C contrib/formatter $@
	$(MAKE) -C contrib/formatter_fixedwidth $@
	$(MAKE) -C contrib/fuzzystrmatch $@
	$(MAKE) -C contrib/extprotocol $@
	$(MAKE) -C contrib/gp_sparse_vector $@
	$(MAKE) -C contrib/gp_distribution_policy $@
	$(MAKE) -C contrib/gp_internal_tools $@
	$(MAKE) -C contrib/gp_cancel_query $@
	$(MAKE) -C contrib/indexscan $@ 
65

66
distprep:
67
#	$(MAKE) -C doc $@
68 69 70 71
	$(MAKE) -C src $@
	$(MAKE) -C config $@
	$(MAKE) -C contrib $@

72 73 74
# clean, distclean, etc should apply to contrib too, even though
# it's not built by default
clean:
75
#	$(MAKE) -C doc $@
76 77
	$(MAKE) -C contrib $@
	$(MAKE) -C src $@
78
	$(MAKE) -C config $@
79
	$(MAKE) -C contrib/xlogdump $@
80 81 82 83 84 85 86 87 88 89
	$(MAKE) -C contrib/changetrackingdump $@
	$(MAKE) -C contrib/formatter $@
	$(MAKE) -C contrib/formatter_fixedwidth $@
	$(MAKE) -C contrib/fuzzystrmatch $@
	$(MAKE) -C contrib/extprotocol $@
	$(MAKE) -C contrib/gp_sparse_vector $@
	$(MAKE) -C contrib/gp_distribution_policy $@
	$(MAKE) -C contrib/gp_internal_tools $@
	$(MAKE) -C contrib/gp_cancel_query $@
	$(MAKE) -C contrib/indexscan $@
90
	$(MAKE) -C gpAux/extensions $@
91 92
# Garbage from autoconf:
	@rm -rf autom4te.cache/
93 94

# Important: distclean `src' last, otherwise Makefile.global
95
# will be gone too soon.
96
distclean maintainer-clean:
97
#	-$(MAKE) -C doc $@
98
	-$(MAKE) -C gpAux/extensions $@
99
	-$(MAKE) -C contrib $@
100
	-$(MAKE) -C config $@
101
	-$(MAKE) -C src $@
102
	-rm -f config.cache config.log config.status GNUmakefile
103 104
# Garbage from autoconf:
	@rm -rf autom4te.cache/
105

106 107
check: all

108
check installcheck installcheck-parallel installcheck-good installcheck-optfunctional:
109
	$(MAKE) -C src/test $@
110
	$(MAKE) -C gpAux/extensions $@
111

112
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
113
	./config.status $@
114 115


116 117
##########################################################################

118 119 120
distdir	= postgresql-$(VERSION)
dummy	= =install=
garbage = =*  "#"*  ."#"*  *~*  *.orig  *.rej  core  postgresql-*
121

P
 
PostgreSQL Daemon 已提交
122
dist: $(distdir).tar.gz 
123
ifeq ($(split-dist), yes)
P
 
PostgreSQL Daemon 已提交
124
dist: postgresql-base-$(VERSION).tar.gz postgresql-docs-$(VERSION).tar.gz postgresql-opt-$(VERSION).tar.gz postgresql-test-$(VERSION).tar.gz 
125 126 127 128 129 130 131
endif
dist:
	-rm -rf $(distdir)

$(distdir).tar: distdir
	$(TAR) chf $@ $(distdir)

132
opt_files = \
133
	src/tools src/tutorial \
134
	$(addprefix src/pl/, plperl plpython tcl)
135

136
docs_files =
137 138 139

postgresql-base-$(VERSION).tar: distdir
	$(TAR) -c $(addprefix --exclude $(distdir)/, $(docs_files) $(opt_files) src/test) \
140 141
	  -f $@ $(distdir)

142 143
postgresql-docs-$(VERSION).tar: distdir
	$(TAR) cf $@ $(addprefix $(distdir)/, $(docs_files))
144

145 146
postgresql-opt-$(VERSION).tar: distdir
	$(TAR) cf $@ $(addprefix $(distdir)/, $(opt_files))
147

148
postgresql-test-$(VERSION).tar: distdir
149 150
	$(TAR) cf $@ $(distdir)/src/test

151 152
distdir:
	-rm -rf $(distdir)* $(dummy)
153
	for x in `cd $(top_srcdir) && find . -name CVS -prune -o -print`; do \
154
	  file=`expr X$$x : 'X\./\(.*\)'`; \
155 156 157
	  if test -d "$(top_srcdir)/$$file" ; then \
	    mkdir "$(distdir)/$$file" && chmod 777 "$(distdir)/$$file";	\
	  else \
158 159
	    ln "$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev/null 2>&1 \
	      || cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
160 161
	  fi || exit; \
	done
162
	$(MAKE) -C $(distdir) distprep
163 164 165 166
	#$(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
167
	$(MAKE) -C $(distdir) distclean
168
	-rm -f $(distdir)/README.CVS
169

170
distcheck: $(distdir).tar.gz
171 172
	-rm -rf $(dummy)
	mkdir $(dummy)
173
	$(GZIP) -d -c $< | $(TAR) xf -
174 175 176 177 178 179 180 181
	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"
182
	test `find $(dummy) ! -type d | wc -l` -eq 0
183 184 185 186 187 188 189
	$(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
190
unexport split-dist