2 # PostgreSQL top level makefile
4 # $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.11 2000/08/31 16:08:58 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 clean distprep:
25 # Important: distclean `doc' before `src', otherwise Makefile.global
26 # will be gone too soon.
27 distclean maintainer-clean:
30 -rm -f config.cache config.log config.status GNUmakefile
33 GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
34 CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
37 # These dependencies are risky because both the target and the sources
38 # are in CVS and CVS doesn't preserve timestamps, thus leading to
39 # unnecessary reruns of these rules.
43 # Only use this rule if you actually said `make configure'.
44 ifeq ($(MAKECMDGOALS),configure)
45 $(top_srcdir)/configure: $(top_srcdir)/configure.in $(top_srcdir)/aclocal.m4
46 cd $(top_srcdir) && $(AUTOCONF)
49 # This one we can leave unprotected because by default nothing depends
50 # on aclocal.m4. This rule is only invoked if you say `make
51 # aclocal.m4' or `make configure'.
52 $(top_srcdir)/aclocal.m4: $(wildcard $(top_srcdir)/config/*.m4)
56 ##########################################################################
58 distdir := postgresql-$(VERSION)
60 garbage := =* "#"* ."#"* *~* *.orig *.rej core postgresql-*
65 dist: $(distdir).tar.gz
66 ifeq ($(split-dist), yes)
67 dist: $(distdir).base.tar.gz $(distdir).docs.tar.gz $(distdir).support.tar.gz $(distdir).test.tar.gz
72 $(distdir).tar: distdir
73 $(TAR) chf $@ $(distdir)
75 $(distdir).base.tar: distdir
76 $(TAR) -c $(addprefix --exclude $(distdir)/, doc src/test src/interfaces src/bin) \
79 $(distdir).docs.tar: distdir
80 $(TAR) cf $@ $(distdir)/doc
82 $(distdir).support.tar: distdir
83 $(TAR) cf $@ $(distdir)/src/interfaces $(distdir)/src/bin
85 $(distdir).test.tar: distdir
86 $(TAR) cf $@ $(distdir)/src/test
95 -rm -rf $(distdir)* $(dummy)
96 for x in `cd $(top_srcdir) && find . -name CVS -prune -o -print`; do \
97 file=`expr X$$x : 'X\./\(.*\)'`; \
98 if test -d "$(top_srcdir)/$$file" ; then \
99 mkdir "$(distdir)/$$file" && chmod 777 "$(distdir)/$$file"; \
101 ln "$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev/null 2>&1 \
102 || cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
105 $(MAKE) -C $(distdir) distprep
106 $(MAKE) -C $(distdir) distclean
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) -not -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