2 # PostgreSQL top level makefile
9 include $(top_builddir
)/src
/Makefile.global
15 @echo
"All of PostgreSQL successfully made. Ready to install."
21 @echo
"PostgreSQL installation complete."
23 installdirs uninstall:
34 # clean, distclean, etc should apply to contrib too, even though
35 # it's not built by default
41 # Garbage from autoconf:
42 @
rm -rf autom4te.cache
/
44 # Important: distclean `src' last, otherwise Makefile.global
45 # will be gone too soon.
46 distclean maintainer-clean
:
51 rm -f config.cache config.log config.status GNUmakefile
52 # Garbage from autoconf:
53 @
rm -rf autom4te.cache
/
57 check installcheck installcheck-parallel
:
58 $(MAKE
) -C src
/test $@
60 GNUmakefile
: GNUmakefile.in
$(top_builddir
)/config.status
64 ##########################################################################
67 $(MAKE
) -C src
/backend
$@
70 coverage-html
: coverage
73 $(GENHTML
) --show-details
--legend
--output-directory
=coverage
--title
=PostgreSQL
--num-spaces
=4 --prefix=$(abs_top_srcdir
)/src
`find src/backend -name lcov.info -print`
75 ifeq ($(enable_coverage
),yes
)
76 clean distclean maintainer-clean
: clean-coverage-local
77 .PHONY
: clean-coverage-local
83 ##########################################################################
85 distdir
= postgresql-
$(VERSION
)
87 garbage
= =* "#"* .
"#"* *~
* *.orig
*.rej core postgresql-
*
89 dist: $(distdir
).
tar.gz
90 ifeq ($(split-dist
), yes
)
91 dist: postgresql-base-
$(VERSION
).
tar.gz postgresql-docs-
$(VERSION
).
tar.gz postgresql-opt-
$(VERSION
).
tar.gz postgresql-test-
$(VERSION
).
tar.gz
96 $(distdir
).
tar: distdir
97 $(TAR
) chf
$@
$(distdir
)
100 src
/tools src
/tutorial \
101 $(addprefix src
/pl
/, plperl plpython tcl
)
103 docs_files
= doc
/postgres.
tar.gz doc
/src doc
/TODO.detail
105 postgresql-base-
$(VERSION
).
tar: distdir
106 $(TAR
) -c
$(addprefix --exclude
$(distdir
)/, $(docs_files
) $(opt_files
) src
/test) \
109 postgresql-docs-
$(VERSION
).
tar: distdir
110 $(TAR
) cf
$@
$(addprefix $(distdir
)/, $(docs_files
))
112 postgresql-opt-
$(VERSION
).
tar: distdir
113 $(TAR
) cf
$@
$(addprefix $(distdir
)/, $(opt_files
))
115 postgresql-test-
$(VERSION
).
tar: distdir
116 $(TAR
) cf
$@
$(distdir
)/src
/test
119 rm -rf
$(distdir
)* $(dummy
)
120 for x in
`cd $(top_srcdir) && find . \( -name CVS -prune \) -o \( -name .git -prune \) -o -print`; do \
121 file
=`expr X$$x : 'X\./\(.*\)'`; \
122 if
test -d
"$(top_srcdir)/$$file" ; then \
123 mkdir
"$(distdir)/$$file" && chmod
777 "$(distdir)/$$file"; \
125 ln
"$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev
/null
2>&1 \
126 || cp
"$(top_srcdir)/$$file" "$(distdir)/$$file"; \
129 $(MAKE
) -C
$(distdir
) distprep
130 $(MAKE
) -C
$(distdir
)/doc
/src
/sgml
/ HISTORY INSTALL regress_README
131 cp
$(distdir
)/doc
/src
/sgml
/HISTORY
$(distdir
)/
132 cp
$(distdir
)/doc
/src
/sgml
/INSTALL
$(distdir
)/
133 cp
$(distdir
)/doc
/src
/sgml
/regress_README
$(distdir
)/src
/test/regress
/README
134 $(MAKE
) -C
$(distdir
) distclean
135 rm -f
$(distdir
)/README.CVS
137 distcheck
: $(distdir
).
tar.gz
140 $(GZIP
) -d
-c
$< |
$(TAR
) xf
-
141 install_prefix
=`cd $(dummy) && pwd`; \
143 && .
/configure
--prefix="$$install_prefix"
144 $(MAKE
) -C
$(distdir
) -q distprep
145 $(MAKE
) -C
$(distdir
)
146 $(MAKE
) -C
$(distdir
) install
147 $(MAKE
) -C
$(distdir
) uninstall
148 @echo
"checking whether \`$(MAKE) uninstall' works"
149 test `find $(dummy) ! -type d | wc -l` -eq
0
150 $(MAKE
) -C
$(distdir
) dist
151 # Room for improvement: Check here whether this distribution tarball
152 # is sufficiently similar to the original one.
153 rm -rf
$(distdir
) $(dummy
)
154 @echo
"Distribution integrity checks out."
156 .PHONY
: dist distdir distcheck