2 # PostgreSQL top level makefile
4 # $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.18 2001/04/08 17:28:10 petere 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-*
61 dist: $(distdir).tar.gz
62 ifeq ($(split-dist), yes)
63 dist: postgresql-base-$(VERSION).tar.gz postgresql-docs-$(VERSION).tar.gz postgresql-opt-$(VERSION).tar.gz postgresql-test-$(VERSION).tar.gz
68 $(distdir).tar: distdir
69 $(TAR) chf $@ $(distdir)
71 opt_files := src/backend/utils/mb contrib/retep build.xml \
72 src/tools src/corba src/data src/tutorial \
73 $(addprefix src/bin/, pgaccess pgtclsh pg_encoding) \
74 $(addprefix src/interfaces/, odbc libpq++ libpgtcl perl5 python jdbc) \
75 $(addprefix src/pl/, plperl tcl)
77 docs_files := doc/postgres.tar.gz doc/src doc/TODO.detail doc/internals.ps
79 postgresql-base-$(VERSION).tar: distdir
80 $(TAR) -c $(addprefix --exclude $(distdir)/, $(docs_files) $(opt_files) src/test) \
83 postgresql-docs-$(VERSION).tar: distdir
84 $(TAR) cf $@ $(addprefix $(distdir)/, $(docs_files))
86 postgresql-opt-$(VERSION).tar: distdir
87 $(TAR) cf $@ $(addprefix $(distdir)/, $(opt_files))
89 postgresql-test-$(VERSION).tar: distdir
90 $(TAR) cf $@ $(distdir)/src/test
99 -rm -rf $(distdir)* $(dummy)
100 for x in `cd $(top_srcdir) && find . -name CVS -prune -o -print`; do \
101 file=`expr X$$x : 'X\./\(.*\)'`; \
102 if test -d "$(top_srcdir)/$$file" ; then \
103 mkdir "$(distdir)/$$file" && chmod 777 "$(distdir)/$$file"; \
105 ln "$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev/null 2>&1 \
106 || cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
109 $(MAKE) -C $(distdir) distprep
110 $(MAKE) -C $(distdir) distclean
112 distcheck: $(distdir).tar.gz
115 gzip -d -c $< | $(TAR) xf -
116 install_prefix=`cd $(dummy) && pwd`; \
118 && ./configure --prefix="$$install_prefix"
119 $(MAKE) -C $(distdir) -q distprep
120 $(MAKE) -C $(distdir)
121 $(MAKE) -C $(distdir) install
122 $(MAKE) -C $(distdir) uninstall
123 @echo "checking whether \`$(MAKE) uninstall' works"
124 test `find $(dummy) ! -type d | wc -l` -eq 0
125 $(MAKE) -C $(distdir) dist
126 # Room for improvement: Check here whether this distribution tarball
127 # is sufficiently similar to the original one.
128 -rm -rf $(distdir) $(dummy)
129 @echo "Distribution integrity checks out."
131 .PHONY: dist distdir distcheck