OSDN Git Service

New unified regression test driver, test/regress makefile cleanup,
[pg-rex/syncrep.git] / GNUmakefile.in
1 #
2 # PostgreSQL top level makefile
3 #
4 # $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.13 2000/09/29 17:17:31 petere Exp $
5 #
6
7 subdir =
8 top_builddir = .
9 include $(top_builddir)/src/Makefile.global
10
11 all:
12         $(MAKE) -C doc all
13         $(MAKE) -C src all
14         @echo "All of PostgreSQL successfully made. Ready to install."
15
16 install:
17         $(MAKE) -C doc install
18         $(MAKE) -C src install
19         @cat $(srcdir)/register.txt
20
21 installdirs uninstall clean distprep:
22         $(MAKE) -C doc $@
23         $(MAKE) -C src $@
24
25 # Important: distclean `doc' before `src', otherwise Makefile.global
26 # will be gone too soon.
27 distclean maintainer-clean:
28         -$(MAKE) -C doc $@
29         -$(MAKE) -C src $@
30         -rm -f config.cache config.log config.status GNUmakefile
31
32 check installcheck: all
33         $(MAKE) -C src/test $@
34
35 GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
36         CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
37
38
39 ##########################################################################
40
41 distdir := postgresql-$(VERSION)
42 dummy   := =install=
43 garbage := =*  "#"*  ."#"*  *~*  *.orig  *.rej  core  postgresql-*
44
45 GZIP    := gzip
46 BZIP2   := bzip2
47
48 dist: $(distdir).tar.gz
49 ifeq ($(split-dist), yes)
50 dist: $(distdir).base.tar.gz $(distdir).docs.tar.gz $(distdir).support.tar.gz $(distdir).test.tar.gz
51 endif
52 dist:
53         -rm -rf $(distdir)
54
55 $(distdir).tar: distdir
56         $(TAR) chf $@ $(distdir)
57
58 $(distdir).base.tar: distdir
59         $(TAR) -c $(addprefix --exclude $(distdir)/, doc src/test src/interfaces src/bin) \
60           -f $@ $(distdir)
61
62 $(distdir).docs.tar: distdir
63         $(TAR) cf $@ $(distdir)/doc
64
65 $(distdir).support.tar: distdir
66         $(TAR) cf $@ $(distdir)/src/interfaces $(distdir)/src/bin
67
68 $(distdir).test.tar: distdir
69         $(TAR) cf $@ $(distdir)/src/test
70
71 %.gz: %
72         $(GZIP) -f --best $<
73
74 %.bz2: %
75         $(BZIP2) -f $<
76
77 distdir:
78         -rm -rf $(distdir)* $(dummy)
79         for x in `cd $(top_srcdir) && find . -name CVS -prune -o -print`; do \
80           file=`expr X$$x : 'X\./\(.*\)'`; \
81           if test -d "$(top_srcdir)/$$file" ; then \
82             mkdir "$(distdir)/$$file" && chmod 777 "$(distdir)/$$file"; \
83           else \
84             ln "$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev/null 2>&1 \
85               || cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
86           fi || exit; \
87         done
88         $(MAKE) -C $(distdir) distprep
89         $(MAKE) -C $(distdir) distclean
90
91 distcheck: $(distdir).tar.gz
92         -rm -rf $(dummy)
93         mkdir $(dummy)
94         gzip -d -c $< | $(TAR) xf -
95         install_prefix=`cd $(dummy) && pwd`; \
96         cd $(distdir) \
97         && ./configure --prefix="$$install_prefix"
98         $(MAKE) -C $(distdir) -q distprep
99         $(MAKE) -C $(distdir)
100         $(MAKE) -C $(distdir) install
101         $(MAKE) -C $(distdir) uninstall
102         @echo "checking whether \`$(MAKE) uninstall' works"
103         test `find $(dummy) -not -type d | wc -l` -eq 0
104         $(MAKE) -C $(distdir) dist
105 # Room for improvement: Check here whether this distribution tarball
106 # is sufficiently similar to the original one.
107         -rm -rf $(distdir) $(dummy)
108         @echo "Distribution integrity checks out."
109
110 .PHONY: dist distdir distcheck