2 # PostgreSQL top level makefile
4 # $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.23 2001/11/21 23:19:25 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
35 # Important: distclean `src' last, otherwise Makefile.global
36 # will be gone too soon.
37 distclean maintainer-clean:
39 -$(MAKE) -C contrib $@
41 -rm -f config.cache config.log config.status GNUmakefile
46 $(MAKE) -C src/test $@
48 GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
49 CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
52 ##########################################################################
54 distdir := postgresql-$(VERSION)
56 garbage := =* "#"* ."#"* *~* *.orig *.rej core postgresql-*
58 dist: $(distdir).tar.gz
59 ifeq ($(split-dist), yes)
60 dist: postgresql-base-$(VERSION).tar.gz postgresql-docs-$(VERSION).tar.gz postgresql-opt-$(VERSION).tar.gz postgresql-test-$(VERSION).tar.gz
65 $(distdir).tar: distdir
66 $(TAR) chf $@ $(distdir)
68 opt_files := src/backend/utils/mb contrib/retep/build.xml \
69 src/tools src/corba src/data src/tutorial \
70 $(addprefix src/bin/, pgaccess pgtclsh pg_encoding) \
71 $(addprefix src/interfaces/, odbc libpq++ libpgtcl perl5 python jdbc) \
72 $(addprefix src/pl/, plperl tcl)
74 docs_files := doc/postgres.tar.gz doc/src doc/TODO.detail
76 postgresql-base-$(VERSION).tar: distdir
77 $(TAR) -c $(addprefix --exclude $(distdir)/, $(docs_files) $(opt_files) src/test) \
80 postgresql-docs-$(VERSION).tar: distdir
81 $(TAR) cf $@ $(addprefix $(distdir)/, $(docs_files))
83 postgresql-opt-$(VERSION).tar: distdir
84 $(TAR) cf $@ $(addprefix $(distdir)/, $(opt_files))
86 postgresql-test-$(VERSION).tar: distdir
87 $(TAR) cf $@ $(distdir)/src/test
90 -rm -rf $(distdir)* $(dummy)
91 for x in `cd $(top_srcdir) && find . -name CVS -prune -o -print`; do \
92 file=`expr X$$x : 'X\./\(.*\)'`; \
93 if test -d "$(top_srcdir)/$$file" ; then \
94 mkdir "$(distdir)/$$file" && chmod 777 "$(distdir)/$$file"; \
96 ln "$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev/null 2>&1 \
97 || cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
100 $(MAKE) -C $(distdir) distprep
101 $(MAKE) -C $(distdir) distclean
103 distcheck: $(distdir).tar.gz
106 $(GZIP) -d -c $< | $(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