]> granicus.if.org Git - postgresql/blob - src/GNUmakefile.in
90e9f809b6fee41d5495811737d93292c22d091d
[postgresql] / src / GNUmakefile.in
1 #-------------------------------------------------------------------------
2 #
3 # Makefile.inc--
4 #    Build and install postgres.
5 #
6 # Copyright (c) 1994, Regents of the University of California
7 #
8 #
9 # IDENTIFICATION
10 #    $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.47 2000/01/09 07:53:52 tgl Exp $
11 #
12 #-------------------------------------------------------------------------
13
14 SRCDIR= .
15 include Makefile.global
16
17 FIND = @find@
18
19 # assuming gnu tar and split here
20 TAR  = @tar@
21 SPLIT = @split@
22
23 ETAGS = @etags@
24 XARGS = @xargs@
25
26 all:
27         $(MAKE) lexverify
28         $(MAKE) -C utils all
29         $(MAKE) -C backend all
30         $(MAKE) -C interfaces all
31         $(MAKE) -C bin all
32         $(MAKE) -C pl all
33         @if test $@. = all. -o $@. = .; then \
34         echo All of PostgreSQL is successfully made.  Ready to install. ;\
35         fi
36
37 install:
38         $(MAKE) lexverify
39         $(MAKE) -C utils install
40         $(MAKE) -C backend install
41         $(MAKE) -C interfaces install
42         $(MAKE) -C bin install
43         $(MAKE) -C pl install
44         cat ../register.txt
45
46 lexverify:
47         $(MAKE) -C lextest all
48         @if test ! -f lextest/lextest; then \
49           echo "";\
50           echo "You have a buggy version of flex.  Read INSTALL and search for flex for a fix.";\
51           echo "";\
52           false;\
53         else \
54           true;\
55         fi
56
57 clean:
58         $(MAKE) -C lextest clean
59         $(MAKE) -C utils clean
60         $(MAKE) -C backend clean
61         $(MAKE) -C interfaces clean
62         $(MAKE) -C bin clean
63         $(MAKE) -C pl clean
64         $(MAKE) -C test clean
65         $(MAKE) -C ../contrib/spi clean
66
67 distclean: clean
68         # Remove files and symlinks created by configure script
69         rm -f \
70                 Makefile.port \
71                 config.cache \
72                 config.status \
73                 config.log \
74                 include/config.h \
75                 include/dynloader.h \
76                 include/os.h \
77                 backend/port/tas.s \
78                 backend/port/dynloader.c \
79                 backend/utils/Gen_fmgrtab.sh \
80                 interfaces/odbc/port \
81                 interfaces/odbc/makefiles \
82                 interfaces/odbc/template \
83                 interfaces/odbc/config.h \
84 \
85 \
86 \
87                 GNUmakefile \
88                 Makefile.global \
89                 backend/port/Makefile \
90                 backend/catalog/genbki.sh \
91                 backend/utils/Gen_fmgrtab.sh \
92                 bin/pg_dump/Makefile \
93                 bin/pg_version/Makefile \
94                 bin/psql/Makefile \
95                 bin/pgtclsh/mkMakefile.tcldefs.sh \
96                 bin/pgtclsh/mkMakefile.tkdefs.sh \
97                 include/version.h \
98                 interfaces/libpq/Makefile \
99                 interfaces/ecpg/lib/Makefile \
100                 interfaces/libpq++/Makefile \
101                 interfaces/libpgeasy/Makefile \
102                 interfaces/libpgtcl/Makefile \
103                 interfaces/odbc/GNUmakefile \
104                 interfaces/odbc/Makefile.global \
105                 pl/plpgsql/src/Makefile \
106                 pl/plpgsql/src/mklang.sql \
107                 pl/tcl/mkMakefile.tcldefs.sh \
108                 test/regress/GNUmakefile
109
110 .DEFAULT:
111         $(MAKE) -C lextest $@
112         $(MAKE) -C utils $@
113         $(MAKE) -C backend $@
114         $(MAKE) -C interfaces $@
115         $(MAKE) -C bin $@
116         $(MAKE) -C pl $@
117         @if test $@. = all. -o $@. = .; then \
118         echo All of PostgreSQL is successfully made.  Ready to install. ;\
119         fi
120
121 TAGS:
122         rm -f TAGS; \
123         for i in backend interfaces/libpq bin; do \
124           $(FIND) $$i -name '*.[chyl]' -print | $(XARGS) $(ETAGS) -a ; \
125         done
126
127 # target to generate a backup tar file and split files that can be 
128 # saved to 1.44M floppy
129 BACKUP:
130         rm -f BACKUP.filelist BACKUP.tgz; \
131         $(FIND) . -not -path '*obj/*' -not -path '*data/*' -type f -print > BACKUP.filelist; \
132         $(TAR) --files-from BACKUP.filelist -c -z -v -f BACKUP.tgz
133         $(SPLIT) --bytes=1400k BACKUP.tgz pgBACKUP.     
134
135 .PHONY: TAGS
136 .PHONY: BACKUP
137