OSDN Git Service

Remove JDBC from the build system and documentation, too.
[pg-rex/syncrep.git] / GNUmakefile.in
1 #
2 # PostgreSQL top level makefile
3 #
4 # $PostgreSQL: pgsql/GNUmakefile.in,v 1.37 2004/01/19 21:20:04 tgl Exp $
5 #
6
7 subdir =
8 top_builddir = .
9 include $(top_builddir)/src/Makefile.global
10
11 all:
12         $(MAKE) -C doc all
13         $(MAKE) -C src all
14         @echo "All of PostgreSQL successfully made. Ready to install."
15
16 install:
17         $(MAKE) -C doc install
18         $(MAKE) -C src install
19         @echo "PostgreSQL installation complete."
20
21 installdirs uninstall distprep:
22         $(MAKE) -C doc $@
23         $(MAKE) -C src $@
24
25 install-all-headers:
26         $(MAKE) -C src $@
27
28 # clean, distclean, etc should apply to contrib too, even though
29 # it's not built by default
30 clean:
31         $(MAKE) -C doc $@
32         $(MAKE) -C contrib $@
33         $(MAKE) -C src $@
34 # Garbage from autoconf:
35         @rm -rf autom4te.cache/
36
37 # Important: distclean `src' last, otherwise Makefile.global
38 # will be gone too soon.
39 distclean maintainer-clean:
40         -$(MAKE) -C doc $@
41         -$(MAKE) -C contrib $@
42         -$(MAKE) -C src $@
43         -rm -f config.cache config.log config.status GNUmakefile
44 # Garbage from autoconf:
45         @rm -rf autom4te.cache/
46
47 check: all
48
49 check installcheck:
50         $(MAKE) -C src/test $@
51
52 GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
53         ./config.status $@
54
55
56 ##########################################################################
57
58 distdir := postgresql-$(VERSION)
59 dummy   := =install=
60 garbage := =*  "#"*  ."#"*  *~*  *.orig  *.rej  core  postgresql-*
61
62 dist: $(distdir).tar.gz 
63 ifeq ($(split-dist), yes)
64 dist: postgresql-base-$(VERSION).tar.gz postgresql-docs-$(VERSION).tar.gz postgresql-opt-$(VERSION).tar.gz postgresql-test-$(VERSION).tar.gz 
65 endif
66 dist:
67         -rm -rf $(distdir)
68
69 $(distdir).tar: distdir
70         $(TAR) chf $@ $(distdir)
71
72 opt_files := \
73         src/tools src/corba src/tutorial \
74         src/bin/pgtclsh \
75         $(addprefix src/interfaces/, libpgtcl) \
76         $(addprefix src/pl/, plperl plpython tcl)
77
78 docs_files := doc/postgres.tar.gz doc/src doc/TODO.detail
79
80 postgresql-base-$(VERSION).tar: distdir
81         $(TAR) -c $(addprefix --exclude $(distdir)/, $(docs_files) $(opt_files) src/test) \
82           -f $@ $(distdir)
83
84 postgresql-docs-$(VERSION).tar: distdir
85         $(TAR) cf $@ $(addprefix $(distdir)/, $(docs_files))
86
87 postgresql-opt-$(VERSION).tar: distdir
88         $(TAR) cf $@ $(addprefix $(distdir)/, $(opt_files))
89
90 postgresql-test-$(VERSION).tar: distdir
91         $(TAR) cf $@ $(distdir)/src/test
92
93 distdir:
94         -rm -rf $(distdir)* $(dummy)
95         for x in `cd $(top_srcdir) && find . -name CVS -prune -o -print`; do \
96           file=`expr X$$x : 'X\./\(.*\)'`; \
97           if test -d "$(top_srcdir)/$$file" ; then \
98             mkdir "$(distdir)/$$file" && chmod 777 "$(distdir)/$$file"; \
99           else \
100             ln "$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev/null 2>&1 \
101               || cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
102           fi || exit; \
103         done
104         $(MAKE) -C $(distdir) distprep
105         $(MAKE) -C $(distdir) distclean
106
107 distcheck: $(distdir).tar.gz
108         -rm -rf $(dummy)
109         mkdir $(dummy)
110         $(GZIP) -d -c $< | $(TAR) xf -
111         install_prefix=`cd $(dummy) && pwd`; \
112         cd $(distdir) \
113         && ./configure --prefix="$$install_prefix"
114         $(MAKE) -C $(distdir) -q distprep
115         $(MAKE) -C $(distdir)
116         $(MAKE) -C $(distdir) install
117         $(MAKE) -C $(distdir) uninstall
118         @echo "checking whether \`$(MAKE) uninstall' works"
119         test `find $(dummy) ! -type d | wc -l` -eq 0
120         $(MAKE) -C $(distdir) dist
121 # Room for improvement: Check here whether this distribution tarball
122 # is sufficiently similar to the original one.
123         -rm -rf $(distdir) $(dummy)
124         @echo "Distribution integrity checks out."
125
126 .PHONY: dist distdir distcheck
127 unexport split-dist