OSDN Git Service

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