aboutsummaryrefslogtreecommitdiff
path: root/src/GNUmakefile.in
blob: a45a63d793578e7ec3073b64bd83d738763e283b (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
128
129
130
131
132
133
134
135
#-------------------------------------------------------------------------
#
# 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.43 1999/08/08 15:20:21 thomas Exp $
#
#-------------------------------------------------------------------------

SRCDIR= .
include Makefile.global

FIND = @find@

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

ETAGS = @etags@
XARGS = @xargs@

all:
	$(MAKE) lexverify
	$(MAKE) -C utils all
	$(MAKE) -C backend all
	$(MAKE) -C interfaces all
	$(MAKE) -C bin all
	$(MAKE) -C pl all
	@if test $@. = all. -o $@. = .; then \
	echo All of PostgreSQL is successfully made.  Ready to install. ;\
        fi

install:
	$(MAKE) lexverify
	$(MAKE) -C utils install
	$(MAKE) -C backend install
	$(MAKE) -C interfaces install
	$(MAKE) -C bin install
	$(MAKE) -C pl install
	cat ../register.txt

lexverify:
	$(MAKE) -C lextest all
	@if test ! -f lextest/lextest; then \
	  echo "";\
	  echo "You have a buggy version of flex.  Read INSTALL and search for flex for a fix.";\
	  echo "";\
	  false;\
	else \
	  true;\
	fi

clean:
	$(MAKE) -C lextest clean
	$(MAKE) -C utils clean
	$(MAKE) -C backend clean
	$(MAKE) -C interfaces clean
	$(MAKE) -C bin clean
	$(MAKE) -C pl clean
	$(MAKE) -C test clean
	$(MAKE) -C ../contrib/spi clean

distclean: clean
	# Remove files and symlinks created by configure script
	rm -f \
		Makefile.port \
		config.cache \
		config.status \
		config.log \
		include/config.h \
		include/dynloader.h \
		include/os.h \
		backend/port/tas.s \
		backend/port/dynloader.c \
		backend/utils/Gen_fmgrtab.sh \
		interfaces/odbc/port \
		interfaces/odbc/makefiles \
		interfaces/odbc/template \
		interfaces/odbc/config.h \
\
\
\
		GNUmakefile \
		Makefile.global \
		backend/port/Makefile \
		backend/catalog/genbki.sh \
		backend/utils/Gen_fmgrtab.sh \
		bin/pg_dump/Makefile \
		bin/pg_version/Makefile \
		bin/psql/Makefile \
		bin/pgtclsh/mkMakefile.tcldefs.sh \
		bin/pgtclsh/mkMakefile.tkdefs.sh \
		include/version.h \
		interfaces/libpq/Makefile \
		interfaces/ecpg/lib/Makefile \
		interfaces/libpq++/Makefile \
		interfaces/libpgtcl/Makefile \
		interfaces/odbc/GNUmakefile \
		interfaces/odbc/Makefile.global \
		pl/plpgsql/src/Makefile \
		pl/plpgsql/src/mklang.sql \
		pl/tcl/mkMakefile.tcldefs.sh

.DEFAULT:
	$(MAKE) -C lextest $@
	$(MAKE) -C utils $@
	$(MAKE) -C backend $@
	$(MAKE) -C interfaces $@
	$(MAKE) -C bin $@
	$(MAKE) -C pl $@
	@if test $@. = all. -o $@. = .; then \
	echo All of PostgreSQL is successfully made.  Ready to install. ;\
        fi

TAGS:
	rm -f TAGS; \
	for i in backend interfaces/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