21 |
21 |
22 # |
22 # |
23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
24 # Use is subject to license terms. |
24 # Use is subject to license terms. |
25 # |
25 # |
26 # ident "@(#)Makefile.sfw 1.16 09/09/08 SMI" |
26 # ident "@(#)Makefile.sfw 1.17 09/12/18 SMI" |
27 # |
27 # |
28 |
28 |
29 PGMAJVER=8.3 |
29 PGMAJVER=8.3 |
30 PGMINVER=$(PGMAJVER).8 |
30 PGMINVER=$(PGMAJVER).9 |
31 VER=postgresql-$(PGMINVER) |
31 VER=postgresql-$(PGMINVER) |
32 VER64=$(VER)-64 |
32 VER64=$(VER)-64 |
33 |
33 |
34 HEADERS=$(ROOT)/usr/postgres/$(PGMAJVER)/include/server |
34 HEADERS=$(ROOT)/usr/postgres/$(PGMAJVER)/include/server |
35 |
|
36 # SPARC_BLD is '#' for an Intel build. |
|
37 # INTEL_BLD is '#' for a Sparc build. |
|
38 POUND_SIGN:sh= echo \\043 |
|
39 SPARC_BLD_1= $(MACH:i386=$(POUND_SIGN)) |
|
40 SPARC_BLD= $(SPARC_BLD_1:sparc=) |
|
41 INTEL_BLD_1= $(MACH:sparc=$(POUND_SIGN)) |
|
42 INTEL_BLD= $(INTEL_BLD_1:i386=) |
|
43 |
|
44 # DTRACE_BITS depends on the arch we are building for |
|
45 |
|
46 $(SPARC_BLD)DTRACE_BITS=64 |
|
47 $(INTEL_BLD)DTRACE_BITS=32 |
|
48 |
35 |
49 include ../../Makefile.cmd |
36 include ../../Makefile.cmd |
50 |
37 |
51 # This will indirectly also do install32 and install64 upon which |
38 # This will indirectly also do install32 and install64 upon which |
52 # installpqxx depends. |
39 # installpqxx depends. |
82 # area before a 'make install', otherwise it fails because the files |
69 # area before a 'make install', otherwise it fails because the files |
83 # already exist (without permission to over write). |
70 # already exist (without permission to over write). |
84 rm -rf $(HEADERS) |
71 rm -rf $(HEADERS) |
85 (cd $(VER); unset PROFILE || true; env \ |
72 (cd $(VER); unset PROFILE || true; env \ |
86 CC=$(CC) \ |
73 CC=$(CC) \ |
87 "CFLAGS=$(CFLAGS) -xc99=none -xCC -D_SYS_VNODE_H" \ |
74 "CFLAGS=$(CFLAGS) -xc99=none -xCC " \ |
88 "LD_OPTIONS=-R/usr/sfw/lib -L/usr/sfw/lib -M $(SRC)/cmd/mapfile_noexstk" \ |
75 "LD_OPTIONS=-M $(SRC)/cmd/mapfile_noexstk" \ |
89 DTRACE_BITS=$(DTRACE_BITS) \ |
|
90 DESTDIR=$(ROOT) \ |
76 DESTDIR=$(ROOT) \ |
91 PATH=$(SFW_PATH) \ |
77 PATH=$(SFW_PATH) \ |
92 MAKE=$(GMAKE) \ |
78 MAKE=$(GMAKE) \ |
93 $(GMAKE) install) |
79 $(GMAKE) install) |
94 $(SH) ./install-sfw ${PGMAJVER} ${VER} |
80 $(SH) ./install-sfw ${PGMAJVER} ${VER} |
104 for SRCDIR in src/backend src/backend/utils/mb/conversion_procs src/interfaces src/bin src/pl \ |
90 for SRCDIR in src/backend src/backend/utils/mb/conversion_procs src/interfaces src/bin src/pl \ |
105 src/backend/snowball src/makefiles config src src/test/regress; do \ |
91 src/backend/snowball src/makefiles config src src/test/regress; do \ |
106 (cd $(VER64)/$$SRCDIR; unset PROFILE || true; env \ |
92 (cd $(VER64)/$$SRCDIR; unset PROFILE || true; env \ |
107 CC=$(CC) \ |
93 CC=$(CC) \ |
108 "CFLAGS=$(CFLAGS64)" \ |
94 "CFLAGS=$(CFLAGS64)" \ |
109 "LD_OPTIONS=-R/usr/sfw/lib/64 -L/usr/sfw/lib/64 -M $(SRC)/cmd/mapfile_noexstk" \ |
95 "LD_OPTIONS=-L$(ROOT)/usr/lib/$(MACH64) -M $(SRC)/cmd/mapfile_noexstk" \ |
110 DTRACE_BITS=$(DTRACE_BITS) \ |
|
111 DESTDIR=$(ROOT) \ |
96 DESTDIR=$(ROOT) \ |
112 PATH=$(SFW_PATH) \ |
97 PATH=$(SFW_PATH) \ |
113 MAKE=$(GMAKE) \ |
98 MAKE=$(GMAKE) \ |
114 $(GMAKE) install ) ; \ |
99 $(GMAKE) install ) ; \ |
115 done ; |
100 done ; |
116 MACH64=$(MACH64) $(SH) ./install-sfw-64 ${PGMAJVER} ${VER64} |
101 MACH64=$(MACH64) $(SH) ./install-sfw-64 ${PGMAJVER} ${VER64} |
117 |
102 |
118 pg32: $(VER)/config.status |
103 pg32: $(VER)/config.status |
119 (cd $(VER); unset PROFILE || true; env \ |
104 (cd $(VER); unset PROFILE || true; env \ |
120 CC=$(CC) \ |
105 CC=$(CC) \ |
121 "CFLAGS=$(CFLAGS) -xc99=none -xCC -D_SYS_VNODE_H" \ |
106 "CFLAGS=$(CFLAGS) -xc99=none -xCC" \ |
122 "LD_OPTIONS=-R/usr/sfw/lib -L/usr/sfw/lib -M $(SRC)/cmd/mapfile_noexstk" \ |
107 "LD_OPTIONS=-M $(SRC)/cmd/mapfile_noexstk" \ |
123 DTRACE_BITS=$(DTRACE_BITS) \ |
|
124 PATH=$(SFW_PATH) \ |
108 PATH=$(SFW_PATH) \ |
125 MAKE=$(GMAKE) \ |
109 MAKE=$(GMAKE) \ |
126 $(GMAKE) all) |
110 $(GMAKE) all) |
127 @find . -name core -exec rm -f {} \; |
|
128 |
111 |
129 pg64: $(VER64)/config.status |
112 pg64: $(VER64)/config.status |
130 (cd $(VER64); unset PROFILE || true; env \ |
113 (cd $(VER64); unset PROFILE || true; env \ |
131 CC=$(CC) \ |
114 CC=$(CC) \ |
132 "CFLAGS=$(CFLAGS64)" \ |
115 "CFLAGS=$(CFLAGS64)" \ |
133 "LD_OPTIONS=-R/usr/sfw/lib/64 -L/usr/sfw/lib/64 -M $(SRC)/cmd/mapfile_noexstk" \ |
116 "LD_OPTIONS=-L$(ROOT)/usr/lib/$(MACH64) -M $(SRC)/cmd/mapfile_noexstk" \ |
134 DTRACE_BITS=$(DTRACE_BITS) \ |
|
135 PATH=$(SFW_PATH) \ |
117 PATH=$(SFW_PATH) \ |
136 MAKE=$(GMAKE) \ |
118 MAKE=$(GMAKE) \ |
137 $(GMAKE) all) |
119 $(GMAKE) all) |
138 @find . -name core -exec rm -f {} \; |
|
139 |
120 |
140 $(VER)/config.status: $(VER)/configure |
121 $(VER)/config.status: $(VER)/configure |
141 (cd $(VER); env \ |
122 (cd $(VER); env \ |
142 CC=$(CC) "CFLAGS=-xc99=none -xCC" \ |
123 CC=$(CC) "CFLAGS=-xc99=none -xCC" \ |
143 "LD_OPTIONS=-R/usr/sfw/lib -L/usr/sfw/lib" \ |
|
144 PATH=$(SFW_PATH) \ |
124 PATH=$(SFW_PATH) \ |
145 MAKE=$(GMAKE) \ |
125 MAKE=$(GMAKE) \ |
146 ./configure --prefix=/usr/postgres/$(PGMAJVER) \ |
126 ./configure --prefix=/usr/postgres/$(PGMAJVER) \ |
147 --exec-prefix=/usr/postgres/$(PGMAJVER) \ |
127 --exec-prefix=/usr/postgres/$(PGMAJVER) \ |
148 --bindir=/usr/postgres/$(PGMAJVER)/bin \ |
128 --bindir=/usr/postgres/$(PGMAJVER)/bin \ |
167 --with-libxml \ |
147 --with-libxml \ |
168 --with-libxslt \ |
148 --with-libxslt \ |
169 --with-gssapi \ |
149 --with-gssapi \ |
170 --enable-thread-safety \ |
150 --enable-thread-safety \ |
171 --enable-dtrace \ |
151 --enable-dtrace \ |
172 --with-includes=$(ROOT)/usr/include:$(ROOT)/usr/sfw/include:/usr/sfw/include \ |
152 --with-includes=$(ROOT)/usr/include \ |
173 --with-tclconfig=$(ROOT)/usr/lib \ |
153 --with-tclconfig=$(ROOT)/usr/lib \ |
174 --with-libs=$(ROOT)/lib:$(ROOT)/usr/lib:$(ROOT)/usr/sfw/lib:/usr/lib:/usr/sfw/lib) |
154 --with-libs=$(ROOT)/lib:$(ROOT)/usr/lib) |
175 |
155 |
176 # We can't build a 64-bit server with the pl/perl option as there is |
156 # We can't build a 64-bit server with the pl/perl option as there is |
177 # currently no 64-bit version of libperl.so on Solaris. So we can't |
157 # currently no 64-bit version of libperl.so on Solaris. So we can't |
178 # include the --with-perl option |
158 # include the --with-perl option |
179 |
159 |
180 $(VER64)/config.status: $(VER64)/configure |
160 $(VER64)/config.status: $(VER64)/configure |
181 (cd $(VER64); env \ |
161 (cd $(VER64); env \ |
182 CC=$(CC) "CFLAGS=$(CFLAGS64)" \ |
162 CC=$(CC) "CFLAGS=$(CFLAGS64)" \ |
183 "LD_OPTIONS=-R/usr/sfw/lib/64 -L/usr/sfw/lib/64" \ |
163 "LD_OPTIONS=-L$(ROOT)/usr/lib/$(MACH64)" \ |
184 PATH=$(SFW_PATH) \ |
164 PATH=$(SFW_PATH) \ |
185 MAKE=$(GMAKE) \ |
165 MAKE=$(GMAKE) \ |
186 ./configure --prefix=/usr/postgres/$(PGMAJVER) \ |
166 ./configure --prefix=/usr/postgres/$(PGMAJVER) \ |
187 --exec-prefix=/usr/postgres/$(PGMAJVER) \ |
167 --exec-prefix=/usr/postgres/$(PGMAJVER) \ |
188 --bindir=/usr/postgres/$(PGMAJVER)/bin/64 \ |
168 --bindir=/usr/postgres/$(PGMAJVER)/bin/$(MACH64) \ |
189 --libexecdir=/usr/postgres/$(PGMAJVER)/bin/64 \ |
169 --libexecdir=/usr/postgres/$(PGMAJVER)/bin/$(MACH64) \ |
190 --sbindir=/usr/postgres/$(PGMAJVER)/bin/64 \ |
170 --sbindir=/usr/postgres/$(PGMAJVER)/bin/$(MACH64) \ |
191 --datadir=/usr/postgres/$(PGMAJVER)/share \ |
171 --datadir=/usr/postgres/$(PGMAJVER)/share \ |
192 --sysconfdir=/usr/postgres/$(PGMAJVER)/etc \ |
172 --sysconfdir=/usr/postgres/$(PGMAJVER)/etc \ |
193 --mandir=/usr/postgres/$(PGMAJVER)/man \ |
173 --mandir=/usr/postgres/$(PGMAJVER)/man \ |
194 --libdir=/usr/postgres/$(PGMAJVER)/lib/64 \ |
174 --libdir=/usr/postgres/$(PGMAJVER)/lib/$(MACH64) \ |
195 --includedir=/usr/postgres/$(PGMAJVER)/include \ |
175 --includedir=/usr/postgres/$(PGMAJVER)/include \ |
196 --sharedstatedir=/var/postgres/$(PGMAJVER) \ |
176 --sharedstatedir=/var/postgres/$(PGMAJVER) \ |
197 --localstatedir=/var/postgres/$(PGMAJVER) \ |
177 --localstatedir=/var/postgres/$(PGMAJVER) \ |
198 --with-system-tzdata=/usr/share/lib/zoneinfo \ |
178 --with-system-tzdata=/usr/share/lib/zoneinfo \ |
199 --enable-nls \ |
179 --enable-nls \ |
207 --with-libxslt \ |
187 --with-libxslt \ |
208 --with-gssapi \ |
188 --with-gssapi \ |
209 --enable-thread-safety \ |
189 --enable-thread-safety \ |
210 --enable-dtrace \ |
190 --enable-dtrace \ |
211 --without-readline \ |
191 --without-readline \ |
212 --with-includes=$(ROOT)/usr/include:$(ROOT)/usr/sfw/include:/usr/sfw/include \ |
192 --with-includes=$(ROOT)/usr/include \ |
213 --with-tclconfig=$(ROOT)/usr/lib \ |
193 --with-tclconfig=$(ROOT)/usr/lib \ |
214 --with-libs=$(ROOT)/lib/64:$(ROOT)/usr/lib/64:$(ROOT)/usr/sfw/lib/64:/usr/lib/64:/usr/sfw/lib/64) |
194 --with-libs=$(ROOT)/lib/$(MACH64):$(ROOT)/usr/lib/$(MACH64)) |
215 |
195 |
216 $(VER)/configure: $(VER).tar.gz |
196 $(VER)/configure: $(VER).tar.gz |
217 gzip -dc $(VER).tar.gz | tar xopf - |
197 gzip -dc $(VER).tar.gz | tar xopf - |
218 ( cd $(VER) \ |
198 ( cd $(VER) \ |
219 ; gpatch -p0 < ../config.patch.32bit ) |
199 ; gpatch -p0 < ../config.patch.32bit ) |
270 pg32contrib: pg32 |
250 pg32contrib: pg32 |
271 for SRCDIR in $(CONTRIBLIST) ; do \ |
251 for SRCDIR in $(CONTRIBLIST) ; do \ |
272 (cd $(VER)/contrib/$$SRCDIR; unset PROFILE || true; env \ |
252 (cd $(VER)/contrib/$$SRCDIR; unset PROFILE || true; env \ |
273 CC=$(CC) \ |
253 CC=$(CC) \ |
274 "CFLAGS=$(CFLAGS) -xc99=none -xCC" \ |
254 "CFLAGS=$(CFLAGS) -xc99=none -xCC" \ |
275 "LD_OPTIONS=-R/usr/sfw/lib -L/usr/sfw/lib -M $(SRC)/cmd/mapfile_noexstk" \ |
255 "LD_OPTIONS=-M $(SRC)/cmd/mapfile_noexstk" \ |
276 DTRACE_BITS=$(DTRACE_BITS) \ |
|
277 DESTDIR=$(ROOT) \ |
256 DESTDIR=$(ROOT) \ |
278 PATH=$(SFW_PATH) \ |
257 PATH=$(SFW_PATH) \ |
279 MAKE=$(GMAKE) \ |
258 MAKE=$(GMAKE) \ |
280 $(GMAKE) all install) ; \ |
259 $(GMAKE) all install) ; \ |
281 done ; |
260 done ; |
285 pg64contrib: pg64 |
264 pg64contrib: pg64 |
286 for SRCDIR in $(CONTRIBLIST) ; do \ |
265 for SRCDIR in $(CONTRIBLIST) ; do \ |
287 (cd $(VER64)/contrib/$$SRCDIR; unset PROFILE || true; env \ |
266 (cd $(VER64)/contrib/$$SRCDIR; unset PROFILE || true; env \ |
288 CC=$(CC) \ |
267 CC=$(CC) \ |
289 "CFLAGS=$(CFLAGS64)" \ |
268 "CFLAGS=$(CFLAGS64)" \ |
290 "LD_OPTIONS=-R/usr/sfw/lib/64 -L/usr/sfw/lib/64 -M $(SRC)/cmd/mapfile_noexstk" \ |
269 "LD_OPTIONS=-L$(ROOT)/usr/lib/$(MACH64) -M $(SRC)/cmd/mapfile_noexstk" \ |
291 DTRACE_BITS=$(DTRACE_BITS) \ |
|
292 DESTDIR=$(ROOT) \ |
270 DESTDIR=$(ROOT) \ |
293 PATH=$(SFW_PATH) \ |
271 PATH=$(SFW_PATH) \ |
294 MAKE=$(GMAKE) \ |
272 MAKE=$(GMAKE) \ |
295 $(GMAKE) all install) ; \ |
273 $(GMAKE) all install) ; \ |
296 done ; |
274 done ; |