Stamp 17.2.
[pgsql.git] / GNUmakefile.in
blobcf6e759486eded7bf95e12617bfa2d6765eeffdf
2 # PostgreSQL top level makefile
4 # GNUmakefile.in
7 subdir =
8 top_builddir = .
9 include $(top_builddir)/src/Makefile.global
11 $(call recurse,all install,src config)
13 docs:
14 $(MAKE) -C doc all
16 $(call recurse,world,doc src config contrib,all)
18 # build src/ before contrib/
19 world-contrib-recurse: world-src-recurse
21 $(call recurse,world-bin,src config contrib,all)
23 # build src/ before contrib/
24 world-bin-contrib-recurse: world-bin-src-recurse
26 html man:
27 $(MAKE) -C doc $@
29 install-docs:
30 $(MAKE) -C doc install
32 $(call recurse,install-world,doc src config contrib,install)
34 # build src/ before contrib/
35 install-world-contrib-recurse: install-world-src-recurse
37 $(call recurse,install-world-bin,src config contrib,install)
39 # build src/ before contrib/
40 install-world-bin-contrib-recurse: install-world-bin-src-recurse
42 $(call recurse,installdirs uninstall init-po update-po,doc src config)
44 $(call recurse,coverage,doc src config contrib)
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 rm -rf tmp_install/ portlock/
51 # Garbage from autoconf:
52 @rm -rf autom4te.cache/
54 # Important: distclean `src' last, otherwise Makefile.global
55 # will be gone too soon.
56 distclean:
57 $(MAKE) -C doc $@
58 $(MAKE) -C contrib $@
59 $(MAKE) -C config $@
60 $(MAKE) -C src $@
61 rm -rf tmp_install/ portlock/
62 # Garbage from autoconf:
63 @rm -rf autom4te.cache/
64 rm -f config.cache config.log config.status GNUmakefile
66 check-tests: | temp-install
67 check check-tests installcheck installcheck-parallel installcheck-tests: CHECKPREP_TOP=src/test/regress
68 check check-tests installcheck installcheck-parallel installcheck-tests: submake-generated-headers
69 $(MAKE) -C src/test/regress $@
71 $(call recurse,check-world,src/test src/pl src/interfaces contrib src/bin src/tools/pg_bsd_indent,check)
72 $(call recurse,checkprep, src/test src/pl src/interfaces contrib src/bin)
74 $(call recurse,installcheck-world,src/test src/pl src/interfaces contrib src/bin,installcheck)
75 $(call recurse,install-tests,src/test/regress,install-tests)
77 GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
78 ./config.status $@
80 update-unicode: | submake-generated-headers submake-libpgport
81 $(MAKE) -C src/common/unicode $@
82 $(MAKE) -C contrib/unaccent $@
85 ##########################################################################
87 distdir = postgresql-$(VERSION)
88 dummy = =install=
90 # git revision to be packaged
91 PG_GIT_REVISION = HEAD
93 GIT = git
95 dist: $(distdir).tar.gz $(distdir).tar.bz2
97 .PHONY: $(distdir).tar.gz $(distdir).tar.bz2
99 distdir-location:
100 @echo $(distdir)
102 # Note: core.autocrlf=false is needed to avoid line-ending conversion
103 # in case the environment has a different setting. Without this, a
104 # tarball created on Windows might be different than on, and unusable
105 # on, Unix machines.
107 $(distdir).tar.gz:
108 $(GIT) -C $(srcdir) -c core.autocrlf=false archive --format tar.gz -9 --prefix $(distdir)/ $(PG_GIT_REVISION) -o $(abs_top_builddir)/$@
110 $(distdir).tar.bz2:
111 $(GIT) -C $(srcdir) -c core.autocrlf=false -c tar.tar.bz2.command='$(BZIP2) -c' archive --format tar.bz2 --prefix $(distdir)/ $(PG_GIT_REVISION) -o $(abs_top_builddir)/$@
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)
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 headerscheck: submake-generated-headers
132 $(top_srcdir)/src/tools/pginclude/headerscheck $(top_srcdir) $(abs_top_builddir)
134 cpluspluscheck: submake-generated-headers
135 $(top_srcdir)/src/tools/pginclude/headerscheck --cplusplus $(top_srcdir) $(abs_top_builddir)
137 .PHONY: dist distcheck docs install-docs world check-world install-world installcheck-world headerscheck cpluspluscheck