]> granicus.if.org Git - postgresql/blob - GNUmakefile.in
Remove maintainer-check target, fold into normal build
[postgresql] / GNUmakefile.in
1 #
2 # PostgreSQL top level makefile
3 #
4 # GNUmakefile.in
5 #
6
7 subdir =
8 top_builddir = .
9 include $(top_builddir)/src/Makefile.global
10
11 $(call recurse,all install,src config)
12
13 all:
14         +@echo "All of PostgreSQL successfully made. Ready to install."
15
16 docs:
17         $(MAKE) -C doc all
18
19 $(call recurse,world,doc src config contrib,all)
20 world:
21         +@echo "PostgreSQL, contrib, and documentation successfully made. Ready to install."
22
23 # build src/ before contrib/
24 world-contrib-recurse: world-src-recurse
25
26 html man:
27         $(MAKE) -C doc $@
28
29 install:
30         +@echo "PostgreSQL installation complete."
31
32 install-docs:
33         $(MAKE) -C doc install
34
35 $(call recurse,install-world,doc src config contrib,install)
36 install-world:
37         +@echo "PostgreSQL, contrib, and documentation installation complete."
38
39 # build src/ before contrib/
40 install-world-contrib-recurse: install-world-src-recurse
41
42 $(call recurse,installdirs uninstall coverage init-po update-po,doc src config)
43
44 $(call recurse,distprep,doc src config contrib)
45
46 # clean, distclean, etc should apply to contrib too, even though
47 # it's not built by default
48 $(call recurse,clean,doc contrib src config)
49 clean:
50 # Garbage from autoconf:
51         @rm -rf autom4te.cache/
52
53 # Important: distclean `src' last, otherwise Makefile.global
54 # will be gone too soon.
55 distclean maintainer-clean:
56         $(MAKE) -C doc $@
57         $(MAKE) -C contrib $@
58         $(MAKE) -C config $@
59         $(MAKE) -C src $@
60         rm -f config.cache config.log config.status GNUmakefile
61 # Garbage from autoconf:
62         @rm -rf autom4te.cache/
63
64 check: all
65
66 check installcheck installcheck-parallel:
67         $(MAKE) -C src/test/regress $@
68
69 $(call recurse,check-world,src/test src/pl src/interfaces/ecpg contrib,check)
70
71 $(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib,installcheck)
72
73 GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
74         ./config.status $@
75
76
77 ##########################################################################
78
79 distdir = postgresql-$(VERSION)
80 dummy   = =install=
81 garbage = =*  "#"*  ."#"*  *~*  *.orig  *.rej  core  postgresql-*
82
83 dist: $(distdir).tar.gz $(distdir).tar.bz2
84         rm -rf $(distdir)
85
86 $(distdir).tar: distdir
87         $(TAR) chf $@ $(distdir)
88
89 .INTERMEDIATE: $(distdir).tar
90
91 distdir-location:
92         @echo $(distdir)
93
94 distdir:
95         rm -rf $(distdir)* $(dummy)
96         for x in `cd $(top_srcdir) && find . \( -name CVS -prune \) -o \( -name .git -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"; \
100           else \
101             ln "$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev/null 2>&1 \
102               || cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
103           fi || exit; \
104         done
105         $(MAKE) -C $(distdir) distprep
106         $(MAKE) -C $(distdir)/doc/src/sgml/ HISTORY INSTALL regress_README
107         cp $(distdir)/doc/src/sgml/HISTORY $(distdir)/
108         cp $(distdir)/doc/src/sgml/INSTALL $(distdir)/
109         cp $(distdir)/doc/src/sgml/regress_README $(distdir)/src/test/regress/README
110         $(MAKE) -C $(distdir) distclean
111         rm -f $(distdir)/README.git
112
113 distcheck: dist
114         rm -rf $(dummy)
115         mkdir $(dummy)
116         $(GZIP) -d -c $(distdir).tar.gz | $(TAR) xf -
117         install_prefix=`cd $(dummy) && pwd`; \
118         cd $(distdir) \
119         && ./configure --prefix="$$install_prefix"
120         $(MAKE) -C $(distdir) -q distprep
121         $(MAKE) -C $(distdir)
122         $(MAKE) -C $(distdir) install
123         $(MAKE) -C $(distdir) uninstall
124         @echo "checking whether \`$(MAKE) uninstall' works"
125         test `find $(dummy) ! -type d | wc -l` -eq 0
126         $(MAKE) -C $(distdir) dist
127 # Room for improvement: Check here whether this distribution tarball
128 # is sufficiently similar to the original one.
129         rm -rf $(distdir) $(dummy)
130         @echo "Distribution integrity checks out."
131
132 .PHONY: dist distdir distcheck docs install-docs world check-world install-world installcheck-world