1 diff -pruN boost-jam-3.1.17.orig/build.jam boost-jam-3.1.17/build.jam
2 --- boost-jam-3.1.17.orig/build.jam 2008-11-30 01:32:38.693291036 +1100
3 +++ boost-jam-3.1.17/build.jam 2008-11-30 01:32:54.482291035 +1100
4 @@ -190,7 +190,7 @@ toolset darwin cc : "-o " : -D
5 ## GCC 2.x, 3.x, 4.x
6 toolset gcc gcc : "-o " : -D
7 : -pedantic -fno-strict-aliasing
8 - [ opt --release : [ opt --symbols : -g : -s ] -O3 ]
9 + [ opt --release : [ opt --symbols : -g : -s ] $(CFLAGS) -fno-strict-aliasing ]
10 [ opt --debug : -g -O0 -fno-inline ]
11 -I$(--python-include) -I$(--extra-include) -Wno-long-long
12 : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
13 diff -pruN boost-jam-3.1.17.orig/build.jam.orig boost-jam-3.1.17/build.jam.orig
14 --- boost-jam-3.1.17.orig/build.jam.orig 1970-01-01 10:00:00.000000000 +1000
15 +++ boost-jam-3.1.17/build.jam.orig 2008-11-29 14:28:30.000000000 +1100
16 @@ -0,0 +1,1021 @@
17 +#~ Copyright 2002-2007 Rene Rivera.
18 +#~ Distributed under the Boost Software License, Version 1.0.
19 +#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
20 +
21 +# Platform related specifics.
22 +if $(NT) { rule .path { return "$(<:J=\\)" ; } ./ = "/" ; }
23 +else if $(OS2) { rule .path { return "$(<:J=\\)" ; } ./ = "/" ; }
24 +else if $(VMS) { rule .path { return "[.$(<:J=/)]" ; } }
25 +else if $(MAC) { rule .path { return ":$(<:J=\:)" ; } }
26 +else { rule .path { return "$(<:J=/)" ; } }
27 +if $(VMS) { . = "_" ; }
28 +else { . = "." ; }
29 +./ ?= "" ;
30 +
31 +# Info about what we are building.
32 +_VERSION_ = 3 1 17 ;
33 +NAME = boost-jam ;
34 +VERSION = $(_VERSION_:J=$(.)) ;
35 +RELEASE = 1 ;
36 +LICENSE = LICENSE_1_0 ;
37 +
38 +# Generate development debug binaries?
39 +if --debug in $(ARGV)
40 +{
41 + debug = true ;
42 +}
43 +
44 +if --profile in $(ARGV)
45 +{
46 + profile = true ;
47 +}
48 +
49 +# Attempt to generate and/or build the grammar?
50 +if --grammar in $(ARGV)
51 +{
52 + grammar = true ;
53 +}
54 +
55 +# Do we need to add a default build type argument?
56 +if ! ( --release in $(ARGV) ) &&
57 + ! ( --debug in $(ARGV) ) &&
58 + ! ( --profile in $(ARGV) )
59 +{
60 + ARGV += --release ;
61 +}
62 +
63 +# Enable, and configure, Python hooks.
64 +with-python = ;
65 +python-location = [ MATCH --with-python=(.*) : $(ARGV) ] ;
66 +if $(python-location)
67 +{
68 + with-python = true ;
69 +}
70 +if $(with-python)
71 +{
72 + if $(NT)
73 + {
74 + --python-include = [ .path $(python-location) include ] ;
75 + --python-lib = ;
76 + for local v in 25 24 23 22
77 + {
78 + --python-lib ?=
79 + [ GLOB [ .path $(python-location) libs ] : "python$(v).lib" ]
80 + [ GLOB $(python-location) [ .path $(python-location) libs ]
81 + $(Path) $(PATH) $(path) : "python$(v).dll" ]
82 + ;
83 + if ! $(--python-lib[2])
84 + {
85 + --python-lib = ;
86 + }
87 + }
88 + --python-lib = $(--python-lib[1]) ;
89 + }
90 + else if $(OS) = MACOSX
91 + {
92 + --python-include = [ .path $(python-location) Headers ] ;
93 + --python-lib = $(python-location) Python ;
94 + }
95 + else
96 + {
97 + --python-include = ;
98 + --python-lib = ;
99 + for local v in 2.5 2.4 2.3 2.2
100 + {
101 + local inc = [ GLOB [ .path $(python-location) include ] : python$(v) ] ;
102 + local lib = [ GLOB [ .path $(python-location) lib ] : libpython$(v)* ] ;
103 + if $(inc) && $(lib)
104 + {
105 + --python-include ?= $(inc) ;
106 + --python-lib ?= $(lib[1]:D) python$(v) ;
107 + }
108 + }
109 + }
110 +}
111 +
112 +# Boehm GC?
113 +if --gc in $(ARGV)
114 +{
115 + --boehm-gc = true ;
116 +}
117 +if $(--boehm-gc)
118 +{
119 + --extra-include += [ .path [ PWD ] "boehm_gc" "include" ] ;
120 +}
121 +
122 +# Duma?
123 +if --duma in $(ARGV)
124 +{
125 + --duma = true ;
126 +}
127 +if $(--duma)
128 +{
129 + --extra-include += [ .path [ PWD ] "duma" ] ;
130 +}
131 +
132 +# An explicit root for the toolset? (trim spaces)
133 +toolset-root = [ MATCH --toolset-root=(.*) : $(ARGV) ] ;
134 +{
135 + local t = [ MATCH "[ ]*(.*)" : $(toolset-root:J=" ") ] ;
136 + toolset-root = ;
137 + while $(t)
138 + {
139 + t = [ MATCH "([^ ]+)([ ]*)(.*)" : $(t) ] ;
140 + toolset-root += $(t[1]) ;
141 + if $(t[3]) { toolset-root += $(t[2]) ; }
142 + t = $(t[3]) ;
143 + }
144 + toolset-root = $(toolset-root:J="") ;
145 +}
146 +
147 +# Configure the implemented toolsets. These are minimal
148 +# commands and options to compile the full Jam. When
149 +# adding new toolsets make sure to add them to the
150 +# "known" list also.
151 +
152 +rule toolset ( name command .type ? : opt.out + : opt.define * : flags * : linklibs * )
153 +{
154 + .type ?= "" ;
155 + tool.$(name)$(.type).cc ?= $(command) ;
156 + tool.$(name)$(.type).opt.out ?= $(opt.out) ;
157 + tool.$(name)$(.type).opt.define ?= $(opt.define) ;
158 + tool.$(name)$(.type).flags ?= $(flags) ;
159 + tool.$(name)$(.type).linklibs ?= $(linklibs) ;
160 + if ! $(name) in $(toolsets) { toolsets += $(name) ; }
161 +}
162 +
163 +rule if-os ( os + : yes-opt * : no-opt * )
164 + { if $(os) in $(OS) { return $(yes-opt) ; } else { return $(no-opt) ; } }
165 +
166 +rule opt ( type : yes-opt * : no-opt * )
167 + { if $(type) in $(ARGV) { return $(yes-opt) ; } else { return $(no-opt) ; } }
168 +
169 +## HP-UX aCC compiler
170 +toolset acc cc : "-o " : -D
171 + : -Ae
172 + [ opt --release : -s -O3 ]
173 + [ opt --debug : -g -pg ]
174 + -I$(--python-include) -I$(--extra-include)
175 + : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
176 +## Borland C++ 5.5.x
177 +toolset borland bcc32 : -e -n : /D
178 + : -WC -w- -q "-I$(toolset-root)Include" "-L$(toolset-root)Lib"
179 + [ opt --release : -O2 -vi -w-inl ]
180 + [ opt --debug : -v -Od -vi- ]
181 + -I$(--python-include) -I$(--extra-include)
182 + : $(--python-lib[1]) ;
183 +## Generic Unix cc
184 +if ! $(CC) { CC = cc ; }
185 +toolset cc $(CC) : "-o " : -D
186 + : $(CFLAGS)
187 + [ opt --release : -s -O ]
188 + [ opt --debug : -g ]
189 + -I$(--python-include) -I$(--extra-include)
190 + : $(LIBS) -L$(--python-lib[1]) -l$(--python-lib[2]) ;
191 +## Comeau C/C++ 4.x
192 +toolset como como : "-o " : -D
193 + : --c
194 + [ opt --release : --inlining ]
195 + [ opt --debug : --no_inlining ]
196 + -I$(--python-include) -I$(--extra-include)
197 + : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
198 +## MacOSX Darwin, using GCC 2.9.x, 3.x
199 +toolset darwin cc : "-o " : -D
200 + :
201 + [ opt --release : -Wl,-x -O3 -finline-functions ]
202 + [ opt --debug : -g -O0 -fno-inline -pg ]
203 + [ opt --profile : -Wl,-x -O3 -finline-functions -g -pg ]
204 + -I$(--python-include) -I$(--extra-include)
205 + : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
206 +## GCC 2.x, 3.x, 4.x
207 +toolset gcc gcc : "-o " : -D
208 + : -pedantic -fno-strict-aliasing
209 + [ opt --release : [ opt --symbols : -g : -s ] -O3 ]
210 + [ opt --debug : -g -O0 -fno-inline ]
211 + -I$(--python-include) -I$(--extra-include) -Wno-long-long
212 + : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
213 +## GCC 2.x, 3.x on CYGWIN but without cygwin1.dll
214 +toolset gcc-nocygwin gcc : "-o " : -D
215 + : -s -O3 -mno-cygwin
216 + [ opt --release : -finline-functions ]
217 + [ opt --debug : -s -O3 -fno-inline -pg ]
218 + -I$(--python-include) -I$(--extra-include)
219 + : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
220 +## Intel C/C++ for Linux
221 +toolset intel-linux icc : "-o " : -D
222 + :
223 + [ opt --release : -Xlinker -s -O3 ]
224 + [ opt --debug : -g -O0 -p ]
225 + -I$(--python-include) -I$(--extra-include)
226 + : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
227 +## Intel C/C++ for Win32
228 +toolset intel-win32 icl : /Fe : -D
229 + : /nologo
230 + [ opt --release : /MT /O2 /Ob2 /Gy /GF /GA /GB ]
231 + [ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 ]
232 + -I$(--python-include) -I$(--extra-include)
233 + : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
234 +## KCC ?
235 +toolset kcc KCC : "-o " : -D
236 + :
237 + [ opt --release : -s +K2 ]
238 + [ opt --debug : -g +K0 ]
239 + -I$(--python-include) -I$(--extra-include)
240 + : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
241 +## Borland Kylix
242 +toolset kylix bc++ : -o : -D
243 + : -tC -q
244 + [ opt --release : -O2 -vi -w-inl ]
245 + [ opt --debug : -v -Od -vi- ]
246 + -I$(--python-include) -I$(--extra-include)
247 + : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
248 +## Metrowerks CodeWarrior 8.x
249 +{
250 + # Even though CW can compile all files at once, it crashes if it tries in the bjam case.
251 + local mwcc = ; if $(NT) { mwcc = mwcc ; } else { mwcc = mwc$(OSPLAT:L) ; }
252 + mwcc ?= mwcc ;
253 + toolset metrowerks $(mwcc) : "-o " : -D
254 + : -c -lang c -subsystem console -cwd include
255 + [ opt --release : -runtime ss -opt full -inline all ]
256 + [ opt --debug : -runtime ssd -opt none -inline off ]
257 + -I$(--python-include) -I$(--extra-include) ;
258 + toolset metrowerks $(mwcc) .link : "-o " :
259 + : -subsystem console -lkernel32.lib -ladvapi32.lib -luser32.lib
260 + [ opt --release : -runtime ss ]
261 + [ opt --debug : -runtime ssd ]
262 + : $(--python-lib[1]) ;
263 +}
264 +## MINGW GCC
265 +toolset mingw gcc : "-o " : -D
266 + :
267 + [ opt --release : -s -O3 -finline-functions ]
268 + [ opt --debug : -g -O0 -fno-inline -pg ]
269 + -I$(--python-include) -I$(--extra-include)
270 + : $(--python-lib[2]) ;
271 +## MIPS Pro
272 +toolset mipspro cc : "-o " : -D
273 + :
274 + [ opt --release : -s -O3 -g0 -INLINE:none ]
275 + [ opt --debug : -g -O0 -INLINE ]
276 + -I$(--python-include) -I$(--extra-include)
277 + : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
278 +## Microsoft Visual Studio C++ 6.x
279 +toolset msvc cl : /Fe /Fe /Fd /Fo : -D
280 + : /nologo
281 + [ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ]
282 + [ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ]
283 + -I$(--python-include) -I$(--extra-include)
284 + : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
285 +## QNX 6.x GCC 3.x/2.95.3
286 +toolset qcc qcc : "-o " : -D
287 + : -Wc,-pedantic -Wc,-fno-strict-aliasing
288 + [ opt --release : [ opt --symbols : -g ] -O3 -Wc,-finline-functions ]
289 + [ opt --debug : -g -O0 -Wc,-fno-inline ]
290 + -I$(--python-include) -I$(--extra-include)
291 + : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
292 +## Qlogic Pathscale 2.4
293 +toolset pathscale pathcc : "-o " : -D
294 + :
295 + [ opt --release : -s -Ofast -O3 ]
296 + [ opt --debug : -g ]
297 + -I$(--python-include) -I$(--extra-include)
298 + : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
299 +## Portland Group Pgi 6.2
300 +toolset pgi pgcc : "-o " : -D
301 + :
302 + [ opt --release : -s -O3 ]
303 + [ opt --debug : -g ]
304 + -I$(--python-include) -I$(--extra-include)
305 + : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
306 +## Sun Workshop 6 C++
307 +toolset sun cc : "-o " : -D
308 + :
309 + [ opt --release : -s -fast -xO4 ]
310 + [ opt --debug : -g ]
311 + -I$(--python-include) -I$(--extra-include)
312 + : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
313 +## Sun Workshop 6 C++ (old alias)
314 +toolset sunpro cc : "-o " : -D
315 + :
316 + [ opt --release : -s -fast -xO4 ]
317 + [ opt --debug : -g ]
318 + -I$(--python-include) -I$(--extra-include)
319 + : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
320 +## Compaq Alpha CXX
321 +toolset tru64cxx cc : "-o " : -D
322 + :
323 + [ opt --release : -s -O5 -inline speed ]
324 + [ opt --debug : -g -O0 -pg ]
325 + -I$(--python-include) -I$(--extra-include)
326 + : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
327 +## IBM VisualAge C++
328 +toolset vacpp xlc : "-o " : -D
329 + :
330 + [ opt --release : -s -O3 -qstrict -qinline ]
331 + [ opt --debug : -g -qNOOPTimize -qnoinline -pg ]
332 + -I$(--python-include) -I$(--extra-include)
333 + : -L$(--python-lib[1]) -l$(--python-lib[2]) [ if-os AIX : -bmaxdata:0x40000000 ] ;
334 +## Microsoft Visual C++ .NET 7.x
335 +toolset vc7 cl : /Fe /Fe /Fd /Fo : -D
336 + : /nologo
337 + [ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ]
338 + [ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ]
339 + -I$(--python-include) -I$(--extra-include)
340 + : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
341 +## Microsoft Visual C++ 2005
342 +toolset vc8 cl : /Fe /Fe /Fd /Fo : -D
343 + : /nologo
344 + [ opt --release : /MT /O2 /Ob2 /Gy /GF /GA /wd4996 ]
345 + [ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
346 + -I$(--python-include) -I$(--extra-include)
347 + : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
348 +## Microsoft Visual C++ 2008
349 +toolset vc9 cl : /Fe /Fe /Fd /Fo : -D
350 + : /nologo
351 + [ opt --release : /MT /O2 /Ob2 /Gy /GF /GA /wd4996 ]
352 + [ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
353 + -I$(--python-include) -I$(--extra-include)
354 + : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
355 +## VMS/OpenVMS DEC C
356 +toolset vmsdecc cc : /OBJECT= : "/DEFINES=(" "," ")"
357 + : /STANDARD=VAXC /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES
358 + [ opt --release : /OPTIMIZE /NODEBUG ]
359 + [ opt --debug : /NOOPTIMIZE /DEBUG ]
360 + ;
361 +toolset vmsdecc link .link : /EXECUTABLE= :
362 + : /NOMAP
363 + [ opt --release : /NODEBUG ]
364 + [ opt --debug : /DEBUG ]
365 + ;
366 +
367 +# First set the build commands and options according to the
368 +# preset toolset.
369 +toolset = [ MATCH --toolset=(.*) : $(ARGV) ] ;
370 +if ! $(toolset)
371 +{
372 + # For some reason, the following test does not catch empty toolset.
373 + ECHO "###" ;
374 + ECHO "###" No toolset specified. Please use --toolset option. ;
375 + ECHO "###" ;
376 + ECHO "###" Known toolsets are: $(toolsets:J=", ") ;
377 + EXIT "###" ;
378 +}
379 +if ! $(toolset) in $(toolsets)
380 +{
381 + ECHO "###" ;
382 + ECHO "###" Unknown toolset: $(toolset) ;
383 + ECHO "###" ;
384 + ECHO "###" Known toolsets are: $(toolsets:J=", ") ;
385 + EXIT "###" ;
386 +}
387 +--cc = $(tool.$(toolset).cc) ;
388 +if $(tool.$(toolset).opt.out[2])
389 +{
390 + if $(tool.$(toolset).opt.out[1]) = $(tool.$(toolset).opt.out[2])
391 + {
392 + --out = $(tool.$(toolset).opt.out[1]) ;
393 + --dir = $(tool.$(toolset).opt.out[3-]) ;
394 + }
395 + else
396 + {
397 + --bin = $(tool.$(toolset).opt.out[1]) ;
398 + --dir = $(tool.$(toolset).opt.out[2-]) ;
399 + }
400 +}
401 +else
402 +{
403 + --out = $(tool.$(toolset).opt.out) ;
404 +}
405 +--def = $(tool.$(toolset).opt.define) ;
406 +--flags = $(tool.$(toolset).flags) ;
407 +--defs = $(tool.$(toolset).defines) ;
408 +--libs = $(tool.$(toolset).linklibs) ;
409 +if $(tool.$(toolset).link.cc)
410 +{
411 + --link = $(tool.$(toolset).link.cc) ;
412 + if $(tool.$(toolset).link.opt.out[2])
413 + {
414 + if $(tool.$(toolset).link.opt.out[1]) = $(tool.$(toolset).link.opt.out[2])
415 + {
416 + --link-out = $(tool.$(toolset).link.opt.out[1]) ;
417 + --link-dir = $(tool.$(toolset).link.opt.out[3-]) ;
418 + }
419 + else
420 + {
421 + --link-bin = $(tool.$(toolset).link.opt.out[1]) ;
422 + --link-dir = $(tool.$(toolset).link.opt.out[2-]) ;
423 + }
424 + }
425 + else
426 + {
427 + --link-out = $(tool.$(toolset).link.opt.out) ;
428 + }
429 + --link-def = $(tool.$(toolset).link.opt.define) ;
430 + --link-flags = $(tool.$(toolset).link.flags) ;
431 + --link-defs = $(tool.$(toolset).link.defines) ;
432 + --link-libs = $(tool.$(toolset).link.linklibs) ;
433 +}
434 +
435 +# Put executables in platform-specific subdirectory.
436 +locate-target = $(LOCATE_TARGET) ;
437 +if $(VMS)
438 +{
439 + locate-target ?= bin$(.)vms ;
440 + platform = vms ;
441 +}
442 +else if $(MAC)
443 +{
444 + locate-target ?= bin$(.)$(OS:L)$(OSPLAT:L) ;
445 + platform = $(OS:L)$(OSPLAT:L) ;
446 +}
447 +else if $(OSPLAT)
448 +{
449 + locate-target ?= bin$(.)$(OS:L)$(OSPLAT:L) ;
450 + platform = $(OS:L)$(OSPLAT:L) ;
451 +}
452 +else
453 +{
454 + locate-target ?= bin$(.)$(OS:L) ;
455 + platform = $(OS:L) ;
456 +}
457 +if $(debug)
458 +{
459 + locate-target = [ .path $(locate-target)$(.)debug ] ;
460 +}
461 +if $(profile)
462 +{
463 + locate-target = [ .path $(locate-target)$(.)profile ] ;
464 +}
465 +else
466 +{
467 + locate-target = [ .path $(locate-target) ] ;
468 +}
469 +
470 +if --show-locate-target in $(ARGV)
471 +{
472 + ECHO $(locate-target) ;
473 +}
474 +
475 +# We have some different files for UNIX, VMS, and NT.
476 +jam.source =
477 + command.c compile.c debug.c expand.c glob.c
478 + hash.c hcache.c headers.c hdrmacro.c
479 + jam.c jambase.c jamgram.c
480 + lists.c make.c make1.c mem.c newstr.c
481 + option.c output.c parse.c regexp.c rules.c
482 + scan.c search.c subst.c w32_getreg.c
483 + timestamp.c variable.c modules.c strings.c filesys.c
484 + builtins.c pwd.c class.c native.c modules/set.c
485 + modules/path.c modules/regex.c modules/property-set.c
486 + modules/sequence.c modules/order.c
487 + ;
488 +if $(NT)
489 +{
490 + jam.source += execnt.c filent.c pathunix.c ;
491 +}
492 +else if $(OS2)
493 +{
494 + jam.source += execunix.c fileos2.c pathunix.c ;
495 +}
496 +else if $(VMS)
497 +{
498 + jam.source += execvms.c filevms.c pathvms.c ;
499 +}
500 +else if $(MAC)
501 +{
502 + jam.source += execmac.c filemac.c pathmac.c ;
503 +}
504 +else
505 +{
506 + jam.source += execunix.c fileunix.c pathunix.c ;
507 +}
508 +
509 +# Debug assertions, or not.
510 +if ! $(debug) || --noassert in $(ARGV)
511 +{
512 + --defs += NDEBUG ;
513 +}
514 +
515 +# Enable some optional features.
516 +--defs += OPT_HEADER_CACHE_EXT ;
517 +--defs += OPT_GRAPH_DEBUG_EXT ;
518 +--defs += OPT_SEMAPHORE ;
519 +--defs += OPT_AT_FILES ;
520 +--defs += OPT_DEBUG_PROFILE ;
521 +
522 +# Bug fixes
523 +--defs += OPT_FIX_TARGET_VARIABLES_EXT ;
524 +#~ --defs += OPT_NO_EXTERNAL_VARIABLE_SPLIT ;
525 +
526 +# Improvements
527 +--defs += OPT_IMPROVED_PATIENCE_EXT ;
528 +
529 +# Use Boehm GC memory allocator?
530 +if $(--boehm-gc)
531 +{
532 + --defs += OPT_BOEHM_GC ;
533 + if $(debug)
534 + {
535 + --defs += GC_DEBUG ;
536 + }
537 +}
538 +
539 +if $(--duma)
540 +{
541 + --defs += OPT_DUMA ;
542 +}
543 +
544 +if ( $(OS) = NT || $(NT) ) && ! NT in $(--defs)
545 +{
546 + --defs += NT ;
547 +}
548 +if $(VMS)
549 +{
550 + --defs += VMS ;
551 +}
552 +--defs += YYSTACKSIZE=5000 ;
553 +
554 +if $(with-python)
555 +{
556 + --defs += HAVE_PYTHON ;
557 +}
558 +
559 +if $(debug)
560 +{
561 + --defs += BJAM_NEWSTR_NO_ALLOCATE ;
562 +}
563 +
564 +
565 +# The basic symbolic targets...
566 +NOTFILE all clean dist ;
567 +ALWAYS clean ;
568 +
569 +# Utility rules and actions...
570 +rule .clean
571 +{
572 + [DELETE] clean : $(<) ;
573 +}
574 +if $(NT) { actions piecemeal together existing [DELETE] {
575 + del /F /Q "$(>)"
576 +} }
577 +if $(UNIX) { actions piecemeal together existing [DELETE] {
578 + rm -f "$(>)"
579 +} }
580 +if $(VMS) { actions piecemeal together existing [DELETE] {
581 + DELETE $(>[--2]:J=";*, ") $(>[-1]);*
582 +} }
583 +if $(NT) {
584 + --chmod+w = "attrib -r " ;
585 +}
586 +if $(UNIX) {
587 + --chmod+w = "chmod +w " ;
588 +}
589 +if $(VMS) {
590 + --chmod+w = "SET FILE/PROT=(S:RWED) " ;
591 +}
592 +
593 +rule .mkdir
594 +{
595 + NOUPDATE $(<) ;
596 + if $(<:P) { DEPENDS $(<) : $(<:P) ; .mkdir $(<:P) ; }
597 + if ! $(md<$(<)>) { [MKDIR] $(<) ; md<$(<)> = - ; }
598 +}
599 +if $(NT) { actions [MKDIR] {
600 + md "$(<)"
601 +} }
602 +if $(UNIX) { actions [MKDIR] {
603 + mkdir "$(<)"
604 +} }
605 +if $(VMS) { actions [MKDIR] {
606 + CREATE/DIR $(<J=", ")
607 +} }
608 +
609 +rule .exe
610 +{
611 + local exe = $(<) ;
612 + if $(NT) || ( $(UNIX) && $(OS) = CYGWIN ) || $(VMS) { exe = $(exe:S=.exe) ; }
613 + LOCATE on $(exe) = $(locate-target) ;
614 + DEPENDS all : $(exe) ;
615 + .mkdir $(locate-target) ;
616 + if $(--link)
617 + {
618 + local objs = ;
619 + for local s in $(>)
620 + {
621 + # Translate any subdir elements into a simple file name.
622 + local o = [ MATCH "([^/]+)[/]?(.+)" : $(s) ] ;
623 + o = $(o:J=_) ;
624 + o = $(o:S=.o) ;
625 + objs += $(o) ;
626 + LOCATE on $(o) = $(locate-target) ;
627 + DEPENDS $(exe) : $(o) ;
628 + DEPENDS $(o) : $(s) ;
629 + DEPENDS $(o) : $(locate-target) ;
630 + [COMPILE] $(o) : $(s) ;
631 + .clean $(o) ;
632 + }
633 + DEPENDS $(exe) : $(objs) ;
634 + DEPENDS $(exe) : $(locate-target) ;
635 + [COMPILE.LINK] $(exe) : $(objs) ;
636 + .clean $(exe) ;
637 + }
638 + else
639 + {
640 + DEPENDS $(exe) : $(>) ;
641 + DEPENDS $(exe) : $(locate-target) ;
642 + [COMPILE] $(exe) : $(>) ;
643 + .clean $(exe) ;
644 + }
645 + return $(exe) ;
646 +}
647 +if ! $(--def[2]) { actions [COMPILE] {
648 + "$(--cc)" "$(--bin)$(<:D=)" "$(--dir)$(<:D)$(./)" $(--out)$(<) "$(--def)$(--defs)" "$(--flags)" "$(--libs)" "$(>)"
649 +} }
650 +else { actions [COMPILE] {
651 + "$(--cc)" "$(--bin)$(<:D=)" "$(--dir)$(<:D)$(./)" $(--out)$(<) "$(--def[1])$(--defs:J=$(--def[2]))$(--def[3])" "$(--flags)" "$(--libs)" "$(>)"
652 +} }
653 +if $(VMS) { actions [COMPILE.LINK] {
654 + "$(--link)" $(--link-bin)$(<:D=) $(--link-dir)$(<:D)$(./) $(--link-out)$(<) $(--link-def)$(--link-defs) $(--link-flags) "$(--link-libs)" $(>J=", ")
655 +} }
656 +else { actions [COMPILE.LINK] {
657 + "$(--link)" "$(--link-bin)$(<:D=)" "$(--link-dir)$(<:D)$(./)" "$(--link-out)$(<)" "$(--link-def)$(--link-defs)" "$(--link-flags)" "$(--link-libs)" "$(>)"
658 +} }
659 +
660 +rule .link
661 +{
662 + DEPENDS all : $(<) ;
663 + DEPENDS $(<) : $(>) ;
664 + [LINK] $(<) : $(>) ;
665 + .clean $(<) ;
666 +}
667 +if $(NT) { actions [LINK] {
668 + copy "$(>)" "$(<)"
669 +} }
670 +if $(UNIX) { actions [LINK] {
671 + ln -fs "$(>)" "$(<)"
672 +} }
673 +if $(VMS) { actions [LINK] {
674 + COPY/REPLACE $(>) $(<)
675 +} }
676 +
677 +rule .move
678 +{
679 + DEPENDS $(<) : $(>) ;
680 + [MOVE] $(<) : $(>) ;
681 +}
682 +if $(NT) { actions [MOVE] {
683 + del /f "$(<)"
684 + rename "$(>)" "$(<)"
685 +} }
686 +if $(UNIX) { actions [MOVE] {
687 + mv -f "$(>)" "$(<)"
688 +} }
689 +if $(VMS) { actions [MOVE] {
690 + RENAME "$(>)" "$(<)"
691 +} }
692 +
693 +# Generate the grammar tokens table, and the real yacc grammar.
694 +rule .yyacc
695 +{
696 + local exe = [ .exe yyacc : yyacc.c ] ;
697 + NOUPDATE $(exe) ;
698 + DEPENDS $(<) : $(exe) $(>) ;
699 + LEAVES $(<) ;
700 + yyacc.exe on $(<) = $(exe:R=$(locate-target)) ;
701 + [YYACC] $(<) : $(>) ;
702 +}
703 +actions [YYACC] {
704 + $(--chmod+w)$(<[1])
705 + $(--chmod+w)$(<[2])
706 + "$(yyacc.exe)" "$(<)" "$(>)"
707 +}
708 +if $(grammar)
709 +{
710 + .yyacc jamgram.y jamgramtab.h : jamgram.yy ;
711 +}
712 +else if $(debug)
713 +{
714 + .exe yyacc : yyacc.c ;
715 +}
716 +
717 +# How to build the grammar.
718 +if $(NT)
719 +{
720 + SUFEXE = .exe ;
721 + # try some other likely spellings...
722 + PATH ?= $(Path) ;
723 + PATH ?= $(path) ;
724 +}
725 +SUFEXE ?= "" ;
726 +
727 +yacc ?= [ GLOB $(PATH) : yacc$(SUFEXE) ] ;
728 +yacc ?= [ GLOB $(PATH) : bison$(SUFEXE) ] ;
729 +yacc ?= [ GLOB "$(ProgramFiles:J= )\\GnuWin32\\bin" "C:\\Program Files\\GnuWin32\\bin" : bison$(SUFEXE) ] ;
730 +yacc = $(yacc[1]) ;
731 +switch $(yacc:D=:S=)
732 +{
733 + case bison : yacc += -d --yacc ;
734 + case yacc : yacc += -d ;
735 +}
736 +if $(debug) && $(yacc)
737 +{
738 + yacc += -t -v ;
739 +}
740 +yacc += $(YACCFLAGS) ;
741 +
742 +rule .yacc
743 +{
744 + DEPENDS $(<) : $(>) ;
745 + LEAVES $(<) ;
746 + [YACC] $(<) : $(>) ;
747 +}
748 +if $(NT) { actions [YACC] {
749 + "$(yacc)" "$(>)"
750 + if not errorlevel 1 (
751 + del /f "$(<[1])"
752 + rename y.tab$(<[1]:S) "$(<[1])"
753 + del /f $(<[2])
754 + rename y.tab$(<[2]:S) "$(<[2])"
755 + ) else set _error_ =
756 +} }
757 +if $(UNIX) { actions [YACC] {
758 + if ` "$(yacc)" "$(>)" ` ; then
759 + mv -f y.tab$(<[1]:S) "$(<[1])"
760 + mv -f y.tab$(<[2]:S) "$(<[2])"
761 + else
762 + exit 1
763 + fi
764 +} }
765 +if $(VMS) { actions [YACC] {
766 + IF "$(yacc)" $(>)
767 + THEN
768 + RENAME y_tab$(<[1]:S) $(<[1])
769 + RENAME y_tab$(<[2]:S) $(<[2])
770 + ENDIF
771 +} }
772 +if $(grammar) && ! $(yacc)
773 +{
774 + EXIT "Could not find the 'yacc' tool, and therefore can not build the grammar." ;
775 +}
776 +if $(grammar) && $(yacc)
777 +{
778 + .yacc jamgram.c jamgram.h : jamgram.y ;
779 +}
780 +
781 +# How to build the compiled in jambase.
782 +rule .mkjambase
783 +{
784 + local exe = [ .exe mkjambase : mkjambase.c ] ;
785 + DEPENDS $(<) : $(exe) $(>) ;
786 + LEAVES $(<) ;
787 + mkjambase.exe on $(<) = $(exe:R=$(locate-target)) ;
788 + [MKJAMBASE] $(<) : $(>) ;
789 +}
790 +actions [MKJAMBASE] {
791 + $(--chmod+w)$(<)
792 + $(mkjambase.exe) "$(<)" "$(>)"
793 +}
794 +if $(debug)
795 +{
796 + .mkjambase jambase.c : Jambase ;
797 +}
798 +
799 +# How to build Jam.
800 +rule .jam
801 +{
802 + $(>).exe = [ .exe $(>) : $(jam.source) ] ;
803 + DEPENDS all : $($(>).exe) ;
804 +
805 + if $(debug)
806 + {
807 + $(<).exe = $(<:S=$($(>).exe:S)) ;
808 + LOCATE on $($(<).exe) = $(locate-target) ;
809 + .link $($(<).exe) : $($(>).exe) ;
810 + DEPENDS all : $($(<).exe) ;
811 + }
812 +}
813 +.jam jam : bjam ;
814 +
815 +# Scan sources for header dependencies.
816 +# WARNING: Yes those are *REAL TABS* below. DO NOT CHANGE,
817 +# under any circumstances, to spaces!! And the tabs
818 +# indenting this are so that if someone is in the mood to
819 +# replace tabs they hit this comment, and hopefully notice
820 +# their error.
821 +rule .scan
822 +{
823 + HDRRULE on $(<:D=) = .hdr.scan ;
824 + HDRSCAN on $(<:D=) = "^[ ]*#[ ]*include[ ]*([<\"][^\">]*[\">]).*$" ;
825 +}
826 +rule .hdr.scan
827 +{
828 + local hdrs = [ GLOB . : $(>:D=) ] ;
829 + INCLUDES $(<:D=) : $(hdrs:D=) ;
830 + HDRRULE on $(>:D=) = .hdr.scan ;
831 + HDRSCAN on $(>:D=) = "^[ ]*#[ ]*include[ ]*([<\"][^\">]*[\">]).*$" ;
832 +}
833 +.scan [ GLOB . : *.c ] ;
834 +
835 +# Distribution making from here on out. Assumes that
836 +# the docs are already built as html at ../doc/html. If
837 +# they aren't, then the docs are not included in the dist
838 +# archive.
839 +dist.license =
840 + [ GLOB . : $(LICENSE).txt ]
841 + ;
842 +dist.license = $(dist.license:D=)
843 + [ GLOB [ .path .. .. .. ] : $(LICENSE).txt ]
844 + [ GLOB [ .path .. boost ] : $(LICENSE).txt ] ;
845 +dist.docs =
846 + [ GLOB . : *.png *.css *.html ]
847 + ;
848 +dist.docs = $(dist.docs:D=)
849 + [ GLOB [ .path images ] : *.png ]
850 + [ GLOB [ .path jam ] : *.html ]
851 + ;
852 +dist.source =
853 + [ GLOB . : *.c *.h ]
854 + ;
855 +dist.source = $(dist.source:D=)
856 + $(dist.license[1])
857 + $(dist.docs)
858 + build.jam build.bat build.sh build_vms.com
859 + Jambase
860 + jamgram.y jamgram.yy
861 + [ .path modules set.c ]
862 + [ .path modules path.c ]
863 + [ .path modules regex.c ]
864 + [ .path modules property-set.c ]
865 + [ .path modules sequence.c ]
866 + [ .path modules order.c ]
867 + [ GLOB [ .path boehm_gc ] : * ]
868 + [ GLOB [ .path boehm_gc include ] : * ]
869 + [ GLOB [ .path boehm_gc include private ] : * ]
870 + [ GLOB [ .path boehm_gc cord ] : * ]
871 + [ GLOB [ .path boehm_gc Mac_files ] : * ]
872 + [ GLOB [ .path boehm_gc tests ] : * ]
873 + [ GLOB [ .path boehm_gc doc ] : * ]
874 + ;
875 +dist.bin =
876 + bjam
877 + ;
878 +dist.bin =
879 + $(dist.license[1])
880 + $(dist.bin:S=$(bjam.exe:S))
881 + ;
882 +
883 +if $(NT)
884 +{
885 + zip ?= [ GLOB "$(ProgramFiles:J= )\\7-ZIP" "C:\\Program Files\\7-ZIP" : "7z.exe" ] ;
886 + zip ?= [ GLOB "$(ProgramFiles:J= )\\7-ZIP" "C:\\Program Files\\7-ZIP" : "7zn.exe" ] ;
887 + zip ?= [ GLOB $(PATH) : zip.exe ] ;
888 + zip ?= zip ;
889 + zip = $(zip[1]) ;
890 + switch $(zip:D=:S=)
891 + {
892 + case 7z* : zip += a -r -tzip -mx=9 ;
893 + case zip : zip += -9r ;
894 + }
895 + actions piecemeal [PACK] {
896 + "$(zip)" "$(<)" "$(>)"
897 + }
898 + actions piecemeal [ZIP] {
899 + "$(zip)" "$(<)" "$(>)"
900 + }
901 + actions piecemeal [COPY] {
902 + copy /Y "$(>)" "$(<)" >NUL:
903 + }
904 +}
905 +if $(UNIX)
906 +{
907 + tar ?= [ GLOB $(PATH) : star bsdtar tar ] ;
908 + tar = $(tar[1]) ;
909 + switch $(tar:D=:S=)
910 + {
911 + case star : tar += -c artype=pax -D -d -to-stdout ;
912 + case * : tar += -c -f - ;
913 + }
914 + actions [PACK] {
915 + "$(tar)" "$(>)" | gzip -c9 > "$(<)"
916 + }
917 + #~ actions [PACK] {
918 + #~ tar cf "$(<:S=.tar)" "$(>)"
919 + #~ }
920 + actions [ZIP] {
921 + gzip -c9 "$(>)" > "$(<)"
922 + }
923 + actions [COPY] {
924 + cp -Rpf "$(>)" "$(<)"
925 + }
926 +}
927 +
928 +# The single binary, compressed.
929 +rule .binary
930 +{
931 + local zip = ;
932 + if $(NT) { zip = $($(<).exe:S=.zip) ; }
933 + if $(UNIX) { zip = $($(<).exe:S=.tgz) ; }
934 + zip = $(zip:S=)-$(VERSION)-$(RELEASE)-$(platform)$(zip:S) ;
935 + DEPENDS $(zip) : $($(<).exe) ;
936 + DEPENDS dist : $(zip) ;
937 + #~ LOCATE on $(zip) = $(locate-target) ;
938 + if $(NT) { [ZIP] $(zip) : $($(<).exe) ; }
939 + if $(UNIX) { [PACK] $(zip) : $($(<).exe) ; }
940 + .clean $(zip) ;
941 +}
942 +
943 +# Package some file.
944 +rule .package ( dst-dir : src-files + )
945 +{
946 + local dst-files ;
947 + local src-files-actual ;
948 + for local src-path in $(src-files)
949 + {
950 + if ! [ GLOB $(src-path:P) : $(src-path:B) ] || [ CHECK_IF_FILE $(src-path) ]
951 + {
952 + local src-subdir = $(src-path:D) ;
953 + local src-file = $(src-path) ;
954 + while $(src-subdir:D) { src-subdir = $(src-subdir:D) ; }
955 + if $(src-subdir) = ".."
956 + {
957 + src-file = $(src-file:D=) ;
958 + }
959 + dst-files += $(src-file:R=$(dst-dir)) ;
960 + src-files-actual += $(src-path) ;
961 + }
962 + }
963 +
964 + local pack = ;
965 + if $(NT) { pack = $(dst-dir).zip ; }
966 + if $(UNIX) { pack = $(dst-dir).tgz ; }
967 +
968 + DEPENDS dist : $(pack) ;
969 + DEPENDS $(pack) : $(dst-files) ;
970 +
971 + local dst-files-queue = $(dst-files) ;
972 + for local src-path in $(src-files-actual)
973 + {
974 + local dst-file = $(dst-files-queue[1]) ;
975 + dst-files-queue = $(dst-files-queue[2-]) ;
976 + DEPENDS $(dst-file) : $(src-path) $(dst-file:D) ;
977 + .mkdir $(dst-file:D) ;
978 +
979 + [COPY] $(dst-file) : $(src-path) ;
980 + .clean $(dst-file) ;
981 + }
982 +
983 + [PACK] $(pack) : $(dst-files) ;
984 + .clean $(pack) ;
985 +}
986 +
987 +# RPM distro file.
988 +rpm-tool = [ GLOB $(PATH) : "rpmbuild" ] ;
989 +rpm-tool ?= [ GLOB $(PATH) : "rpm" ] ;
990 +rpm-tool = $(rpm-tool[1]) ;
991 +rule .rpm ( name : source )
992 +{
993 + local rpm-arch = ;
994 + switch $(OSPLAT)
995 + {
996 + case X86 : rpm-arch ?= i386 ;
997 + case PPC : rpm-arch ?= ppc ;
998 + case AXP : rpm-arch ?= alpha ;
999 + # no guaranty for these:
1000 + case IA64 : rpm-arch ?= ia64 ;
1001 + case ARM : rpm-arch ?= arm ;
1002 + case SPARC : rpm-arch ?= sparc ;
1003 + case * : rpm-arch ?= other ;
1004 + }
1005 + local target = $(name)-rpm ;
1006 + NOTFILE $(target) ;
1007 + DEPENDS dist : $(target) ;
1008 + DEPENDS $(target) : $(name).$(rpm-arch).rpm $(name).src.rpm ;
1009 + DEPENDS $(name).$(rpm-arch).rpm : $(source) ;
1010 + DEPENDS $(name).src.rpm : $(name).$(rpm-arch).rpm ;
1011 + docs on $(target) = $(dist.docs:J=" ") ;
1012 + arch on $(target) = $(rpm-arch) ;
1013 + if $(rpm-arch) = ppc { target-opt on $(target) = --target= ; }
1014 + else { target-opt on $(target) = "--target " ; }
1015 + [RPM] $(target) : $(source) ;
1016 + .clean $(name).$(rpm-arch).rpm $(name).src.rpm ;
1017 +}
1018 +actions [RPM] {
1019 + set -e
1020 + export BOOST_JAM_TOOLSET="$(toolset)"
1021 + $(rpm-tool) -ta $(target-opt)$(arch) $(>) | tee rpm.out
1022 + cp `grep -e '^Wrote:' rpm.out | sed 's/^Wrote: //'` .
1023 + rm -f rpm.out
1024 +}
1025 +
1026 +# The distribution targets. Don't bother with the targets if
1027 +# distribution build not requested.
1028 +if dist in $(ARGV)
1029 +{
1030 + #~ .binary bjam ;
1031 + .package $(NAME)-$(VERSION) : $(dist.source) ;
1032 + .package $(NAME)-$(VERSION)-$(RELEASE)-$(platform) : $(dist.bin) ;
1033 + if $(rpm-tool)
1034 + {
1035 + #~ .rpm $(NAME)-$(VERSION)-$(RELEASE) : $(NAME)-$(VERSION).tgz ;
1036 + }
1037 +}
1038 diff -pruN boost-jam-3.1.17.orig/build.sh boost-jam-3.1.17/build.sh
1039 --- boost-jam-3.1.17.orig/build.sh 2008-11-30 01:32:38.692291050 +1100
1040 +++ boost-jam-3.1.17/build.sh 2008-11-30 01:32:54.483291045 +1100
1041 @@ -12,7 +12,7 @@ BOOST_JAM_TOOLSET=
1042 echo_run ()
1043 {
1044 echo "$@"
1045 - $@
1046 + eval "$@"
1047 r=$?
1048 if test $r -ne 0 ; then
1049 exit $r
1050 @@ -265,7 +265,7 @@ if test "${BJAM_UPDATE}" != "update" ; t
1051 echo_run rm -rf bootstrap
1052 echo_run mkdir bootstrap
1053 if test ! -r jamgram.y -o ! -r jamgramtab.h ; then
1054 - echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_YYACC} ${YYACC_SOURCES}
1055 + echo_run ${BOOST_JAM_CC} ${CFLAGS} ${BOOST_JAM_OPT_YYACC} ${YYACC_SOURCES}
1056 if test -x "./bootstrap/yyacc0" ; then
1057 echo_run ./bootstrap/yyacc0 jamgram.y jamgramtab.h jamgram.yy
1058 fi
1059 @@ -279,16 +279,20 @@ if test "${BJAM_UPDATE}" != "update" ; t
1060 mv -f y.tab.h jamgram.h
1061 fi
1062 if test ! -r jambase.c ; then
1063 - echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_MKJAMBASE} ${MKJAMBASE_SOURCES}
1064 + echo_run ${BOOST_JAM_CC} ${CFLAGS} ${BOOST_JAM_OPT_MKJAMBASE} ${MKJAMBASE_SOURCES}
1065 if test -x "./bootstrap/mkjambase0" ; then
1066 echo_run ./bootstrap/mkjambase0 jambase.c Jambase
1067 fi
1068 fi
1069 - echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES}
1070 + echo_run ${BOOST_JAM_CC} ${CFLAGS} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES}
1071 fi
1072 if test -x "./bootstrap/jam0" ; then
1073 if test "${BJAM_UPDATE}" != "update" ; then
1074 echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" clean
1075 fi
1076 - echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@"
1077 + if test -z "$BOOST_JAM_TOOLSET_ROOT"; then
1078 + echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "$@"
1079 + else
1080 + echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@"
1081 + fi
1082 fi
|