2000-06-07 02:01:15 +04:00
|
|
|
#
|
|
|
|
# PostgreSQL top level makefile
|
|
|
|
#
|
2002-03-29 20:32:55 +03:00
|
|
|
# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.24 2002/03/29 17:32:48 petere Exp $
|
2000-06-07 02:01:15 +04:00
|
|
|
#
|
|
|
|
|
2000-06-28 22:30:16 +04:00
|
|
|
subdir =
|
2000-06-07 02:01:15 +04:00
|
|
|
top_builddir = .
|
2000-08-31 20:12:35 +04:00
|
|
|
include $(top_builddir)/src/Makefile.global
|
2000-06-07 02:01:15 +04:00
|
|
|
|
|
|
|
all:
|
2000-07-18 02:31:59 +04:00
|
|
|
$(MAKE) -C doc all
|
2000-06-08 03:09:18 +04:00
|
|
|
$(MAKE) -C src all
|
2000-06-07 02:01:15 +04:00
|
|
|
@echo "All of PostgreSQL successfully made. Ready to install."
|
|
|
|
|
|
|
|
install:
|
2000-07-18 02:31:59 +04:00
|
|
|
$(MAKE) -C doc install
|
2000-06-08 03:09:18 +04:00
|
|
|
$(MAKE) -C src install
|
2000-06-07 02:01:15 +04:00
|
|
|
@cat $(srcdir)/register.txt
|
|
|
|
|
2000-12-04 03:34:40 +03:00
|
|
|
installdirs uninstall distprep:
|
2000-07-18 02:31:59 +04:00
|
|
|
$(MAKE) -C doc $@
|
2000-06-28 22:30:16 +04:00
|
|
|
$(MAKE) -C src $@
|
|
|
|
|
2001-02-10 05:31:31 +03:00
|
|
|
install-all-headers:
|
|
|
|
$(MAKE) -C src $@
|
|
|
|
|
2000-12-04 03:34:40 +03: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 $@
|
2002-03-29 20:32:55 +03:00
|
|
|
# Garbage from autoconf:
|
|
|
|
@rm -rf autom4te.cache/
|
2000-12-04 03:34:40 +03:00
|
|
|
|
|
|
|
# Important: distclean `src' last, otherwise Makefile.global
|
2000-07-18 02:31:59 +04:00
|
|
|
# will be gone too soon.
|
2000-06-28 22:30:16 +04:00
|
|
|
distclean maintainer-clean:
|
2000-07-18 02:31:59 +04:00
|
|
|
-$(MAKE) -C doc $@
|
2000-12-04 03:34:40 +03:00
|
|
|
-$(MAKE) -C contrib $@
|
2000-06-28 22:30:16 +04:00
|
|
|
-$(MAKE) -C src $@
|
2000-06-07 02:01:15 +04:00
|
|
|
-rm -f config.cache config.log config.status GNUmakefile
|
2002-03-29 20:32:55 +03:00
|
|
|
# Garbage from autoconf:
|
|
|
|
@rm -rf autom4te.cache/
|
2000-06-07 02:01:15 +04:00
|
|
|
|
2000-10-03 02:21:21 +04:00
|
|
|
check: all
|
|
|
|
|
|
|
|
check installcheck:
|
2000-09-29 21:17:41 +04:00
|
|
|
$(MAKE) -C src/test $@
|
2000-06-07 02:01:15 +04:00
|
|
|
|
2000-06-10 22:02:12 +04:00
|
|
|
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
|
2002-03-29 20:32:55 +03:00
|
|
|
./config.status $@
|
2000-06-10 22:02:12 +04:00
|
|
|
|
|
|
|
|
2000-07-19 20:30:27 +04:00
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
distdir := postgresql-$(VERSION)
|
|
|
|
dummy := =install=
|
|
|
|
garbage := =* "#"* ."#"* *~* *.orig *.rej core postgresql-*
|
|
|
|
|
|
|
|
dist: $(distdir).tar.gz
|
|
|
|
ifeq ($(split-dist), yes)
|
2001-04-08 21:28:10 +04:00
|
|
|
dist: postgresql-base-$(VERSION).tar.gz postgresql-docs-$(VERSION).tar.gz postgresql-opt-$(VERSION).tar.gz postgresql-test-$(VERSION).tar.gz
|
2000-07-19 20:30:27 +04:00
|
|
|
endif
|
|
|
|
dist:
|
|
|
|
-rm -rf $(distdir)
|
|
|
|
|
|
|
|
$(distdir).tar: distdir
|
|
|
|
$(TAR) chf $@ $(distdir)
|
|
|
|
|
2001-11-21 08:41:15 +03:00
|
|
|
opt_files := src/backend/utils/mb contrib/retep/build.xml \
|
2001-04-08 21:28:10 +04:00
|
|
|
src/tools src/corba src/data src/tutorial \
|
|
|
|
$(addprefix src/bin/, pgaccess pgtclsh pg_encoding) \
|
|
|
|
$(addprefix src/interfaces/, odbc libpq++ libpgtcl perl5 python jdbc) \
|
|
|
|
$(addprefix src/pl/, plperl tcl)
|
|
|
|
|
2001-11-22 02:19:25 +03:00
|
|
|
docs_files := doc/postgres.tar.gz doc/src doc/TODO.detail
|
2001-04-08 21:28:10 +04:00
|
|
|
|
|
|
|
postgresql-base-$(VERSION).tar: distdir
|
|
|
|
$(TAR) -c $(addprefix --exclude $(distdir)/, $(docs_files) $(opt_files) src/test) \
|
2000-07-19 20:30:27 +04:00
|
|
|
-f $@ $(distdir)
|
|
|
|
|
2001-04-08 21:28:10 +04:00
|
|
|
postgresql-docs-$(VERSION).tar: distdir
|
|
|
|
$(TAR) cf $@ $(addprefix $(distdir)/, $(docs_files))
|
2000-07-19 20:30:27 +04:00
|
|
|
|
2001-04-08 21:28:10 +04:00
|
|
|
postgresql-opt-$(VERSION).tar: distdir
|
|
|
|
$(TAR) cf $@ $(addprefix $(distdir)/, $(opt_files))
|
2000-07-19 20:30:27 +04:00
|
|
|
|
2001-04-08 21:28:10 +04:00
|
|
|
postgresql-test-$(VERSION).tar: distdir
|
2000-07-19 20:30:27 +04:00
|
|
|
$(TAR) cf $@ $(distdir)/src/test
|
|
|
|
|
2000-08-20 19:55:15 +04:00
|
|
|
distdir:
|
|
|
|
-rm -rf $(distdir)* $(dummy)
|
2000-07-19 20:30:27 +04:00
|
|
|
for x in `cd $(top_srcdir) && find . -name CVS -prune -o -print`; do \
|
2000-08-20 19:55:15 +04:00
|
|
|
file=`expr X$$x : 'X\./\(.*\)'`; \
|
2000-07-19 20:30:27 +04:00
|
|
|
if test -d "$(top_srcdir)/$$file" ; then \
|
|
|
|
mkdir "$(distdir)/$$file" && chmod 777 "$(distdir)/$$file"; \
|
|
|
|
else \
|
2000-08-20 19:55:15 +04:00
|
|
|
ln "$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev/null 2>&1 \
|
|
|
|
|| cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
|
2000-07-19 20:30:27 +04:00
|
|
|
fi || exit; \
|
|
|
|
done
|
2000-08-20 19:55:15 +04:00
|
|
|
$(MAKE) -C $(distdir) distprep
|
2000-07-19 20:30:27 +04:00
|
|
|
$(MAKE) -C $(distdir) distclean
|
|
|
|
|
2000-08-20 19:55:15 +04:00
|
|
|
distcheck: $(distdir).tar.gz
|
2000-07-19 20:30:27 +04:00
|
|
|
-rm -rf $(dummy)
|
|
|
|
mkdir $(dummy)
|
2001-09-18 03:00:27 +04:00
|
|
|
$(GZIP) -d -c $< | $(TAR) xf -
|
2000-07-19 20:30:27 +04: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 00:24:01 +03:00
|
|
|
test `find $(dummy) ! -type d | wc -l` -eq 0
|
2000-07-19 20:30:27 +04:00
|
|
|
$(MAKE) -C $(distdir) dist
|
|
|
|
# Room for improvement: Check here whether this distribution tarball
|
|
|
|
# is sufficiently similar to the original one.
|
|
|
|
-rm -rf $(distdir) $(dummy)
|
|
|
|
@echo "Distribution integrity checks out."
|
|
|
|
|
|
|
|
.PHONY: dist distdir distcheck
|
2001-04-08 21:28:10 +04:00
|
|
|
unexport split-dist
|