2 # PostgreSQL top level makefile
4 # $PostgreSQL: pgsql/GNUmakefile.in,v 1.41 2004/10/06 08:49:58 momjian Exp $
9 include $(top_builddir)/src/Makefile.global
15 @echo "All of PostgreSQL successfully made. Ready to install."
21 @echo "PostgreSQL installation complete."
23 installdirs uninstall distprep:
28 # clean, distclean, etc should apply to contrib too, even though
29 # it's not built by default
35 # Garbage from autoconf:
36 @rm -rf autom4te.cache/
38 # Important: distclean `src' last, otherwise Makefile.global
39 # will be gone too soon.
40 distclean maintainer-clean:
42 -$(MAKE) -C contrib $@
45 -rm -f config.cache config.log config.status GNUmakefile
46 # Garbage from autoconf:
47 @rm -rf autom4te.cache/
52 $(MAKE) -C src/test $@
54 GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
58 ##########################################################################
60 distdir := postgresql-$(VERSION)
62 garbage := =* "#"* ."#"* *~* *.orig *.rej core postgresql-*
64 dist: $(distdir).tar.gz
65 ifeq ($(split-dist), yes)
66 dist: postgresql-base-$(VERSION).tar.gz postgresql-docs-$(VERSION).tar.gz postgresql-opt-$(VERSION).tar.gz postgresql-test-$(VERSION).tar.gz
71 $(distdir).tar: distdir
72 $(TAR) chf $@ $(distdir)
75 src/tools src/corba src/tutorial \
76 $(addprefix src/pl/, plperl plpython tcl)
78 docs_files := doc/postgres.tar.gz doc/src doc/TODO.detail
80 postgresql-base-$(VERSION).tar: distdir
81 $(TAR) -c $(addprefix --exclude $(distdir)/, $(docs_files) $(opt_files) src/test) \
84 postgresql-docs-$(VERSION).tar: distdir
85 $(TAR) cf $@ $(addprefix $(distdir)/, $(docs_files))
87 postgresql-opt-$(VERSION).tar: distdir
88 $(TAR) cf $@ $(addprefix $(distdir)/, $(opt_files))
90 postgresql-test-$(VERSION).tar: distdir
91 $(TAR) cf $@ $(distdir)/src/test
94 -rm -rf $(distdir)* $(dummy)
95 for x in `cd $(top_srcdir) && find . -name CVS -prune -o -print`; do \
96 file=`expr X$$x : 'X\./\(.*\)'`; \
97 if test -d "$(top_srcdir)/$$file" ; then \
98 mkdir "$(distdir)/$$file" && chmod 777 "$(distdir)/$$file"; \
100 ln "$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev/null 2>&1 \
101 || cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
104 $(MAKE) -C $(distdir) distprep
105 $(MAKE) -C $(distdir) distclean
106 rm -f $(distdir)/README.CVS
108 distcheck: $(distdir).tar.gz
111 $(GZIP) -d -c $< | $(TAR) xf -
112 install_prefix=`cd $(dummy) && pwd`; \
114 && ./configure --prefix="$$install_prefix"
115 $(MAKE) -C $(distdir) -q distprep
116 $(MAKE) -C $(distdir)
117 $(MAKE) -C $(distdir) install
118 $(MAKE) -C $(distdir) uninstall
119 @echo "checking whether \`$(MAKE) uninstall' works"
120 test `find $(dummy) ! -type d | wc -l` -eq 0
121 $(MAKE) -C $(distdir) dist
122 # Room for improvement: Check here whether this distribution tarball
123 # is sufficiently similar to the original one.
124 -rm -rf $(distdir) $(dummy)
125 @echo "Distribution integrity checks out."
127 .PHONY: dist distdir distcheck