aboutsummaryrefslogtreecommitdiff
path: root/src/GNUmakefile.in
blob: 5a25488a4e04c3a6ecf9fca7853d95495b7e4315 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#-------------------------------------------------------------------------
#
# Makefile.inc--
#    Build and install postgres.
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
#    $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.12 1997/04/15 18:17:43 scrappy Exp $
#
#-------------------------------------------------------------------------

SRCDIR= .
include Makefile.global

FIND = @find@

# assuming gnu tar and split here
TAR  = @tar@
SPLIT = @split@

ETAGS = @etags@
XARGS = @xargs@

all:
	@if test $(PORTNAME) = UNDEFINED; then \
	  echo You must set the PORTNAME value in Makefile.global before \
	       you can build Postgres. ;\
	  false ;\
        else true;\
	fi
	$(MAKE) -C utils all
	$(MAKE) -C backend all
	$(MAKE) -C libpq all
ifeq ($(HAVE_Cplusplus), true)
	$(MAKE) -C libpq++ all
endif
ifeq ($(USE_TCL), true)
	$(MAKE) -C libpgtcl all
endif
	$(MAKE) -C bin all
ifneq ($(wildcard man), )
	$(MAKE) -C man all
endif
	@if test $@. = all. -o $@. = .; then \
	echo All of PostgreSQL is successfully made.  Ready to install. ;\
        fi

clean:
	@if test $(PORTNAME) = UNDEFINED; then \
		echo You must set the PORTNAME value in Makefile.global before \
			you can build Postgres. ;\
		false ;\
	else true;\
	fi
	$(MAKE) -C utils clean
	$(MAKE) -C backend clean
	$(MAKE) -C libpq clean
ifeq ($(HAVE_Cplusplus), true)
	$(MAKE) -C libpq++ clean
endif
ifeq ($(USE_TCL), true)
	$(MAKE) -C libpgtcl clean
endif
	$(MAKE) -C bin clean
ifneq ($(wildcard man), )
	$(MAKE) -C man clean
endif

distclean: clean
	rm -f Makefile.global \
		config.cache \
		config.status \
		config.log \
		GNUmakefile \
		Makefile.global \
		backend/port/Makefile \
		bin/psql/Makefile \
		bin/pg_dump/Makefile \
		include/config.h \
		backend/utils/Gen_fmgrtab.sh \
		include/os.h \
		Makefile.port


.DEFAULT:
	@if test $(PORTNAME) = UNDEFINED; then \
	  echo You must set the PORTNAME value in Makefile.global before \
	       you can build Postgres. ;\
	  false ;\
        else true;\
	fi
	$(MAKE) -C utils $@
	$(MAKE) -C backend $@
	$(MAKE) -C libpq $@
ifeq ($(HAVE_Cplusplus), true)
	$(MAKE) -C libpq++ $@
endif
ifeq ($(USE_TCL), true)
	$(MAKE) -C libpgtcl $@
endif
	$(MAKE) -C bin $@
ifneq ($(wildcard man), )
	$(MAKE) -C man $@
endif
	@if test $@. = all. -o $@. = .; then \
	echo All of PostgreSQL is successfully made.  Ready to install. ;\
        fi

TAGS:
	rm -f TAGS; \
	for i in backend libpq bin; do \
	  $(FIND) $$i -name '*.[chyl]' -print | $(XARGS) $(ETAGS) -a ; \
	done

# target to generate a backup tar file and split files that can be 
# saved to 1.44M floppy
BACKUP:
	rm -f BACKUP.filelist BACKUP.tgz; \
	$(FIND) . -not -path '*obj/*' -not -path '*data/*' -type f -print > BACKUP.filelist; \
	$(TAR) --files-from BACKUP.filelist -c -z -v -f BACKUP.tgz
	$(SPLIT) --bytes=1400k BACKUP.tgz pgBACKUP.	

.PHONY: TAGS
.PHONY: BACKUP