2000-06-07 02:01:15 +04:00
|
|
|
#
|
|
|
|
# PostgreSQL top level makefile
|
|
|
|
#
|
2000-08-20 19:55:15 +04:00
|
|
|
# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.10 2000/08/20 15:55:15 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-06-28 22:30:16 +04:00
|
|
|
include 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-07-19 20:30:27 +04:00
|
|
|
installdirs uninstall clean distprep:
|
2000-07-18 02:31:59 +04:00
|
|
|
$(MAKE) -C doc $@
|
2000-06-28 22:30:16 +04:00
|
|
|
$(MAKE) -C src $@
|
|
|
|
|
2000-07-18 02:31:59 +04:00
|
|
|
# Important: distclean `doc' before `src', otherwise Makefile.global
|
|
|
|
# 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-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
|
|
|
|
|
|
|
|
|
2000-06-10 22:02:12 +04:00
|
|
|
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
|
|
|
|
CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
|
|
|
|
|
|
|
|
|
2000-06-14 22:18:01 +04:00
|
|
|
# These dependencies are risky because both the target and the sources
|
|
|
|
# are in CVS and CVS doesn't preserve timestamps, thus leading to
|
|
|
|
# unnecessary reruns of these rules.
|
2000-06-10 22:02:12 +04:00
|
|
|
|
2000-06-14 22:18:01 +04:00
|
|
|
AUTOCONF = autoconf
|
2000-06-11 22:43:52 +04:00
|
|
|
|
2000-06-14 22:18:01 +04:00
|
|
|
# Only use this rule if you actually said `make configure'.
|
|
|
|
ifeq ($(MAKECMDGOALS),configure)
|
|
|
|
$(top_srcdir)/configure: $(top_srcdir)/configure.in $(top_srcdir)/aclocal.m4
|
|
|
|
cd $(top_srcdir) && $(AUTOCONF)
|
|
|
|
endif
|
2000-06-11 22:43:52 +04:00
|
|
|
|
2000-06-14 22:18:01 +04:00
|
|
|
# This one we can leave unprotected because by default nothing depends
|
|
|
|
# on aclocal.m4. This rule is only invoked if you say `make
|
|
|
|
# aclocal.m4' or `make configure'.
|
|
|
|
$(top_srcdir)/aclocal.m4: $(wildcard $(top_srcdir)/config/*.m4)
|
|
|
|
cat $^ > $@
|
2000-07-19 20:30:27 +04:00
|
|
|
|
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
distdir := postgresql-$(VERSION)
|
|
|
|
dummy := =install=
|
|
|
|
garbage := =* "#"* ."#"* *~* *.orig *.rej core postgresql-*
|
|
|
|
|
2000-08-20 19:55:15 +04:00
|
|
|
GZIP := gzip
|
|
|
|
BZIP2 := bzip2
|
2000-07-19 20:30:27 +04:00
|
|
|
|
|
|
|
dist: $(distdir).tar.gz
|
|
|
|
ifeq ($(split-dist), yes)
|
|
|
|
dist: $(distdir).base.tar.gz $(distdir).docs.tar.gz $(distdir).support.tar.gz $(distdir).test.tar.gz
|
|
|
|
endif
|
|
|
|
dist:
|
|
|
|
-rm -rf $(distdir)
|
|
|
|
|
|
|
|
$(distdir).tar: distdir
|
|
|
|
$(TAR) chf $@ $(distdir)
|
|
|
|
|
|
|
|
$(distdir).base.tar: distdir
|
|
|
|
$(TAR) -c $(addprefix --exclude $(distdir)/, doc src/test src/interfaces src/bin) \
|
|
|
|
-f $@ $(distdir)
|
|
|
|
|
|
|
|
$(distdir).docs.tar: distdir
|
|
|
|
$(TAR) cf $@ $(distdir)/doc
|
|
|
|
|
|
|
|
$(distdir).support.tar: distdir
|
|
|
|
$(TAR) cf $@ $(distdir)/src/interfaces $(distdir)/src/bin
|
|
|
|
|
|
|
|
$(distdir).test.tar: distdir
|
|
|
|
$(TAR) cf $@ $(distdir)/src/test
|
|
|
|
|
|
|
|
%.gz: %
|
2000-08-20 19:55:15 +04:00
|
|
|
$(GZIP) -f --best $<
|
2000-07-19 20:30:27 +04:00
|
|
|
|
2000-08-20 19:55:15 +04:00
|
|
|
%.bz2: %
|
|
|
|
$(BZIP2) -f $<
|
|
|
|
|
|
|
|
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)
|
2000-08-20 19:55:15 +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"
|
|
|
|
test `find $(dummy) -not -type d | wc -l` -eq 0
|
|
|
|
$(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
|