]> granicus.if.org Git - postgresql/blob - src/Makefile
Fix handling of no '../doc' directory in compile procedure...
[postgresql] / src / Makefile
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/Makefile,v 1.7 1996/10/07 23:53:47 scrappy Exp $
11 #
12 # NOTES
13 #       objdir  - location of the objects and generated files (eg. obj)
14 #
15 #-------------------------------------------------------------------------
16
17 MKDIR=./mk
18 -include $(MKDIR)/../Makefile.global
19
20 FIND = find
21 # assuming gnu tar and split here
22 TAR  = tar
23 SPLIT = split
24
25 ETAGS = etags
26 XARGS = xargs
27
28 .DEFAULT all:
29         $(MAKE) -C backend $@
30         $(MAKE) -C libpq $@
31 ifeq ($(USE_TCL), true)
32         $(MAKE) -C libpgtcl $@
33 endif
34         $(MAKE) -C bin $@
35 ifneq ($(wildcard $(MKDIR)/../../doc), )
36         $(MAKE) -C ../doc $@
37 endif
38         @-chown -R $(POSTGRESLOGIN) $(POSTGRESDIR) 2>/dev/null
39         @if test $@. = all. -o $@. = .; then \
40         echo All of Postgres95 is successfully made.  Ready to install. ;\
41         fi
42
43 TAGS:
44         rm -f TAGS; \
45         for i in backend libpq bin; do \
46           $(FIND) $$i -name '*.[chyl]' -print | $(XARGS) $(ETAGS) -a ; \
47         done
48
49 # target to generate a backup tar file and split files that can be 
50 # saved to 1.44M floppy
51 BACKUP:
52         rm -f BACKUP.filelist BACKUP.tgz; \
53         $(FIND) . -not -path '*obj/*' -not -path '*data/*' -type f -print > BACKUP.filelist; \
54         $(TAR) --files-from BACKUP.filelist -c -z -v -f BACKUP.tgz
55         $(SPLIT) --bytes=1400k BACKUP.tgz pgBACKUP.     
56
57 .PHONY: TAGS
58 .PHONY: BACKUP