2000-06-07 06:01:15 +08:00
|
|
|
#
|
|
|
|
# PostgreSQL top level makefile
|
|
|
|
#
|
2008-03-19 00:24:50 +08:00
|
|
|
# $PostgreSQL: pgsql/GNUmakefile.in,v 1.47 2008/03/18 16:24:50 petere Exp $
|
2000-06-07 06:01:15 +08:00
|
|
|
#
|
|
|
|
|
2000-06-29 02:30:16 +08:00
|
|
|
subdir =
|
2000-06-07 06:01:15 +08:00
|
|
|
top_builddir = .
|
2000-09-01 00:12:35 +08:00
|
|
|
include $(top_builddir)/src/Makefile.global
|
2000-06-07 06:01:15 +08:00
|
|
|
|
|
|
|
all:
|
2000-07-18 06:31:59 +08:00
|
|
|
$(MAKE) -C doc all
|
2000-06-08 07:09:18 +08:00
|
|
|
$(MAKE) -C src all
|
2004-07-30 20:26:40 +08:00
|
|
|
$(MAKE) -C config all
|
2000-06-07 06:01:15 +08:00
|
|
|
@echo "All of PostgreSQL successfully made. Ready to install."
|
|
|
|
|
|
|
|
install:
|
2004-10-06 16:50:02 +08:00
|
|
|
$(MAKE) -C doc $@
|
|
|
|
$(MAKE) -C src $@
|
|
|
|
$(MAKE) -C config $@
|
2003-10-14 05:39:41 +08:00
|
|
|
@echo "PostgreSQL installation complete."
|
2000-06-07 06:01:15 +08:00
|
|
|
|
2006-04-04 02:47:41 +08:00
|
|
|
installdirs uninstall:
|
2000-07-18 06:31:59 +08:00
|
|
|
$(MAKE) -C doc $@
|
2000-06-29 02:30:16 +08:00
|
|
|
$(MAKE) -C src $@
|
2004-07-30 20:26:40 +08:00
|
|
|
$(MAKE) -C config $@
|
2000-06-29 02:30:16 +08:00
|
|
|
|
2006-04-04 02:47:41 +08:00
|
|
|
distprep:
|
|
|
|
$(MAKE) -C doc $@
|
|
|
|
$(MAKE) -C src $@
|
|
|
|
$(MAKE) -C config $@
|
|
|
|
$(MAKE) -C contrib $@
|
|
|
|
|
2000-12-04 08:34:40 +08:00
|
|
|
# clean, distclean, etc should apply to contrib too, even though
|
|
|
|
# it's not built by default
|
|
|
|
clean:
|
|
|
|
$(MAKE) -C doc $@
|
|
|
|
$(MAKE) -C contrib $@
|
|
|
|
$(MAKE) -C src $@
|
2004-07-30 20:26:40 +08:00
|
|
|
$(MAKE) -C config $@
|
2002-03-30 01:32:55 +08:00
|
|
|
# Garbage from autoconf:
|
|
|
|
@rm -rf autom4te.cache/
|
2000-12-04 08:34:40 +08:00
|
|
|
|
|
|
|
# Important: distclean `src' last, otherwise Makefile.global
|
2000-07-18 06:31:59 +08:00
|
|
|
# will be gone too soon.
|
2000-06-29 02:30:16 +08:00
|
|
|
distclean maintainer-clean:
|
2008-03-19 00:24:50 +08:00
|
|
|
$(MAKE) -C doc $@
|
|
|
|
$(MAKE) -C contrib $@
|
|
|
|
$(MAKE) -C config $@
|
|
|
|
$(MAKE) -C src $@
|
|
|
|
rm -f config.cache config.log config.status GNUmakefile
|
2002-03-30 01:32:55 +08:00
|
|
|
# Garbage from autoconf:
|
|
|
|
@rm -rf autom4te.cache/
|
2000-06-07 06:01:15 +08:00
|
|
|
|
2000-10-03 06:21:21 +08:00
|
|
|
check: all
|
|
|
|
|
2006-08-19 03:58:05 +08:00
|
|
|
check installcheck installcheck-parallel:
|
2000-09-30 01:17:41 +08:00
|
|
|
$(MAKE) -C src/test $@
|
2000-06-07 06:01:15 +08:00
|
|
|
|
2000-06-11 02:02:12 +08:00
|
|
|
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
|
2002-03-30 01:32:55 +08:00
|
|
|
./config.status $@
|
2000-06-11 02:02:12 +08:00
|
|
|
|
|
|
|
|
2000-07-20 00:30:27 +08:00
|
|
|
##########################################################################
|
|
|
|
|
2007-02-09 23:56:00 +08:00
|
|
|
distdir = postgresql-$(VERSION)
|
|
|
|
dummy = =install=
|
|
|
|
garbage = =* "#"* ."#"* *~* *.orig *.rej core postgresql-*
|
2000-07-20 00:30:27 +08:00
|
|
|
|
2003-08-05 12:55:58 +08:00
|
|
|
dist: $(distdir).tar.gz
|
2000-07-20 00:30:27 +08:00
|
|
|
ifeq ($(split-dist), yes)
|
2003-08-05 12:55:58 +08:00
|
|
|
dist: postgresql-base-$(VERSION).tar.gz postgresql-docs-$(VERSION).tar.gz postgresql-opt-$(VERSION).tar.gz postgresql-test-$(VERSION).tar.gz
|
2000-07-20 00:30:27 +08:00
|
|
|
endif
|
|
|
|
dist:
|
2008-03-19 00:24:50 +08:00
|
|
|
rm -rf $(distdir)
|
2000-07-20 00:30:27 +08:00
|
|
|
|
|
|
|
$(distdir).tar: distdir
|
|
|
|
$(TAR) chf $@ $(distdir)
|
|
|
|
|
2007-02-09 23:56:00 +08:00
|
|
|
opt_files = \
|
2005-05-01 14:15:51 +08:00
|
|
|
src/tools src/tutorial \
|
2002-09-07 05:57:11 +08:00
|
|
|
$(addprefix src/pl/, plperl plpython tcl)
|
2001-04-09 01:28:10 +08:00
|
|
|
|
2007-02-09 23:56:00 +08:00
|
|
|
docs_files = doc/postgres.tar.gz doc/src doc/TODO.detail
|
2001-04-09 01:28:10 +08:00
|
|
|
|
|
|
|
postgresql-base-$(VERSION).tar: distdir
|
|
|
|
$(TAR) -c $(addprefix --exclude $(distdir)/, $(docs_files) $(opt_files) src/test) \
|
2000-07-20 00:30:27 +08:00
|
|
|
-f $@ $(distdir)
|
|
|
|
|
2001-04-09 01:28:10 +08:00
|
|
|
postgresql-docs-$(VERSION).tar: distdir
|
|
|
|
$(TAR) cf $@ $(addprefix $(distdir)/, $(docs_files))
|
2000-07-20 00:30:27 +08:00
|
|
|
|
2001-04-09 01:28:10 +08:00
|
|
|
postgresql-opt-$(VERSION).tar: distdir
|
|
|
|
$(TAR) cf $@ $(addprefix $(distdir)/, $(opt_files))
|
2000-07-20 00:30:27 +08:00
|
|
|
|
2001-04-09 01:28:10 +08:00
|
|
|
postgresql-test-$(VERSION).tar: distdir
|
2000-07-20 00:30:27 +08:00
|
|
|
$(TAR) cf $@ $(distdir)/src/test
|
|
|
|
|
2000-08-20 23:55:15 +08:00
|
|
|
distdir:
|
2008-03-19 00:24:50 +08:00
|
|
|
rm -rf $(distdir)* $(dummy)
|
2000-07-20 00:30:27 +08:00
|
|
|
for x in `cd $(top_srcdir) && find . -name CVS -prune -o -print`; do \
|
2000-08-20 23:55:15 +08:00
|
|
|
file=`expr X$$x : 'X\./\(.*\)'`; \
|
2000-07-20 00:30:27 +08:00
|
|
|
if test -d "$(top_srcdir)/$$file" ; then \
|
|
|
|
mkdir "$(distdir)/$$file" && chmod 777 "$(distdir)/$$file"; \
|
|
|
|
else \
|
2000-08-20 23:55:15 +08:00
|
|
|
ln "$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev/null 2>&1 \
|
|
|
|
|| cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
|
2000-07-20 00:30:27 +08:00
|
|
|
fi || exit; \
|
|
|
|
done
|
2000-08-20 23:55:15 +08:00
|
|
|
$(MAKE) -C $(distdir) distprep
|
2006-04-07 02:54:37 +08:00
|
|
|
$(MAKE) -C $(distdir)/doc/src/sgml/ HISTORY INSTALL regress_README
|
|
|
|
cp $(distdir)/doc/src/sgml/HISTORY $(distdir)/
|
|
|
|
cp $(distdir)/doc/src/sgml/INSTALL $(distdir)/
|
|
|
|
cp $(distdir)/doc/src/sgml/regress_README $(distdir)/src/test/regress/README
|
2000-07-20 00:30:27 +08:00
|
|
|
$(MAKE) -C $(distdir) distclean
|
2004-06-14 05:51:36 +08:00
|
|
|
rm -f $(distdir)/README.CVS
|
2000-07-20 00:30:27 +08:00
|
|
|
|
2000-08-20 23:55:15 +08:00
|
|
|
distcheck: $(distdir).tar.gz
|
2008-03-19 00:24:50 +08:00
|
|
|
rm -rf $(dummy)
|
2000-07-20 00:30:27 +08:00
|
|
|
mkdir $(dummy)
|
2001-09-18 07:00:27 +08:00
|
|
|
$(GZIP) -d -c $< | $(TAR) xf -
|
2000-07-20 00:30:27 +08:00
|
|
|
install_prefix=`cd $(dummy) && pwd`; \
|
|
|
|
cd $(distdir) \
|
|
|
|
&& ./configure --prefix="$$install_prefix"
|
|
|
|
$(MAKE) -C $(distdir) -q distprep
|
|
|
|
$(MAKE) -C $(distdir)
|
|
|
|
$(MAKE) -C $(distdir) install
|
|
|
|
$(MAKE) -C $(distdir) uninstall
|
|
|
|
@echo "checking whether \`$(MAKE) uninstall' works"
|
2001-01-07 05:24:01 +08:00
|
|
|
test `find $(dummy) ! -type d | wc -l` -eq 0
|
2000-07-20 00:30:27 +08:00
|
|
|
$(MAKE) -C $(distdir) dist
|
|
|
|
# Room for improvement: Check here whether this distribution tarball
|
|
|
|
# is sufficiently similar to the original one.
|
2008-03-19 00:24:50 +08:00
|
|
|
rm -rf $(distdir) $(dummy)
|
2000-07-20 00:30:27 +08:00
|
|
|
@echo "Distribution integrity checks out."
|
|
|
|
|
|
|
|
.PHONY: dist distdir distcheck
|
2001-04-09 01:28:10 +08:00
|
|
|
unexport split-dist
|