2 # PostgreSQL top level makefile
4 # $PostgreSQL: pgsql/GNUmakefile.in,v 1.55 2009/11/03 21:28:10 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 $(distdir).tar.bz2
76 $(distdir).tar: distdir
77 $(TAR) chf $@ $(distdir)
79 .INTERMEDIATE: $(distdir).tar
85 rm -rf $(distdir)* $(dummy)
86 for x in `cd $(top_srcdir) && find . \( -name CVS -prune \) -o \( -name .git -prune \) -o -print`; do \
87 file=`expr X$$x : 'X\./\(.*\)'`; \
88 if test -d "$(top_srcdir)/$$file" ; then \
89 mkdir "$(distdir)/$$file" && chmod 777 "$(distdir)/$$file"; \
91 ln "$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev/null 2>&1 \
92 || cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
95 $(MAKE) -C $(distdir) distprep
96 $(MAKE) -C $(distdir)/doc/src/sgml/ HISTORY INSTALL regress_README
97 cp $(distdir)/doc/src/sgml/HISTORY $(distdir)/
98 cp $(distdir)/doc/src/sgml/INSTALL $(distdir)/
99 cp $(distdir)/doc/src/sgml/regress_README $(distdir)/src/test/regress/README
100 $(MAKE) -C $(distdir) distclean
101 rm -f $(distdir)/README.CVS
106 $(GZIP) -d -c $(distdir).tar.gz | $(TAR) xf -
107 install_prefix=`cd $(dummy) && pwd`; \
109 && ./configure --prefix="$$install_prefix"
110 $(MAKE) -C $(distdir) -q distprep
111 $(MAKE) -C $(distdir)
112 $(MAKE) -C $(distdir) install
113 $(MAKE) -C $(distdir) uninstall
114 @echo "checking whether \`$(MAKE) uninstall' works"
115 test `find $(dummy) ! -type d | wc -l` -eq 0
116 $(MAKE) -C $(distdir) dist
117 # Room for improvement: Check here whether this distribution tarball
118 # is sufficiently similar to the original one.
119 rm -rf $(distdir) $(dummy)
120 @echo "Distribution integrity checks out."
122 .PHONY: dist distdir distcheck