#
# PostgreSQL top level makefile
#
-# $PostgreSQL: pgsql/GNUmakefile.in,v 1.50 2009/01/15 01:53:49 momjian Exp $
+# GNUmakefile.in
#
subdir =
top_builddir = .
include $(top_builddir)/src/Makefile.global
+$(call recurse,all install,src config)
+
all:
+ +@echo "All of PostgreSQL successfully made. Ready to install."
+
+docs:
$(MAKE) -C doc all
- $(MAKE) -C src all
- $(MAKE) -C config all
- @echo "All of PostgreSQL successfully made. Ready to install."
-install:
- $(MAKE) -C doc $@
- $(MAKE) -C src $@
- $(MAKE) -C config $@
- @echo "PostgreSQL installation complete."
+$(call recurse,world,doc src config contrib,all)
+world:
+ +@echo "PostgreSQL, contrib, and documentation successfully made. Ready to install."
-installdirs uninstall:
- $(MAKE) -C doc $@
- $(MAKE) -C src $@
- $(MAKE) -C config $@
+# build src/ before contrib/
+world-contrib-recurse: world-src-recurse
-distprep:
+html man:
$(MAKE) -C doc $@
- $(MAKE) -C src $@
- $(MAKE) -C config $@
- $(MAKE) -C contrib $@
+
+install:
+ +@echo "PostgreSQL installation complete."
+
+install-docs:
+ $(MAKE) -C doc install
+
+$(call recurse,install-world,doc src config contrib,install)
+install-world:
+ +@echo "PostgreSQL, contrib, and documentation installation complete."
+
+# build src/ before contrib/
+install-world-contrib-recurse: install-world-src-recurse
+
+$(call recurse,installdirs uninstall coverage init-po update-po,doc src config)
+
+$(call recurse,distprep,doc src config contrib)
# clean, distclean, etc should apply to contrib too, even though
# it's not built by default
+$(call recurse,clean,doc contrib src config)
clean:
- $(MAKE) -C doc $@
- $(MAKE) -C contrib $@
- $(MAKE) -C src $@
- $(MAKE) -C config $@
+ rm -rf tmp_install/
# Garbage from autoconf:
@rm -rf autom4te.cache/
$(MAKE) -C contrib $@
$(MAKE) -C config $@
$(MAKE) -C src $@
- rm -f config.cache config.log config.status GNUmakefile
+ rm -rf tmp_install/
# Garbage from autoconf:
@rm -rf autom4te.cache/
+ rm -f config.cache config.log config.status GNUmakefile
-check: all
+check check-tests installcheck installcheck-parallel installcheck-tests:
+ $(MAKE) -C src/test/regress $@
-check installcheck installcheck-parallel:
- $(MAKE) -C src/test $@
+$(call recurse,check-world,src/test src/pl src/interfaces/ecpg contrib src/bin,check)
+
+$(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib src/bin,installcheck)
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
./config.status $@
-##########################################################################
-
-coverage:
- $(MAKE) -C src/backend $@
-
-.PHONY: coverage-html
-coverage-html: coverage
- rm -rf coverage
- mkdir coverage
- $(GENHTML) --show-details --legend --output-directory=coverage --title=PostgreSQL --num-spaces=4 --prefix=$(abs_top_srcdir)/src `find src/backend -name lcov.info -print`
-
-ifeq ($(enable_coverage),yes)
-clean distclean maintainer-clean: clean-coverage-local
-.PHONY: clean-coverage-local
-clean-coverage-local:
- rm -rf coverage
-endif
-
-
##########################################################################
distdir = postgresql-$(VERSION)
dummy = =install=
garbage = =* "#"* ."#"* *~* *.orig *.rej core postgresql-*
-dist: $(distdir).tar.gz
-ifeq ($(split-dist), yes)
-dist: postgresql-base-$(VERSION).tar.gz postgresql-docs-$(VERSION).tar.gz postgresql-opt-$(VERSION).tar.gz postgresql-test-$(VERSION).tar.gz
-endif
-dist:
+dist: $(distdir).tar.gz $(distdir).tar.bz2
rm -rf $(distdir)
$(distdir).tar: distdir
$(TAR) chf $@ $(distdir)
-opt_files = \
- src/tools src/tutorial \
- $(addprefix src/pl/, plperl plpython tcl)
-
-docs_files = doc/postgres.tar.gz doc/src doc/TODO.detail
-
-postgresql-base-$(VERSION).tar: distdir
- $(TAR) -c $(addprefix --exclude $(distdir)/, $(docs_files) $(opt_files) src/test) \
- -f $@ $(distdir)
-
-postgresql-docs-$(VERSION).tar: distdir
- $(TAR) cf $@ $(addprefix $(distdir)/, $(docs_files))
-
-postgresql-opt-$(VERSION).tar: distdir
- $(TAR) cf $@ $(addprefix $(distdir)/, $(opt_files))
+.INTERMEDIATE: $(distdir).tar
-postgresql-test-$(VERSION).tar: distdir
- $(TAR) cf $@ $(distdir)/src/test
+distdir-location:
+ @echo $(distdir)
distdir:
rm -rf $(distdir)* $(dummy)
fi || exit; \
done
$(MAKE) -C $(distdir) distprep
- $(MAKE) -C $(distdir)/doc/src/sgml/ HISTORY INSTALL regress_README
- cp $(distdir)/doc/src/sgml/HISTORY $(distdir)/
+ $(MAKE) -C $(distdir)/doc/src/sgml/ INSTALL
cp $(distdir)/doc/src/sgml/INSTALL $(distdir)/
- cp $(distdir)/doc/src/sgml/regress_README $(distdir)/src/test/regress/README
$(MAKE) -C $(distdir) distclean
- rm -f $(distdir)/README.CVS
+ rm -f $(distdir)/README.git
-distcheck: $(distdir).tar.gz
+distcheck: dist
rm -rf $(dummy)
mkdir $(dummy)
- $(GZIP) -d -c $< | $(TAR) xf -
+ $(GZIP) -d -c $(distdir).tar.gz | $(TAR) xf -
install_prefix=`cd $(dummy) && pwd`; \
cd $(distdir) \
&& ./configure --prefix="$$install_prefix"
rm -rf $(distdir) $(dummy)
@echo "Distribution integrity checks out."
-.PHONY: dist distdir distcheck
-unexport split-dist
+.PHONY: dist distdir distcheck docs install-docs world check-world install-world installcheck-world