2 # PostgreSQL top level makefile
4 # $PostgreSQL: pgsql/GNUmakefile.in,v 1.52 2009/08/09 22:47:58 petere Exp $
9 include $(top_builddir)/src/Makefile.global
15 @echo "All of PostgreSQL successfully made. Ready to install."
24 @echo "PostgreSQL installation complete."
26 installdirs uninstall coverage:
37 # clean, distclean, etc should apply to contrib too, even though
38 # it's not built by default
44 # Garbage from autoconf:
45 @rm -rf autom4te.cache/
47 # Important: distclean `src' last, otherwise Makefile.global
48 # will be gone too soon.
49 distclean maintainer-clean:
54 rm -f config.cache config.log config.status GNUmakefile
55 # Garbage from autoconf:
56 @rm -rf autom4te.cache/
60 check installcheck installcheck-parallel:
61 $(MAKE) -C src/test $@
63 GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
67 ##########################################################################
69 distdir = postgresql-$(VERSION)
71 garbage = =* "#"* ."#"* *~* *.orig *.rej core postgresql-*
73 dist: $(distdir).tar.gz
74 ifeq ($(split-dist), yes)
75 dist: postgresql-base-$(VERSION).tar.gz postgresql-docs-$(VERSION).tar.gz postgresql-opt-$(VERSION).tar.gz postgresql-test-$(VERSION).tar.gz
80 $(distdir).tar: distdir
81 $(TAR) chf $@ $(distdir)
84 src/tools src/tutorial \
85 $(addprefix src/pl/, plperl plpython tcl)
87 docs_files = doc/postgres.tar.gz doc/src doc/TODO.detail
89 postgresql-base-$(VERSION).tar: distdir
90 $(TAR) -c $(addprefix --exclude $(distdir)/, $(docs_files) $(opt_files) src/test) \
93 postgresql-docs-$(VERSION).tar: distdir
94 $(TAR) cf $@ $(addprefix $(distdir)/, $(docs_files))
96 postgresql-opt-$(VERSION).tar: distdir
97 $(TAR) cf $@ $(addprefix $(distdir)/, $(opt_files))
99 postgresql-test-$(VERSION).tar: distdir
100 $(TAR) cf $@ $(distdir)/src/test
103 rm -rf $(distdir)* $(dummy)
104 for x in `cd $(top_srcdir) && find . \( -name CVS -prune \) -o \( -name .git -prune \) -o -print`; do \
105 file=`expr X$$x : 'X\./\(.*\)'`; \
106 if test -d "$(top_srcdir)/$$file" ; then \
107 mkdir "$(distdir)/$$file" && chmod 777 "$(distdir)/$$file"; \
109 ln "$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev/null 2>&1 \
110 || cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
113 $(MAKE) -C $(distdir) distprep
114 $(MAKE) -C $(distdir)/doc/src/sgml/ HISTORY INSTALL regress_README
115 cp $(distdir)/doc/src/sgml/HISTORY $(distdir)/
116 cp $(distdir)/doc/src/sgml/INSTALL $(distdir)/
117 cp $(distdir)/doc/src/sgml/regress_README $(distdir)/src/test/regress/README
118 $(MAKE) -C $(distdir) distclean
119 rm -f $(distdir)/README.CVS
121 distcheck: $(distdir).tar.gz
124 $(GZIP) -d -c $< | $(TAR) xf -
125 install_prefix=`cd $(dummy) && pwd`; \
127 && ./configure --prefix="$$install_prefix"
128 $(MAKE) -C $(distdir) -q distprep
129 $(MAKE) -C $(distdir)
130 $(MAKE) -C $(distdir) install
131 $(MAKE) -C $(distdir) uninstall
132 @echo "checking whether \`$(MAKE) uninstall' works"
133 test `find $(dummy) ! -type d | wc -l` -eq 0
134 $(MAKE) -C $(distdir) dist
135 # Room for improvement: Check here whether this distribution tarball
136 # is sufficiently similar to the original one.
137 rm -rf $(distdir) $(dummy)
138 @echo "Distribution integrity checks out."
140 .PHONY: dist distdir distcheck