]> granicus.if.org Git - postgresql/blob - src/Makefile
Make sure user is running GNU make.
[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 # IDENTIFICATION
9 #    $Header: /cvsroot/pgsql/src/Makefile,v 1.14 1996/12/19 08:03:46 bryanh Exp $
10 #
11 #-------------------------------------------------------------------------
12
13 SRCDIR= .
14 include Makefile.global
15
16 FIND = find
17 # assuming gnu tar and split here
18 TAR  = tar
19 SPLIT = split
20
21 ETAGS = etags
22 XARGS = xargs
23
24 .DEFAULT all:
25         @set - `$(MAKE) -v -f /dev/null 2>&1`.; \
26         if test $$1 != GNU; then \
27           echo "This Makefile requires GNU make."; \
28           echo "Please read the file INSTALL in this directory for details."; \
29           false ; \
30         fi
31         @if test $(PORTNAME) = UNDEFINED; then \
32           echo You must set the PORTNAME value in Makefile.global before \
33                you can build Postgres. ;\
34           false ;\
35         fi
36         $(MAKE) -C utils $@
37         $(MAKE) -C backend $@
38         $(MAKE) -C libpq $@
39 ifeq ($(HAVE_Cplusplus), true)
40         $(MAKE) -C libpq++ $@
41 endif
42 ifeq ($(USE_TCL), true)
43         $(MAKE) -C libpgtcl $@
44 endif
45         $(MAKE) -C bin $@
46 ifneq ($(wildcard man), )
47         $(MAKE) -C man $@
48 endif
49         @if test $@. = all. -o $@. = .; then \
50         echo All of Postgres95 is successfully made.  Ready to install. ;\
51         fi
52
53 TAGS:
54         rm -f TAGS; \
55         for i in backend libpq bin; do \
56           $(FIND) $$i -name '*.[chyl]' -print | $(XARGS) $(ETAGS) -a ; \
57         done
58
59 # target to generate a backup tar file and split files that can be 
60 # saved to 1.44M floppy
61 BACKUP:
62         rm -f BACKUP.filelist BACKUP.tgz; \
63         $(FIND) . -not -path '*obj/*' -not -path '*data/*' -type f -print > BACKUP.filelist; \
64         $(TAR) --files-from BACKUP.filelist -c -z -v -f BACKUP.tgz
65         $(SPLIT) --bytes=1400k BACKUP.tgz pgBACKUP.     
66
67 .PHONY: TAGS
68 .PHONY: BACKUP