]> granicus.if.org Git - postgresql/blob - GNUmakefile.in
Attached is a patch that prevents a NullPointerException in the JDBC
[postgresql] / GNUmakefile.in
1 #
2 # PostgreSQL top level makefile
3 #
4 # $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.11 2000/08/31 16:08:58 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         @echo "All of PostgreSQL successfully made. Ready to install."
15
16 install:
17         $(MAKE) -C doc install
18         $(MAKE) -C src install
19         @cat $(srcdir)/register.txt
20
21 installdirs uninstall clean distprep:
22         $(MAKE) -C doc $@
23         $(MAKE) -C src $@
24
25 # Important: distclean `doc' before `src', otherwise Makefile.global
26 # will be gone too soon.
27 distclean maintainer-clean:
28         -$(MAKE) -C doc $@
29         -$(MAKE) -C src $@
30         -rm -f config.cache config.log config.status GNUmakefile
31
32
33 GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
34         CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
35
36
37 # These dependencies are risky because both the target and the sources
38 # are in CVS and CVS doesn't preserve timestamps, thus leading to
39 # unnecessary reruns of these rules.
40
41 AUTOCONF = autoconf
42
43 # Only use this rule if you actually said `make configure'.
44 ifeq ($(MAKECMDGOALS),configure)
45 $(top_srcdir)/configure: $(top_srcdir)/configure.in $(top_srcdir)/aclocal.m4
46         cd $(top_srcdir) && $(AUTOCONF)
47 endif
48
49 # This one we can leave unprotected because by default nothing depends
50 # on aclocal.m4. This rule is only invoked if you say `make
51 # aclocal.m4' or `make configure'.
52 $(top_srcdir)/aclocal.m4: $(wildcard $(top_srcdir)/config/*.m4)
53         cat $^ > $@
54
55
56 ##########################################################################
57
58 distdir := postgresql-$(VERSION)
59 dummy   := =install=
60 garbage := =*  "#"*  ."#"*  *~*  *.orig  *.rej  core  postgresql-*
61
62 GZIP    := gzip
63 BZIP2   := bzip2
64
65 dist: $(distdir).tar.gz
66 ifeq ($(split-dist), yes)
67 dist: $(distdir).base.tar.gz $(distdir).docs.tar.gz $(distdir).support.tar.gz $(distdir).test.tar.gz
68 endif
69 dist:
70         -rm -rf $(distdir)
71
72 $(distdir).tar: distdir
73         $(TAR) chf $@ $(distdir)
74
75 $(distdir).base.tar: distdir
76         $(TAR) -c $(addprefix --exclude $(distdir)/, doc src/test src/interfaces src/bin) \
77           -f $@ $(distdir)
78
79 $(distdir).docs.tar: distdir
80         $(TAR) cf $@ $(distdir)/doc
81
82 $(distdir).support.tar: distdir
83         $(TAR) cf $@ $(distdir)/src/interfaces $(distdir)/src/bin
84
85 $(distdir).test.tar: distdir
86         $(TAR) cf $@ $(distdir)/src/test
87
88 %.gz: %
89         $(GZIP) -f --best $<
90
91 %.bz2: %
92         $(BZIP2) -f $<
93
94 distdir:
95         -rm -rf $(distdir)* $(dummy)
96         for x in `cd $(top_srcdir) && find . -name CVS -prune -o -print`; do \
97           file=`expr X$$x : 'X\./\(.*\)'`; \
98           if test -d "$(top_srcdir)/$$file" ; then \
99             mkdir "$(distdir)/$$file" && chmod 777 "$(distdir)/$$file"; \
100           else \
101             ln "$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev/null 2>&1 \
102               || cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
103           fi || exit; \
104         done
105         $(MAKE) -C $(distdir) distprep
106         $(MAKE) -C $(distdir) distclean
107
108 distcheck: $(distdir).tar.gz
109         -rm -rf $(dummy)
110         mkdir $(dummy)
111         gzip -d -c $< | $(TAR) xf -
112         install_prefix=`cd $(dummy) && pwd`; \
113         cd $(distdir) \
114         && ./configure --prefix="$$install_prefix"
115         $(MAKE) -C $(distdir) -q distprep
116         $(MAKE) -C $(distdir)
117         $(MAKE) -C $(distdir) install
118         $(MAKE) -C $(distdir) uninstall
119         @echo "checking whether \`$(MAKE) uninstall' works"
120         test `find $(dummy) -not -type d | wc -l` -eq 0
121         $(MAKE) -C $(distdir) dist
122 # Room for improvement: Check here whether this distribution tarball
123 # is sufficiently similar to the original one.
124         -rm -rf $(distdir) $(dummy)
125         @echo "Distribution integrity checks out."
126
127 .PHONY: dist distdir distcheck