2 # PostgreSQL top level makefile
4 # $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.9 2000/07/19 16:29:41 petere Exp $
9 include 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-*
63 dist: $(distdir).tar.gz
64 ifeq ($(split-dist), yes)
65 dist: $(distdir).base.tar.gz $(distdir).docs.tar.gz $(distdir).support.tar.gz $(distdir).test.tar.gz
70 $(distdir).tar: distdir
71 $(TAR) chf $@ $(distdir)
73 $(distdir).base.tar: distdir
74 $(TAR) -c $(addprefix --exclude $(distdir)/, doc src/test src/interfaces src/bin) \
77 $(distdir).docs.tar: distdir
78 $(TAR) cf $@ $(distdir)/doc
80 $(distdir).support.tar: distdir
81 $(TAR) cf $@ $(distdir)/src/interfaces $(distdir)/src/bin
83 $(distdir).test.tar: distdir
84 $(TAR) cf $@ $(distdir)/src/test
88 @text="$@ is ready for distribution." ; \
89 frame=`echo "$$text" | sed -e 's/./=/g'` ; \
90 echo "$$frame" ; echo "$$text" ; echo "$$frame"
93 -rm -rf $(distdir)* $(install)
94 for x in `cd $(top_srcdir) && find . -name CVS -prune -o -print`; do \
95 file=`expr $$x : '\./\(.*\)'`; \
96 if test -d "$(top_srcdir)/$$file" ; then \
97 mkdir "$(distdir)/$$file" && chmod 777 "$(distdir)/$$file"; \
99 ln "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
102 $(MAKE) -C $(distdir) distclean
107 gunzip -c $(distdir).tar.gz | $(TAR) xf -
108 install_prefix=`cd $(dummy) && pwd`; \
110 && ./configure --prefix="$$install_prefix"
111 $(MAKE) -C $(distdir) -q distprep
112 $(MAKE) -C $(distdir)
113 $(MAKE) -C $(distdir) install
114 $(MAKE) -C $(distdir) uninstall
115 @echo "checking whether \`$(MAKE) uninstall' works"
116 test `find $(dummy) -not -type d | wc -l` -eq 0
117 $(MAKE) -C $(distdir) dist
118 # Room for improvement: Check here whether this distribution tarball
119 # is sufficiently similar to the original one.
120 -rm -rf $(distdir) $(dummy)
121 @echo "Distribution integrity checks out."
123 .PHONY: dist distdir distcheck