2 # PostgreSQL top level makefile
4 # $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.30 2002/10/21 00:12:45 momjian Exp $
9 include $(top_builddir)/src/Makefile.global
14 @echo "All of PostgreSQL successfully made. Ready to install."
17 $(MAKE) -C doc install
18 $(MAKE) -C src install
19 @cat $(srcdir)/register.txt
21 installdirs uninstall distprep:
28 # clean, distclean, etc should apply to contrib too, even though
29 # it's not built by default
34 # Garbage from autoconf:
35 @rm -rf autom4te.cache/
37 # Important: distclean `src' last, otherwise Makefile.global
38 # will be gone too soon.
39 distclean maintainer-clean:
41 -$(MAKE) -C contrib $@
43 -rm -f config.cache config.log config.status GNUmakefile
44 # Garbage from autoconf:
45 @rm -rf autom4te.cache/
50 $(MAKE) -C src/test $@
52 GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
56 ##########################################################################
58 distdir := postgresql-$(VERSION)
60 garbage := =* "#"* ."#"* *~* *.orig *.rej core postgresql-*
62 dist: $(distdir).tar.gz
63 ifeq ($(split-dist), yes)
64 dist: postgresql-base-$(VERSION).tar.gz postgresql-docs-$(VERSION).tar.gz postgresql-opt-$(VERSION).tar.gz postgresql-test-$(VERSION).tar.gz
69 $(distdir).tar: distdir
70 $(TAR) chf $@ $(distdir)
73 src/tools src/corba src/data src/tutorial \
75 $(addprefix src/interfaces/, libpgtcl python jdbc) \
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
107 distcheck: $(distdir).tar.gz
110 $(GZIP) -d -c $< | $(TAR) xf -
111 install_prefix=`cd $(dummy) && pwd`; \
113 && ./configure --prefix="$$install_prefix"
114 $(MAKE) -C $(distdir) -q distprep
115 $(MAKE) -C $(distdir)
116 $(MAKE) -C $(distdir) install
117 $(MAKE) -C $(distdir) uninstall
118 @echo "checking whether \`$(MAKE) uninstall' works"
119 test `find $(dummy) ! -type d | wc -l` -eq 0
120 $(MAKE) -C $(distdir) dist
121 # Room for improvement: Check here whether this distribution tarball
122 # is sufficiently similar to the original one.
123 -rm -rf $(distdir) $(dummy)
124 @echo "Distribution integrity checks out."
126 .PHONY: dist distdir distcheck