2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-21 02:52:12 +00:00

Improvements to bootstraping and building.

- build.bat; added more possible locations for VC7.
- build.bat; added an alternate for finding bison (gnuwin32.sourceforge.net version).
- build.jam; added an alternate for finding bison (gnuwin32.sourceforge.net version).
- build.jam; removed some obsolete docs from distribution.
- build.jam; fixed path problem when packaging on windows, the debian directory.
- build.jam; added header scanning to create the extra dependencies to make building the grammar work correctly.
- build.jam; fixed building of the grammar to remove attempts at building it spuriously.
- build.jam; fixed building of grammar so that it doesn't delete existing files if the yacc execution fails.
- index.html; minor cleanup of language in some places.
- index.html; removed references to no longer packaged docs.
- *; updated the version to 3.1.5 in various places.
- build.*; tested on windows with vc7, metrowerks, mingw, and borland


[SVN r18703]
This commit is contained in:
Rene Rivera
2003-06-07 18:44:32 +00:00
parent 1f4c4dee0c
commit 8a7dcb64ba
6 changed files with 552 additions and 362 deletions

View File

@@ -1,5 +1,5 @@
@ECHO OFF
REM Copyrigt (C) 2002 Rene Rivera.
REM Copyrigt (C) 2002-2003 Rene Rivera.
REM Permission to copy, use, modify, sell and distribute this software
REM is granted provided this copyright notice appears in all copies.
REM This software is provided "as is" without express or implied
@@ -62,6 +62,31 @@ if not errorlevel 1 (
set BOOST_JAM_TOOLSET_ROOT=%FOUND_PATH%..\..\
goto :eof)
setlocal & endlocal
if NOT "_%VCINSTALLDIR%_" == "__" (
set BOOST_JAM_TOOLSET=vc7
set BOOST_JAM_TOOLSET_ROOT=%VCINSTALLDIR%\VC7\
goto :eof)
setlocal & endlocal
if EXIST "%ProgramFiles%\Microsoft Visual Studio .NET 2003\VC7\bin\VCVARS32.BAT" (
set BOOST_JAM_TOOLSET=vc7
set BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio .NET 2003\VC7\
goto :eof)
setlocal & endlocal
if EXIST "C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\bin\VCVARS32.BAT" (
set BOOST_JAM_TOOLSET=vc7
set BOOST_JAM_TOOLSET_ROOT=C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\
goto :eof)
setlocal & endlocal
if EXIST "%ProgramFiles%\Microsoft Visual Studio .NET\VC7\bin\VCVARS32.BAT" (
set BOOST_JAM_TOOLSET=vc7
set BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio .NET\VC7\
goto :eof)
setlocal & endlocal
if EXIST "C:\Program Files\Microsoft Visual Studio .NET\VC7\bin\VCVARS32.BAT" (
set BOOST_JAM_TOOLSET=vc7
set BOOST_JAM_TOOLSET_ROOT=C:\Program Files\Microsoft Visual Studio .NET\VC7\
goto :eof)
setlocal & endlocal
if NOT "_%MSVCDir%_" == "__" (
set BOOST_JAM_TOOLSET=msvc
set BOOST_JAM_TOOLSET_ROOT=%MSVCDir%\
@@ -87,16 +112,6 @@ if EXIST "C:\Program Files\Microsoft Visual C++\VC98\bin\VCVARS32.BAT" (
set BOOST_JAM_TOOLSET_ROOT=C:\Program Files\Microsoft Visual C++\VC98\
goto :eof)
setlocal & endlocal
if EXIST "%ProgramFiles%\Microsoft Visual Studio .NET\VC7\bin\VCVARS32.BAT" (
set BOOST_JAM_TOOLSET=vc7
set BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio .NET\VC7\
goto :eof)
setlocal & endlocal
if EXIST "C:\Program Files\Microsoft Visual Studio .NET\VC7\bin\VCVARS32.BAT" (
set BOOST_JAM_TOOLSET=vc7
set BOOST_JAM_TOOLSET_ROOT=C:\Program Files\Microsoft Visual Studio .NET\VC7\
goto :eof)
setlocal & endlocal
call :Test_Path cl.exe
if not errorlevel 1 (
set BOOST_JAM_TOOLSET=msvc
@@ -135,6 +150,26 @@ setlocal & endlocal
call :Error_Print "Could not find a suitable toolset."
goto :eof
:Guess_Yacc
REM Tries to find bison or yacc in common places so we can build the grammar.
setlocal & endlocal
call :Test_Path yacc.exe
if not errorlevel 1 (
set YACC=yacc -d
goto :eof)
setlocal & endlocal
call :Test_Path bison.exe
if not errorlevel 1 (
set YACC=bison -d --yacc
goto :eof)
setlocal & endlocal
if EXIST "C:\Program Files\GnuWin32\bin\bison.exe" (
set YACC="C:\Program Files\GnuWin32\bin\bison.exe" -d --yacc
goto :eof)
setlocal & endlocal
call :Error_Print "Could not find Yacc to build the Jam grammar."
goto :eof
:Start
set BOOST_JAM_TOOLSET=
@@ -172,7 +207,7 @@ if "_%BOOST_JAM_TOOLSET%_" == "_metrowerks_" (
set BOOST_JAM_TOOLSET_ROOT=%CWFolder%\) )
if "_%BOOST_JAM_TOOLSET%_" == "_metrowerks_" (
if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
set PATH=%PATH%;%BOOST_JAM_TOOLSET_ROOT%Other Metrowerks Tools\Command Line Tools)
set PATH=%BOOST_JAM_TOOLSET_ROOT%Other Metrowerks Tools\Command Line Tools;%PATH%)
set BOOST_JAM_CC=mwcc -runtime staticsingle -DNT
set BOOST_JAM_OPT_JAM=-o bootstrap.%BOOST_JAM_TOOLSET%\jam0.exe
set BOOST_JAM_OPT_MKJAMBASE=-o bootstrap.%BOOST_JAM_TOOLSET%\mkjambase0.exe
@@ -187,8 +222,8 @@ if "_%BOOST_JAM_TOOLSET%_" == "_msvc_" (
call "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT" ) )
if "_%BOOST_JAM_TOOLSET%_" == "_msvc_" (
if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
set PATH=%PATH%;%BOOST_JAM_TOOLSET_ROOT%bin)
set BOOST_JAM_CC="%BOOST_JAM_TOOLSET_ROOT%bin\cl.exe" /nologo /GZ /Zi /MLd -DNT -DYYDEBUG kernel32.lib
set PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%)
set BOOST_JAM_CC=cl /nologo /GZ /Zi /MLd -DNT -DYYDEBUG kernel32.lib
set BOOST_JAM_OPT_JAM=/Febootstrap.%BOOST_JAM_TOOLSET%\jam0
set BOOST_JAM_OPT_MKJAMBASE=/Febootstrap.%BOOST_JAM_TOOLSET%\mkjambase0
set BOOST_JAM_OPT_YYACC=/Febootstrap.%BOOST_JAM_TOOLSET%\yyacc0
@@ -202,8 +237,8 @@ if "_%BOOST_JAM_TOOLSET%_" == "_vc7_" (
call "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT" ) )
if "_%BOOST_JAM_TOOLSET%_" == "_vc7_" (
if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
set PATH=%PATH%;%BOOST_JAM_TOOLSET_ROOT%bin)
set BOOST_JAM_CC="%BOOST_JAM_TOOLSET_ROOT%bin\cl.exe" /nologo /GZ /Zi /MLd -DNT -DYYDEBUG kernel32.lib
set PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%)
set BOOST_JAM_CC=cl /nologo /GZ /Zi /MLd -DNT -DYYDEBUG kernel32.lib
set BOOST_JAM_OPT_JAM=/Febootstrap.%BOOST_JAM_TOOLSET%\jam0
set BOOST_JAM_OPT_MKJAMBASE=/Febootstrap.%BOOST_JAM_TOOLSET%\mkjambase0
set BOOST_JAM_OPT_YYACC=/Febootstrap.%BOOST_JAM_TOOLSET%\yyacc0
@@ -217,7 +252,7 @@ if "_%BOOST_JAM_TOOLSET%_" == "_borland_" (
if not errorlevel 1 (
set BOOST_JAM_TOOLSET_ROOT=%FOUND_PATH%..\) ) )
if "_%BOOST_JAM_TOOLSET%_" == "_borland_" (
if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (set PATH=%PATH%;%BOOST_JAM_TOOLSET_ROOT%Bin)
if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (set PATH=%BOOST_JAM_TOOLSET_ROOT%Bin;%PATH%)
set BOOST_JAM_CC=bcc32 -WC -w- -q "-I%BOOST_JAM_TOOLSET_ROOT%Include" "-L%BOOST_JAM_TOOLSET_ROOT%Lib" /DNT -nbootstrap.%BOOST_JAM_TOOLSET%
set BOOST_JAM_OPT_JAM=-ejam0
set BOOST_JAM_OPT_MKJAMBASE=-emkjambasejam0
@@ -288,20 +323,17 @@ md bootstrap.%BOOST_JAM_TOOLSET%
:Bootstrap_GrammarPrep
%BOOST_JAM_CC% %BOOST_JAM_OPT_YYACC% %YYACC_SOURCES%
@if not exist ".\bootstrap.%BOOST_JAM_TOOLSET%\yyacc0.exe" goto Skip_GrammarPrep
".\bootstrap.%BOOST_JAM_TOOLSET%\yyacc0.exe" jamgram.y jamgramtab.h jamgram.yy
.\bootstrap.%BOOST_JAM_TOOLSET%\yyacc0 jamgram.y jamgramtab.h jamgram.yy
:Skip_GrammarPrep
@if not exist jamgram.c goto Bootstrap_GrammarBuild
@if not exist jamgram.h goto Bootstrap_GrammarBuild
@goto Skip_GrammarBuild
:Bootstrap_GrammarBuild
@ECHO OFF
@setlocal & endlocal
@call :Test_Path yacc.exe
@if not errorlevel 1 (set YACC=yacc -d)
@setlocal & endlocal
@call :Test_Path bison.exe
@if not errorlevel 1 ( if "_%YACC%_" == "__" (set YACC=bison -y -d --yacc) )
@if "_%YACC%_" == "__" goto Skip_GrammarBuild
@echo OFF
if "_%YACC%_" == "__" (
call :Guess_Yacc
)
if errorlevel 1 goto Finish
@echo ON
%YACC% jamgram.y
rename y.tab.c jamgram.c
@@ -311,7 +343,7 @@ rename y.tab.h jamgram.h
@if exist jambase.c goto Skip_Jambase
%BOOST_JAM_CC% %BOOST_JAM_OPT_MKJAMBASE% %MKJAMBASE_SOURCES%
@if not exist ".\bootstrap.%BOOST_JAM_TOOLSET%\mkjambase0.exe" goto Skip_Jambase
".\bootstrap.%BOOST_JAM_TOOLSET%\mkjambase0.exe" jambase.c Jambase
.\bootstrap.%BOOST_JAM_TOOLSET%\mkjambase0 jambase.c Jambase
:Skip_Jambase
%BOOST_JAM_CC% %BOOST_JAM_OPT_JAM% %BJAM_SOURCES%
@if not exist ".\bootstrap.%BOOST_JAM_TOOLSET%\jam0.exe" goto Skip_Jam

View File

@@ -6,8 +6,8 @@
# Info about what we are building.
NAME = boost-jam ;
VERSION = 3.1.4 ;
RELEASE = 2 ;
VERSION = 3.1.5 ;
RELEASE = 1 ;
# Generate development debug binaries?
if --debug in $(ARGV)
@@ -188,38 +188,40 @@ if $(tool.$(toolset).link.cc)
--link-libs = $(tool.$(toolset).link.linklibs) ;
}
# Platform related specifics.
if $(NT) { rule .path { return "$(<:J=\\)" ; } }
else if $(OS2) { rule .path { return "$(<:J=\\)" ; } }
else if $(VMS) { rule .path { return "[.$(<:J=/)]" ; } }
else if $(MAC) { rule .path { return ":$(<:J=\:)" ; } }
else { rule .path { return "$(<:J=/)" ; } }
if $(VMS) { . = "_" ; }
else { . = "." ; }
# Put executables in platform-specific subdirectory.
locate-target = $(LOCATE_TARGET) ;
if $(VMS)
{
locate-target ?= [.bin_vms] ;
locate-target ?= [ .path bin$(.)vms ] ;
platform = vms ;
}
else if $(MAC)
{
locate-target ?= :bin.$(OS:L)$(OSPLAT:L) ;
locate-target ?= [ .path bin$(.)$(OS:L)$(OSPLAT:L) ] ;
platform = $(OS:L)$(OSPLAT:L) ;
}
else if $(OSPLAT)
{
locate-target ?= bin.$(OS:L)$(OSPLAT:L) ;
locate-target ?= [ .path bin$(.)$(OS:L)$(OSPLAT:L) ] ;
platform = $(OS:L)$(OSPLAT:L) ;
}
else
{
locate-target ?= bin.$(OS:L) ;
locate-target ?= [ .path bin$(.)$(OS:L) ] ;
platform = $(OS:L) ;
}
if $(debug)
{
if $(VMS)
{
locate-target = $(locate-target)_debug ;
}
else
{
locate-target = $(locate-target).debug ;
}
locate-target = $(locate-target)$(.)debug ;
}
# We have some different files for UNIX, VMS, and NT.
@@ -288,24 +290,42 @@ ALWAYS clean ;
# Utility rules and actions...
rule .clean
{
.rm clean : $(<) ;
.rm. clean : $(<) ;
}
if $(NT) { actions piecemeal together existing .rm. {
del /F /Q $(>)
} }
if $(UNIX) { actions piecemeal together existing .rm. {
rm -f $(>)
} }
if $(VMS) { actions piecemeal together existing .rm. {
DELETE $(>[--2]:J=";*, ") $(>[-1]);*
} }
if $(NT) {
--chmod+w = "attrib -r " ;
}
if $(UNIX) {
--chmod+w = "chmod +w " ;
}
if $(VMS) {
--chmod+w = "SET FILE/PROT=(S:RWED) " ;
}
if $(NT) { actions piecemeal together existing .rm { del /F /Q $(>) } }
if $(UNIX) { actions piecemeal together existing .rm { rm -f $(>) } }
if $(VMS) { actions piecemeal together existing .rm { DELETE $(>[--2]:J=";*, ") $(>[-1]);* } }
if $(NT) { --chmod+w = "attrib -r " ; }
if $(UNIX) { --chmod+w = "chmod +w " ; }
if $(VMS) { --chmod+w = "SET FILE/PROT=(S:RWED) " ; }
rule .mkdir
{
NOUPDATE $(<) ;
if $(<:P) { DEPENDS $(<) : $(<:P) ; .mkdir $(<:P) ; }
if ! $(md<$(<)>) { .md $(<) ; md<$(<)> = - ; }
if ! $(md<$(<)>) { .mkdir. $(<) ; md<$(<)> = - ; }
}
if $(NT) { actions .md { md $(<) } }
if $(UNIX) { actions .md { mkdir $(<) } }
if $(VMS) { actions .md { CREATE/DIR $(<J=", ") } }
if $(NT) { actions .mkdir. {
md $(<)
} }
if $(UNIX) { actions .mkdir. {
mkdir $(<)
} }
if $(VMS) { actions .mkdir. {
CREATE/DIR $(<J=", ")
} }
rule .exe
{
@@ -323,56 +343,81 @@ rule .exe
DEPENDS $(exe) : $(o) ;
DEPENDS $(o) : $(s) ;
DEPENDS $(o) : $(locate-target) ;
.cc $(o) : $(s) ;
.cc. $(o) : $(s) ;
.clean $(o) ;
}
DEPENDS $(exe) : $(>:S=.o) ;
DEPENDS $(exe) : $(locate-target) ;
.ld $(exe) : $(>:S=.o) ;
.ld. $(exe) : $(>:S=.o) ;
.clean $(exe) ;
}
else
{
DEPENDS $(exe) : $(>) ;
DEPENDS $(exe) : $(locate-target) ;
.cc $(exe) : $(>) ;
.cc. $(exe) : $(>) ;
.clean $(exe) ;
}
return $(exe) ;
}
actions .cc { $(--cc) $(--bin)$(<:D=) $(--dir)$(<:D) $(--out)$(<) $(--def)$(--defs) $(--flags) "$(--libs)" $(>) }
if $(VMS)
{
actions .ld { $(--link) $(--link-bin)$(<:D=) $(--link-dir)$(<:D) $(--link-out)$(<) $(--link-def)$(--link-defs) $(--link-flags) "$(--link-libs)" $(>J=", ") }
}
else
{
actions .ld { $(--link) $(--link-bin)$(<:D=) $(--link-dir)$(<:D) $(--link-out)$(<) $(--link-def)$(--link-defs) $(--link-flags) "$(--link-libs)" $(>) }
actions .cc. {
$(--cc) $(--bin)$(<:D=) $(--dir)$(<:D) $(--out)$(<) $(--def)$(--defs) $(--flags) "$(--libs)" $(>)
}
if $(VMS) { actions .ld. {
$(--link) $(--link-bin)$(<:D=) $(--link-dir)$(<:D) $(--link-out)$(<) $(--link-def)$(--link-defs) $(--link-flags) "$(--link-libs)" $(>J=", ")
} }
else { actions .ld. {
$(--link) $(--link-bin)$(<:D=) $(--link-dir)$(<:D) $(--link-out)$(<) $(--link-def)$(--link-defs) $(--link-flags) "$(--link-libs)" $(>)
} }
rule .link
{
DEPENDS all : $(<) ;
DEPENDS $(<) : $(>) ;
.link. $(<) : $(>) ;
.clean $(<) ;
}
if $(NT) { actions .link { copy $(>) $(<) } }
if $(UNIX) { actions .link { ln -f $(>) $(<) } }
if $(VMS) { actions .link { COPY/REPLACE $(>) $(<) } }
if $(NT) { actions .link. {
copy $(>) $(<)
} }
if $(UNIX) { actions .link. {
ln -f $(>) $(<)
} }
if $(VMS) { actions .link. {
COPY/REPLACE $(>) $(<)
} }
rule .move
{
DEPENDS $(<) : $(>) ;
.move. $(<) : $(>) ;
}
if $(NT) { actions .move. {
del /f $(<)
rename $(>) $(<)
} }
if $(UNIX) { actions .move. {
mv -f $(>) $(<)
} }
if $(VMS) { actions .move. {
RENAME $(>) $(<)
} }
# Generate the grammar tokens table, and the real yacc grammar.
rule .yyacc
{
local exe = [ .exe yyacc : yyacc.c ] ;
DEPENDS all : $(<) ;
NOUPDATE $(exe) ;
DEPENDS $(<) : $(exe) $(>) ;
LEAVES $(<) ;
yyacc.exe on $(<) = $(exe:R=$(locate-target)) ;
.yyacc. $(<) : $(>) ;
}
actions .yyacc
{ $(--chmod+w)$(<[1])
actions .yyacc. {
$(--chmod+w)$(<[1])
$(--chmod+w)$(<[2])
$(yyacc.exe) $(<) $(>) }
$(yyacc.exe) $(<) $(>)
}
.yyacc jamgram.y jamgramtab.h : jamgram.yy ;
# How to build the grammar.
@@ -387,13 +432,13 @@ SUFEXE ?= "" ;
yacc ?= [ GLOB $(PATH) : yacc$(SUFEXE) ] ;
yacc ?= [ GLOB $(PATH) : bison$(SUFEXE) ] ;
yacc ?= [ GLOB "C:\\Program Files\\GnuWin32\\bin" : bison$(SUFEXE) ] ;
yacc = $(yacc[1]) ;
switch $(yacc:D=:S=)
{
case bison : yacc += -d --yacc ; # -t -l -v ;
case bison : yacc += -d --yacc ;
case yacc : yacc += -d ;
}
if $(debug) && $(yacc)
{
yacc += -t -v ;
@@ -402,21 +447,18 @@ yacc += $(YACCFLAGS) ;
rule .yacc
{
DEPENDS $(<) : $(>) ;
DEPENDS y.tab.c y.tab.h : $(>) ;
DEPENDS y.tab.h : y.tab.c ;
TEMPORARY y.tab.c y.tab.h ;
DEPENDS $(<[1]) : y.tab.c ;
DEPENDS $(<[2]) : y.tab.h ;
.yacc. y.tab.c y.tab.h : $(>) ;
.move $(<[1]) : y.tab.c ;
.move $(<[2]) : y.tab.h ;
}
actions .yacc. {
"$(yacc)" $(>)
}
if $(NT) { actions .yacc
{ $(yacc) $(>)
del /f $(<[1]:S=.c) $(<[1]:S=.h)
rename y.tab.c $(<[1]:S=.c)
rename y.tab.h $(<[1]:S=.h) } }
if $(UNIX) { actions .yacc
{ $(yacc) $(>)
mv -f y.tab.c $(<[1]:S=.c)
mv -f y.tab.h $(<[1]:S=.h) } }
if $(VMS) { actions .yacc
{ $(yacc) $(>)
RENAME y_tab.c $(<[1]:S=.c)
RENAME -f y_tab.h $(<[1]:S=.h) } }
if $(yacc)
{
.yacc jamgram.c jamgram.h : jamgram.y ;
@@ -429,10 +471,12 @@ rule .mkjambase
DEPENDS $(<) : $(exe) $(>) ;
LEAVES $(<) ;
mkjambase.exe on $(<) = $(exe:R=$(locate-target)) ;
.mkjambase. $(<) : $(>) ;
}
actions .mkjambase. {
$(--chmod+w)$(<)
$(mkjambase.exe) $(<) $(>)
}
actions .mkjambase
{ $(--chmod+w)$(<)
$(mkjambase.exe) $(<) $(>) }
.mkjambase jambase.c : Jambase ;
# How to build Jam.
@@ -447,11 +491,26 @@ rule .jam
}
.jam bjam : jam ;
# Scan sources for header dependencies.
rule .scan
{
HDRRULE on $(<:D=) = .hdr.scan ;
HDRSCAN on $(<:D=) = "^[ ]*#[ ]*include[ ]*[<\"]([^\">]*)[\">].*$" ;
}
rule .hdr.scan
{
local hdrs = [ GLOB . : $(>:D=) ] ;
INCLUDES $(<:D=) : $(hdrs:D=) ;
HDRRULE on $(>:D=) = .hdr.scan ;
HDRSCAN on $(>:D=) = "^[ ]*#[ ]*include[ ]*[<\"]([^\">]*)[\">].*$" ;
}
.scan [ GLOB . : *.c ] ;
# Distribution making from here on out.
dist.docs =
index.html
Porting RELNOTES
Jam.html Jambase.html Jamfile.html
Porting
Jam.html
;
dist.source =
[ GLOB . : *.c *.h ]
@@ -459,9 +518,13 @@ dist.source =
dist.source = $(dist.source:D=)
$(dist.docs)
build.jam build.bat build.sh build_vms.com
Jambase Jamfile
Jambase
jamgram.y jamgram.yy
debian/changelog debian/control debian/copyright debian/jam.man.sgml debian/rules
[ .path debian changelog ]
[ .path debian control ]
[ .path debian copyright ]
[ .path debian jam.man.sgml ]
[ .path debian rules ]
boost-jam.spec
;
dist.bin =
@@ -473,23 +536,38 @@ dist.bin =
if $(NT)
{
if [ GLOB "C:\\Program Files\\7-ZIP" : "7zn.exe" ]
{
actions piecemeal .pack { "C:\Program Files\7-ZIP\7zn.exe" a -r -tzip "$(<)" "$(>)" }
actions piecemeal .zip { "C:\Program Files\7-ZIP\7zn.exe" a -r -tzip "$(<)" "$(>)" }
}
else
{
actions piecemeal .pack { zip -9r "$(<)" "$(>)" }
actions piecemeal .zip { zip -9r "$(<)" "$(>)" }
}
actions piecemeal .cp { copy /Y "$(>)" "$(<)" }
if [ GLOB "C:\\Program Files\\7-ZIP" : "7zn.exe" ] {
actions piecemeal .pack. {
"C:\Program Files\7-ZIP\7zn.exe" a -r -tzip "$(<)" "$(>)"
}
actions piecemeal .zip. {
"C:\Program Files\7-ZIP\7zn.exe" a -r -tzip "$(<)" "$(>)"
}
}
else
{
actions piecemeal .pack. {
zip -9r "$(<)" "$(>)"
}
actions piecemeal .zip. {
zip -9r "$(<)" "$(>)"
}
}
actions piecemeal .cp. {
copy /Y "$(>)" "$(<)"
}
}
if $(UNIX)
{
actions .pack { tar zcf "$(<)" "$(>)" }
actions .zip { gzip -c9 "$(>)" > "$(<)" }
actions .cp { cp -Rpf "$(>)" "$(<)" }
actions .pack. {
tar zcf "$(<)" "$(>)"
}
actions .zip. {
gzip -c9 "$(>)" > "$(<)"
}
actions .cp. {
cp -Rpf "$(>)" "$(<)"
}
}
# The single binary, compressed.
@@ -502,8 +580,8 @@ rule .binary
DEPENDS $(zip) : $($(<).exe) ;
DEPENDS dist : $(zip) ;
#~ LOCATE on $(zip) = $(locate-target) ;
if $(NT) { .zip $(zip) : $($(<).exe) ; }
if $(UNIX) { .pack $(zip) : $($(<).exe) ; }
if $(NT) { .zip. $(zip) : $($(<).exe) ; }
if $(UNIX) { .pack. $(zip) : $($(<).exe) ; }
.clean $(zip) ;
}
@@ -527,11 +605,11 @@ rule .package ( dst-dir : src-files + )
local dst-file = $(src-file:R=$(dst-dir)) ;
DEPENDS $(dst-file) : $(src-file) $(dst-file:D) ;
.mkdir $(dst-file:D) ;
.cp $(dst-file) : $(src-file) ;
.cp. $(dst-file) : $(src-file) ;
.clean $(dst-file) ;
}
.pack $(pack) : $(dst-files) ;
.pack. $(pack) : $(dst-files) ;
.clean $(pack) ;
}
@@ -561,15 +639,16 @@ rule .rpm ( name : source )
arch on $(target) = $(rpm-arch) ;
if $(rpm-arch) = ppc { target-opt on $(target) = --target= ; }
else { target-opt on $(target) = "--target " ; }
.rpm-build $(target) : $(source) ;
.rpm. $(target) : $(source) ;
.clean $(name).$(rpm-arch).rpm $(name).src.rpm ;
}
actions .rpm-build
{ export BOOST_JAM_DOCS="$(docs)"
actions .rpm. {
export BOOST_JAM_DOCS="$(docs)"
export BOOST_JAM_TOOLSET="$(toolset)"
rpm -ta $(target-opt)$(arch) $(>) | tee rpm.out
cp `grep -e '^Wrote:' rpm.out | sed 's/^Wrote: //'` .
rm -f rpm.out }
rm -f rpm.out
}
# The distribution targets.
.binary bjam ;

View File

@@ -135,8 +135,8 @@
facilitate its use in the Boost Build System, but should be backward
compatible with Perforce Jam.</p>
<p>This is version 3.1.4 of BJam and is based on version 2.4 of
Jam/MR:</p>
<p>This is version 3.1.5 of BJam and is based on version 2.4 of Jam/MR:</p>
<pre>
/+\
+\ Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.
@@ -180,39 +180,18 @@ Main smail : main.c map.c resolve.c deliver.c
<h2><a name="contents"></a>Contents</h2>
<table cellpadding="2" cellspacing="2" border="0" summary=
<table cellpadding="2" cellspacing="2" border="0" summary=
"Contents of Jam documents.">
<tr>
<td valign="top"><a href="Jam.html">Jam.html</a></td>
<td valign="top">Jam and language reference.</td>
</tr>
<tr>
<td valign="top"><a href="Jambase.html">Jambase.html</a></td>
<td valign="top">Reference for the Jambase boilerplate file.</td>
</tr>
<tr>
<td valign="top"><a href="Jamfile.html">Jamfile.html</a></td>
<td valign="top">Easy reading on creating a Jamfile and using
jam.</td>
</tr>
<tr>
<td valign="top"><a href="RELNOTES">RELNOTES</a></td>
<td valign="top">Release 2.4 release notes.</td>
</tr>
<tr>
<td valign="top"><a href="Porting">Porting</a></td>
<td valign="top">Notes on porting jam to wildcat platforms.</td>
</tr>
</table>
<tr>
<td valign="top"><a href="Jam.html">Jam.html</a></td>
<td valign="top">Jam and language reference.</td>
</tr>
<tr>
<td valign="top"><a href="Porting">Porting</a></td>
<td valign="top">Notes on porting jam to wildcat platforms.</td>
</tr>
</table>
<h2><a name="installing"></a>Installing</h2>
@@ -317,7 +296,8 @@ sh ./build.sh
href="http://gcc.gnu.org">GCC</a> as the <a href=
"http://www.mingw.org">MinGW</a> configuration</td>
<td valign="top">&nbsp;</td>
<td valign="top">* Common install location: <tt>"C:\MinGW"</tt></td>
</tr>
<tr>
@@ -336,8 +316,13 @@ sh ./build.sh
"http://msdn.microsoft.com/visualc/">vc7</a>, Microsoft Visual C++
7.x</td>
<td valign="top">* Common install location: <tt>"C:\Program
Files\Microsoft Visual Studio .NET"</tt></td>
<td valign="top">* <tt>VCVARS32.BAT</tt> or <tt>VSVARS32.BAT</tt> already
configured<br>
* Common install location: <tt>"C:\Program Files\Microsoft Visual Studio
.NET"</tt><br>
* Common install location: <tt>"C:\Program Files\Microsoft Visual Studio
.NET 2003"</tt></td>
</tr>
<tr>
@@ -443,17 +428,20 @@ sh ./build.sh
used for compatability with the Perforce Jam/MR functionality, whereas
"bjam" is used for the extended Boost.Build functionality.</p>
<p>The <tt>build</tt> scripts support additional invocation arguments for
use by developers of Boost.Jam. The extra arguments come after the
toolset, and can take the form of <tt>"--options"</tt> or targets for the
<tt>build.jam</tt> script:</p>
<p>The <tt>build</tt> scripts support additional invocation arguments for use
by developers of Boost.Jam. The extra arguments come after the toolset, and
can take the form of <tt>"--option"</tt> or targets for the <tt>build.jam</tt>
script:</p>
<pre>
&lt;build script name&gt; [toolset] [--options* [targets]*]
&lt;build script name&gt; [toolset] [--option+ target*]
</pre>
<p>There is current only one available option, <tt>"--debug"</tt>, which
builds debugging versions of the executable. When built they are placed
in their own directory <tt>"bin.&lt;platform&gt;.debug"</tt>.</p>
<p>There is current only one available option, <tt>"--debug"</tt>, which builds
debugging versions of the executable. When built they are placed in their own
directory <tt>"bin.&lt;platform&gt;.debug"</tt>. To specify targets without
options, one can suply a special ignore option <tt>&quot;---&quot;</tt>.</p>
<p>Currently there are two targets supported: <tt>dist</tt>, and
<tt>clean</tt>. Respectively they: generate packages (compressed
@@ -1139,7 +1127,7 @@ UPDATE $(previous-updates) a-new-target ;
Grist is used instead of identifying targets with absolute paths for two
reasons:</p>
<ol summary="">
<ol>
<li>The location of targets cannot always be derived solely from what
the user puts in a Jamfile, but sometimes depends also on the <a href=
"#binding">binding</a> process. Some mechanism to distinctly identify
@@ -1187,32 +1175,28 @@ if $(MESSAGE) { ECHO The message is: $(MESSAGE) ; }
unintuitive, with regards to how other Unix programs accept options.
There are two variants accepted as valid for an option:</p>
<ol summary="">
<ol>
<li><tt>-xvalue</tt>, and</li>
<li><tt>-x value</tt>.</li>
</ol>
<p>Please also read <a href="./Jam.html">The Jam language reference</a>
for the additional details, and the <a href="./RELNOTES">Jam release
notes</a> for a brief description of recent, but <b>fundamental changes
to the Jam language</b> without which you will probably not understand
any of the build system code. In particular, note that the
<tt>return</tt> statement does not affect control flow.</p>
<p>Please also read <a href="./Jam.html">The Jam language reference</a> for the
additional details.</p>
<hr>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
2 February, 2003
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="mailto:rrivera@acm.org">Ren&eacute;
Rivera</a>, David Abrahams, Vladimir Prus 2003. All Rights Reserved.</i>
Permission to copy, use, modify, sell and distribute this document is
granted provided this copyright notice appears in all copies. This
document is provided "as is" without express or implied warranty, and
with no claim as to its suitability for any purpose.</p>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
7 June, 2003
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright Ren&eacute; Rivera, David Abrahams, Vladimir Prus 2003.
All Rights Reserved.</i> Permission to copy, use, modify, sell and distribute
this document is granted provided this copyright notice appears in all copies.
This document is provided "as is" without express or implied warranty, and with
no claim as to its suitability for any purpose.</p>
</body>
</html>

View File

@@ -1,5 +1,5 @@
@ECHO OFF
REM Copyrigt (C) 2002 Rene Rivera.
REM Copyrigt (C) 2002-2003 Rene Rivera.
REM Permission to copy, use, modify, sell and distribute this software
REM is granted provided this copyright notice appears in all copies.
REM This software is provided "as is" without express or implied
@@ -62,6 +62,31 @@ if not errorlevel 1 (
set BOOST_JAM_TOOLSET_ROOT=%FOUND_PATH%..\..\
goto :eof)
setlocal & endlocal
if NOT "_%VCINSTALLDIR%_" == "__" (
set BOOST_JAM_TOOLSET=vc7
set BOOST_JAM_TOOLSET_ROOT=%VCINSTALLDIR%\VC7\
goto :eof)
setlocal & endlocal
if EXIST "%ProgramFiles%\Microsoft Visual Studio .NET 2003\VC7\bin\VCVARS32.BAT" (
set BOOST_JAM_TOOLSET=vc7
set BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio .NET 2003\VC7\
goto :eof)
setlocal & endlocal
if EXIST "C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\bin\VCVARS32.BAT" (
set BOOST_JAM_TOOLSET=vc7
set BOOST_JAM_TOOLSET_ROOT=C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\
goto :eof)
setlocal & endlocal
if EXIST "%ProgramFiles%\Microsoft Visual Studio .NET\VC7\bin\VCVARS32.BAT" (
set BOOST_JAM_TOOLSET=vc7
set BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio .NET\VC7\
goto :eof)
setlocal & endlocal
if EXIST "C:\Program Files\Microsoft Visual Studio .NET\VC7\bin\VCVARS32.BAT" (
set BOOST_JAM_TOOLSET=vc7
set BOOST_JAM_TOOLSET_ROOT=C:\Program Files\Microsoft Visual Studio .NET\VC7\
goto :eof)
setlocal & endlocal
if NOT "_%MSVCDir%_" == "__" (
set BOOST_JAM_TOOLSET=msvc
set BOOST_JAM_TOOLSET_ROOT=%MSVCDir%\
@@ -87,16 +112,6 @@ if EXIST "C:\Program Files\Microsoft Visual C++\VC98\bin\VCVARS32.BAT" (
set BOOST_JAM_TOOLSET_ROOT=C:\Program Files\Microsoft Visual C++\VC98\
goto :eof)
setlocal & endlocal
if EXIST "%ProgramFiles%\Microsoft Visual Studio .NET\VC7\bin\VCVARS32.BAT" (
set BOOST_JAM_TOOLSET=vc7
set BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio .NET\VC7\
goto :eof)
setlocal & endlocal
if EXIST "C:\Program Files\Microsoft Visual Studio .NET\VC7\bin\VCVARS32.BAT" (
set BOOST_JAM_TOOLSET=vc7
set BOOST_JAM_TOOLSET_ROOT=C:\Program Files\Microsoft Visual Studio .NET\VC7\
goto :eof)
setlocal & endlocal
call :Test_Path cl.exe
if not errorlevel 1 (
set BOOST_JAM_TOOLSET=msvc
@@ -135,6 +150,26 @@ setlocal & endlocal
call :Error_Print "Could not find a suitable toolset."
goto :eof
:Guess_Yacc
REM Tries to find bison or yacc in common places so we can build the grammar.
setlocal & endlocal
call :Test_Path yacc.exe
if not errorlevel 1 (
set YACC=yacc -d
goto :eof)
setlocal & endlocal
call :Test_Path bison.exe
if not errorlevel 1 (
set YACC=bison -d --yacc
goto :eof)
setlocal & endlocal
if EXIST "C:\Program Files\GnuWin32\bin\bison.exe" (
set YACC="C:\Program Files\GnuWin32\bin\bison.exe" -d --yacc
goto :eof)
setlocal & endlocal
call :Error_Print "Could not find Yacc to build the Jam grammar."
goto :eof
:Start
set BOOST_JAM_TOOLSET=
@@ -172,7 +207,7 @@ if "_%BOOST_JAM_TOOLSET%_" == "_metrowerks_" (
set BOOST_JAM_TOOLSET_ROOT=%CWFolder%\) )
if "_%BOOST_JAM_TOOLSET%_" == "_metrowerks_" (
if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
set PATH=%PATH%;%BOOST_JAM_TOOLSET_ROOT%Other Metrowerks Tools\Command Line Tools)
set PATH=%BOOST_JAM_TOOLSET_ROOT%Other Metrowerks Tools\Command Line Tools;%PATH%)
set BOOST_JAM_CC=mwcc -runtime staticsingle -DNT
set BOOST_JAM_OPT_JAM=-o bootstrap.%BOOST_JAM_TOOLSET%\jam0.exe
set BOOST_JAM_OPT_MKJAMBASE=-o bootstrap.%BOOST_JAM_TOOLSET%\mkjambase0.exe
@@ -187,8 +222,8 @@ if "_%BOOST_JAM_TOOLSET%_" == "_msvc_" (
call "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT" ) )
if "_%BOOST_JAM_TOOLSET%_" == "_msvc_" (
if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
set PATH=%PATH%;%BOOST_JAM_TOOLSET_ROOT%bin)
set BOOST_JAM_CC="%BOOST_JAM_TOOLSET_ROOT%bin\cl.exe" /nologo /GZ /Zi /MLd -DNT -DYYDEBUG kernel32.lib
set PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%)
set BOOST_JAM_CC=cl /nologo /GZ /Zi /MLd -DNT -DYYDEBUG kernel32.lib
set BOOST_JAM_OPT_JAM=/Febootstrap.%BOOST_JAM_TOOLSET%\jam0
set BOOST_JAM_OPT_MKJAMBASE=/Febootstrap.%BOOST_JAM_TOOLSET%\mkjambase0
set BOOST_JAM_OPT_YYACC=/Febootstrap.%BOOST_JAM_TOOLSET%\yyacc0
@@ -202,8 +237,8 @@ if "_%BOOST_JAM_TOOLSET%_" == "_vc7_" (
call "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT" ) )
if "_%BOOST_JAM_TOOLSET%_" == "_vc7_" (
if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
set PATH=%PATH%;%BOOST_JAM_TOOLSET_ROOT%bin)
set BOOST_JAM_CC="%BOOST_JAM_TOOLSET_ROOT%bin\cl.exe" /nologo /GZ /Zi /MLd -DNT -DYYDEBUG kernel32.lib
set PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%)
set BOOST_JAM_CC=cl /nologo /GZ /Zi /MLd -DNT -DYYDEBUG kernel32.lib
set BOOST_JAM_OPT_JAM=/Febootstrap.%BOOST_JAM_TOOLSET%\jam0
set BOOST_JAM_OPT_MKJAMBASE=/Febootstrap.%BOOST_JAM_TOOLSET%\mkjambase0
set BOOST_JAM_OPT_YYACC=/Febootstrap.%BOOST_JAM_TOOLSET%\yyacc0
@@ -217,7 +252,7 @@ if "_%BOOST_JAM_TOOLSET%_" == "_borland_" (
if not errorlevel 1 (
set BOOST_JAM_TOOLSET_ROOT=%FOUND_PATH%..\) ) )
if "_%BOOST_JAM_TOOLSET%_" == "_borland_" (
if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (set PATH=%PATH%;%BOOST_JAM_TOOLSET_ROOT%Bin)
if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (set PATH=%BOOST_JAM_TOOLSET_ROOT%Bin;%PATH%)
set BOOST_JAM_CC=bcc32 -WC -w- -q "-I%BOOST_JAM_TOOLSET_ROOT%Include" "-L%BOOST_JAM_TOOLSET_ROOT%Lib" /DNT -nbootstrap.%BOOST_JAM_TOOLSET%
set BOOST_JAM_OPT_JAM=-ejam0
set BOOST_JAM_OPT_MKJAMBASE=-emkjambasejam0
@@ -288,20 +323,17 @@ md bootstrap.%BOOST_JAM_TOOLSET%
:Bootstrap_GrammarPrep
%BOOST_JAM_CC% %BOOST_JAM_OPT_YYACC% %YYACC_SOURCES%
@if not exist ".\bootstrap.%BOOST_JAM_TOOLSET%\yyacc0.exe" goto Skip_GrammarPrep
".\bootstrap.%BOOST_JAM_TOOLSET%\yyacc0.exe" jamgram.y jamgramtab.h jamgram.yy
.\bootstrap.%BOOST_JAM_TOOLSET%\yyacc0 jamgram.y jamgramtab.h jamgram.yy
:Skip_GrammarPrep
@if not exist jamgram.c goto Bootstrap_GrammarBuild
@if not exist jamgram.h goto Bootstrap_GrammarBuild
@goto Skip_GrammarBuild
:Bootstrap_GrammarBuild
@ECHO OFF
@setlocal & endlocal
@call :Test_Path yacc.exe
@if not errorlevel 1 (set YACC=yacc -d)
@setlocal & endlocal
@call :Test_Path bison.exe
@if not errorlevel 1 ( if "_%YACC%_" == "__" (set YACC=bison -y -d --yacc) )
@if "_%YACC%_" == "__" goto Skip_GrammarBuild
@echo OFF
if "_%YACC%_" == "__" (
call :Guess_Yacc
)
if errorlevel 1 goto Finish
@echo ON
%YACC% jamgram.y
rename y.tab.c jamgram.c
@@ -311,7 +343,7 @@ rename y.tab.h jamgram.h
@if exist jambase.c goto Skip_Jambase
%BOOST_JAM_CC% %BOOST_JAM_OPT_MKJAMBASE% %MKJAMBASE_SOURCES%
@if not exist ".\bootstrap.%BOOST_JAM_TOOLSET%\mkjambase0.exe" goto Skip_Jambase
".\bootstrap.%BOOST_JAM_TOOLSET%\mkjambase0.exe" jambase.c Jambase
.\bootstrap.%BOOST_JAM_TOOLSET%\mkjambase0 jambase.c Jambase
:Skip_Jambase
%BOOST_JAM_CC% %BOOST_JAM_OPT_JAM% %BJAM_SOURCES%
@if not exist ".\bootstrap.%BOOST_JAM_TOOLSET%\jam0.exe" goto Skip_Jam

View File

@@ -6,8 +6,8 @@
# Info about what we are building.
NAME = boost-jam ;
VERSION = 3.1.4 ;
RELEASE = 2 ;
VERSION = 3.1.5 ;
RELEASE = 1 ;
# Generate development debug binaries?
if --debug in $(ARGV)
@@ -188,38 +188,40 @@ if $(tool.$(toolset).link.cc)
--link-libs = $(tool.$(toolset).link.linklibs) ;
}
# Platform related specifics.
if $(NT) { rule .path { return "$(<:J=\\)" ; } }
else if $(OS2) { rule .path { return "$(<:J=\\)" ; } }
else if $(VMS) { rule .path { return "[.$(<:J=/)]" ; } }
else if $(MAC) { rule .path { return ":$(<:J=\:)" ; } }
else { rule .path { return "$(<:J=/)" ; } }
if $(VMS) { . = "_" ; }
else { . = "." ; }
# Put executables in platform-specific subdirectory.
locate-target = $(LOCATE_TARGET) ;
if $(VMS)
{
locate-target ?= [.bin_vms] ;
locate-target ?= [ .path bin$(.)vms ] ;
platform = vms ;
}
else if $(MAC)
{
locate-target ?= :bin.$(OS:L)$(OSPLAT:L) ;
locate-target ?= [ .path bin$(.)$(OS:L)$(OSPLAT:L) ] ;
platform = $(OS:L)$(OSPLAT:L) ;
}
else if $(OSPLAT)
{
locate-target ?= bin.$(OS:L)$(OSPLAT:L) ;
locate-target ?= [ .path bin$(.)$(OS:L)$(OSPLAT:L) ] ;
platform = $(OS:L)$(OSPLAT:L) ;
}
else
{
locate-target ?= bin.$(OS:L) ;
locate-target ?= [ .path bin$(.)$(OS:L) ] ;
platform = $(OS:L) ;
}
if $(debug)
{
if $(VMS)
{
locate-target = $(locate-target)_debug ;
}
else
{
locate-target = $(locate-target).debug ;
}
locate-target = $(locate-target)$(.)debug ;
}
# We have some different files for UNIX, VMS, and NT.
@@ -288,24 +290,42 @@ ALWAYS clean ;
# Utility rules and actions...
rule .clean
{
.rm clean : $(<) ;
.rm. clean : $(<) ;
}
if $(NT) { actions piecemeal together existing .rm. {
del /F /Q $(>)
} }
if $(UNIX) { actions piecemeal together existing .rm. {
rm -f $(>)
} }
if $(VMS) { actions piecemeal together existing .rm. {
DELETE $(>[--2]:J=";*, ") $(>[-1]);*
} }
if $(NT) {
--chmod+w = "attrib -r " ;
}
if $(UNIX) {
--chmod+w = "chmod +w " ;
}
if $(VMS) {
--chmod+w = "SET FILE/PROT=(S:RWED) " ;
}
if $(NT) { actions piecemeal together existing .rm { del /F /Q $(>) } }
if $(UNIX) { actions piecemeal together existing .rm { rm -f $(>) } }
if $(VMS) { actions piecemeal together existing .rm { DELETE $(>[--2]:J=";*, ") $(>[-1]);* } }
if $(NT) { --chmod+w = "attrib -r " ; }
if $(UNIX) { --chmod+w = "chmod +w " ; }
if $(VMS) { --chmod+w = "SET FILE/PROT=(S:RWED) " ; }
rule .mkdir
{
NOUPDATE $(<) ;
if $(<:P) { DEPENDS $(<) : $(<:P) ; .mkdir $(<:P) ; }
if ! $(md<$(<)>) { .md $(<) ; md<$(<)> = - ; }
if ! $(md<$(<)>) { .mkdir. $(<) ; md<$(<)> = - ; }
}
if $(NT) { actions .md { md $(<) } }
if $(UNIX) { actions .md { mkdir $(<) } }
if $(VMS) { actions .md { CREATE/DIR $(<J=", ") } }
if $(NT) { actions .mkdir. {
md $(<)
} }
if $(UNIX) { actions .mkdir. {
mkdir $(<)
} }
if $(VMS) { actions .mkdir. {
CREATE/DIR $(<J=", ")
} }
rule .exe
{
@@ -323,56 +343,81 @@ rule .exe
DEPENDS $(exe) : $(o) ;
DEPENDS $(o) : $(s) ;
DEPENDS $(o) : $(locate-target) ;
.cc $(o) : $(s) ;
.cc. $(o) : $(s) ;
.clean $(o) ;
}
DEPENDS $(exe) : $(>:S=.o) ;
DEPENDS $(exe) : $(locate-target) ;
.ld $(exe) : $(>:S=.o) ;
.ld. $(exe) : $(>:S=.o) ;
.clean $(exe) ;
}
else
{
DEPENDS $(exe) : $(>) ;
DEPENDS $(exe) : $(locate-target) ;
.cc $(exe) : $(>) ;
.cc. $(exe) : $(>) ;
.clean $(exe) ;
}
return $(exe) ;
}
actions .cc { $(--cc) $(--bin)$(<:D=) $(--dir)$(<:D) $(--out)$(<) $(--def)$(--defs) $(--flags) "$(--libs)" $(>) }
if $(VMS)
{
actions .ld { $(--link) $(--link-bin)$(<:D=) $(--link-dir)$(<:D) $(--link-out)$(<) $(--link-def)$(--link-defs) $(--link-flags) "$(--link-libs)" $(>J=", ") }
}
else
{
actions .ld { $(--link) $(--link-bin)$(<:D=) $(--link-dir)$(<:D) $(--link-out)$(<) $(--link-def)$(--link-defs) $(--link-flags) "$(--link-libs)" $(>) }
actions .cc. {
$(--cc) $(--bin)$(<:D=) $(--dir)$(<:D) $(--out)$(<) $(--def)$(--defs) $(--flags) "$(--libs)" $(>)
}
if $(VMS) { actions .ld. {
$(--link) $(--link-bin)$(<:D=) $(--link-dir)$(<:D) $(--link-out)$(<) $(--link-def)$(--link-defs) $(--link-flags) "$(--link-libs)" $(>J=", ")
} }
else { actions .ld. {
$(--link) $(--link-bin)$(<:D=) $(--link-dir)$(<:D) $(--link-out)$(<) $(--link-def)$(--link-defs) $(--link-flags) "$(--link-libs)" $(>)
} }
rule .link
{
DEPENDS all : $(<) ;
DEPENDS $(<) : $(>) ;
.link. $(<) : $(>) ;
.clean $(<) ;
}
if $(NT) { actions .link { copy $(>) $(<) } }
if $(UNIX) { actions .link { ln -f $(>) $(<) } }
if $(VMS) { actions .link { COPY/REPLACE $(>) $(<) } }
if $(NT) { actions .link. {
copy $(>) $(<)
} }
if $(UNIX) { actions .link. {
ln -f $(>) $(<)
} }
if $(VMS) { actions .link. {
COPY/REPLACE $(>) $(<)
} }
rule .move
{
DEPENDS $(<) : $(>) ;
.move. $(<) : $(>) ;
}
if $(NT) { actions .move. {
del /f $(<)
rename $(>) $(<)
} }
if $(UNIX) { actions .move. {
mv -f $(>) $(<)
} }
if $(VMS) { actions .move. {
RENAME $(>) $(<)
} }
# Generate the grammar tokens table, and the real yacc grammar.
rule .yyacc
{
local exe = [ .exe yyacc : yyacc.c ] ;
DEPENDS all : $(<) ;
NOUPDATE $(exe) ;
DEPENDS $(<) : $(exe) $(>) ;
LEAVES $(<) ;
yyacc.exe on $(<) = $(exe:R=$(locate-target)) ;
.yyacc. $(<) : $(>) ;
}
actions .yyacc
{ $(--chmod+w)$(<[1])
actions .yyacc. {
$(--chmod+w)$(<[1])
$(--chmod+w)$(<[2])
$(yyacc.exe) $(<) $(>) }
$(yyacc.exe) $(<) $(>)
}
.yyacc jamgram.y jamgramtab.h : jamgram.yy ;
# How to build the grammar.
@@ -387,13 +432,13 @@ SUFEXE ?= "" ;
yacc ?= [ GLOB $(PATH) : yacc$(SUFEXE) ] ;
yacc ?= [ GLOB $(PATH) : bison$(SUFEXE) ] ;
yacc ?= [ GLOB "C:\\Program Files\\GnuWin32\\bin" : bison$(SUFEXE) ] ;
yacc = $(yacc[1]) ;
switch $(yacc:D=:S=)
{
case bison : yacc += -d --yacc ; # -t -l -v ;
case bison : yacc += -d --yacc ;
case yacc : yacc += -d ;
}
if $(debug) && $(yacc)
{
yacc += -t -v ;
@@ -402,21 +447,18 @@ yacc += $(YACCFLAGS) ;
rule .yacc
{
DEPENDS $(<) : $(>) ;
DEPENDS y.tab.c y.tab.h : $(>) ;
DEPENDS y.tab.h : y.tab.c ;
TEMPORARY y.tab.c y.tab.h ;
DEPENDS $(<[1]) : y.tab.c ;
DEPENDS $(<[2]) : y.tab.h ;
.yacc. y.tab.c y.tab.h : $(>) ;
.move $(<[1]) : y.tab.c ;
.move $(<[2]) : y.tab.h ;
}
actions .yacc. {
"$(yacc)" $(>)
}
if $(NT) { actions .yacc
{ $(yacc) $(>)
del /f $(<[1]:S=.c) $(<[1]:S=.h)
rename y.tab.c $(<[1]:S=.c)
rename y.tab.h $(<[1]:S=.h) } }
if $(UNIX) { actions .yacc
{ $(yacc) $(>)
mv -f y.tab.c $(<[1]:S=.c)
mv -f y.tab.h $(<[1]:S=.h) } }
if $(VMS) { actions .yacc
{ $(yacc) $(>)
RENAME y_tab.c $(<[1]:S=.c)
RENAME -f y_tab.h $(<[1]:S=.h) } }
if $(yacc)
{
.yacc jamgram.c jamgram.h : jamgram.y ;
@@ -429,10 +471,12 @@ rule .mkjambase
DEPENDS $(<) : $(exe) $(>) ;
LEAVES $(<) ;
mkjambase.exe on $(<) = $(exe:R=$(locate-target)) ;
.mkjambase. $(<) : $(>) ;
}
actions .mkjambase. {
$(--chmod+w)$(<)
$(mkjambase.exe) $(<) $(>)
}
actions .mkjambase
{ $(--chmod+w)$(<)
$(mkjambase.exe) $(<) $(>) }
.mkjambase jambase.c : Jambase ;
# How to build Jam.
@@ -447,11 +491,26 @@ rule .jam
}
.jam bjam : jam ;
# Scan sources for header dependencies.
rule .scan
{
HDRRULE on $(<:D=) = .hdr.scan ;
HDRSCAN on $(<:D=) = "^[ ]*#[ ]*include[ ]*[<\"]([^\">]*)[\">].*$" ;
}
rule .hdr.scan
{
local hdrs = [ GLOB . : $(>:D=) ] ;
INCLUDES $(<:D=) : $(hdrs:D=) ;
HDRRULE on $(>:D=) = .hdr.scan ;
HDRSCAN on $(>:D=) = "^[ ]*#[ ]*include[ ]*[<\"]([^\">]*)[\">].*$" ;
}
.scan [ GLOB . : *.c ] ;
# Distribution making from here on out.
dist.docs =
index.html
Porting RELNOTES
Jam.html Jambase.html Jamfile.html
Porting
Jam.html
;
dist.source =
[ GLOB . : *.c *.h ]
@@ -459,9 +518,13 @@ dist.source =
dist.source = $(dist.source:D=)
$(dist.docs)
build.jam build.bat build.sh build_vms.com
Jambase Jamfile
Jambase
jamgram.y jamgram.yy
debian/changelog debian/control debian/copyright debian/jam.man.sgml debian/rules
[ .path debian changelog ]
[ .path debian control ]
[ .path debian copyright ]
[ .path debian jam.man.sgml ]
[ .path debian rules ]
boost-jam.spec
;
dist.bin =
@@ -473,23 +536,38 @@ dist.bin =
if $(NT)
{
if [ GLOB "C:\\Program Files\\7-ZIP" : "7zn.exe" ]
{
actions piecemeal .pack { "C:\Program Files\7-ZIP\7zn.exe" a -r -tzip "$(<)" "$(>)" }
actions piecemeal .zip { "C:\Program Files\7-ZIP\7zn.exe" a -r -tzip "$(<)" "$(>)" }
}
else
{
actions piecemeal .pack { zip -9r "$(<)" "$(>)" }
actions piecemeal .zip { zip -9r "$(<)" "$(>)" }
}
actions piecemeal .cp { copy /Y "$(>)" "$(<)" }
if [ GLOB "C:\\Program Files\\7-ZIP" : "7zn.exe" ] {
actions piecemeal .pack. {
"C:\Program Files\7-ZIP\7zn.exe" a -r -tzip "$(<)" "$(>)"
}
actions piecemeal .zip. {
"C:\Program Files\7-ZIP\7zn.exe" a -r -tzip "$(<)" "$(>)"
}
}
else
{
actions piecemeal .pack. {
zip -9r "$(<)" "$(>)"
}
actions piecemeal .zip. {
zip -9r "$(<)" "$(>)"
}
}
actions piecemeal .cp. {
copy /Y "$(>)" "$(<)"
}
}
if $(UNIX)
{
actions .pack { tar zcf "$(<)" "$(>)" }
actions .zip { gzip -c9 "$(>)" > "$(<)" }
actions .cp { cp -Rpf "$(>)" "$(<)" }
actions .pack. {
tar zcf "$(<)" "$(>)"
}
actions .zip. {
gzip -c9 "$(>)" > "$(<)"
}
actions .cp. {
cp -Rpf "$(>)" "$(<)"
}
}
# The single binary, compressed.
@@ -502,8 +580,8 @@ rule .binary
DEPENDS $(zip) : $($(<).exe) ;
DEPENDS dist : $(zip) ;
#~ LOCATE on $(zip) = $(locate-target) ;
if $(NT) { .zip $(zip) : $($(<).exe) ; }
if $(UNIX) { .pack $(zip) : $($(<).exe) ; }
if $(NT) { .zip. $(zip) : $($(<).exe) ; }
if $(UNIX) { .pack. $(zip) : $($(<).exe) ; }
.clean $(zip) ;
}
@@ -527,11 +605,11 @@ rule .package ( dst-dir : src-files + )
local dst-file = $(src-file:R=$(dst-dir)) ;
DEPENDS $(dst-file) : $(src-file) $(dst-file:D) ;
.mkdir $(dst-file:D) ;
.cp $(dst-file) : $(src-file) ;
.cp. $(dst-file) : $(src-file) ;
.clean $(dst-file) ;
}
.pack $(pack) : $(dst-files) ;
.pack. $(pack) : $(dst-files) ;
.clean $(pack) ;
}
@@ -561,15 +639,16 @@ rule .rpm ( name : source )
arch on $(target) = $(rpm-arch) ;
if $(rpm-arch) = ppc { target-opt on $(target) = --target= ; }
else { target-opt on $(target) = "--target " ; }
.rpm-build $(target) : $(source) ;
.rpm. $(target) : $(source) ;
.clean $(name).$(rpm-arch).rpm $(name).src.rpm ;
}
actions .rpm-build
{ export BOOST_JAM_DOCS="$(docs)"
actions .rpm. {
export BOOST_JAM_DOCS="$(docs)"
export BOOST_JAM_TOOLSET="$(toolset)"
rpm -ta $(target-opt)$(arch) $(>) | tee rpm.out
cp `grep -e '^Wrote:' rpm.out | sed 's/^Wrote: //'` .
rm -f rpm.out }
rm -f rpm.out
}
# The distribution targets.
.binary bjam ;

View File

@@ -135,8 +135,8 @@
facilitate its use in the Boost Build System, but should be backward
compatible with Perforce Jam.</p>
<p>This is version 3.1.4 of BJam and is based on version 2.4 of
Jam/MR:</p>
<p>This is version 3.1.5 of BJam and is based on version 2.4 of Jam/MR:</p>
<pre>
/+\
+\ Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.
@@ -180,39 +180,18 @@ Main smail : main.c map.c resolve.c deliver.c
<h2><a name="contents"></a>Contents</h2>
<table cellpadding="2" cellspacing="2" border="0" summary=
<table cellpadding="2" cellspacing="2" border="0" summary=
"Contents of Jam documents.">
<tr>
<td valign="top"><a href="Jam.html">Jam.html</a></td>
<td valign="top">Jam and language reference.</td>
</tr>
<tr>
<td valign="top"><a href="Jambase.html">Jambase.html</a></td>
<td valign="top">Reference for the Jambase boilerplate file.</td>
</tr>
<tr>
<td valign="top"><a href="Jamfile.html">Jamfile.html</a></td>
<td valign="top">Easy reading on creating a Jamfile and using
jam.</td>
</tr>
<tr>
<td valign="top"><a href="RELNOTES">RELNOTES</a></td>
<td valign="top">Release 2.4 release notes.</td>
</tr>
<tr>
<td valign="top"><a href="Porting">Porting</a></td>
<td valign="top">Notes on porting jam to wildcat platforms.</td>
</tr>
</table>
<tr>
<td valign="top"><a href="Jam.html">Jam.html</a></td>
<td valign="top">Jam and language reference.</td>
</tr>
<tr>
<td valign="top"><a href="Porting">Porting</a></td>
<td valign="top">Notes on porting jam to wildcat platforms.</td>
</tr>
</table>
<h2><a name="installing"></a>Installing</h2>
@@ -317,7 +296,8 @@ sh ./build.sh
href="http://gcc.gnu.org">GCC</a> as the <a href=
"http://www.mingw.org">MinGW</a> configuration</td>
<td valign="top">&nbsp;</td>
<td valign="top">* Common install location: <tt>"C:\MinGW"</tt></td>
</tr>
<tr>
@@ -336,8 +316,13 @@ sh ./build.sh
"http://msdn.microsoft.com/visualc/">vc7</a>, Microsoft Visual C++
7.x</td>
<td valign="top">* Common install location: <tt>"C:\Program
Files\Microsoft Visual Studio .NET"</tt></td>
<td valign="top">* <tt>VCVARS32.BAT</tt> or <tt>VSVARS32.BAT</tt> already
configured<br>
* Common install location: <tt>"C:\Program Files\Microsoft Visual Studio
.NET"</tt><br>
* Common install location: <tt>"C:\Program Files\Microsoft Visual Studio
.NET 2003"</tt></td>
</tr>
<tr>
@@ -443,17 +428,20 @@ sh ./build.sh
used for compatability with the Perforce Jam/MR functionality, whereas
"bjam" is used for the extended Boost.Build functionality.</p>
<p>The <tt>build</tt> scripts support additional invocation arguments for
use by developers of Boost.Jam. The extra arguments come after the
toolset, and can take the form of <tt>"--options"</tt> or targets for the
<tt>build.jam</tt> script:</p>
<p>The <tt>build</tt> scripts support additional invocation arguments for use
by developers of Boost.Jam. The extra arguments come after the toolset, and
can take the form of <tt>"--option"</tt> or targets for the <tt>build.jam</tt>
script:</p>
<pre>
&lt;build script name&gt; [toolset] [--options* [targets]*]
&lt;build script name&gt; [toolset] [--option+ target*]
</pre>
<p>There is current only one available option, <tt>"--debug"</tt>, which
builds debugging versions of the executable. When built they are placed
in their own directory <tt>"bin.&lt;platform&gt;.debug"</tt>.</p>
<p>There is current only one available option, <tt>"--debug"</tt>, which builds
debugging versions of the executable. When built they are placed in their own
directory <tt>"bin.&lt;platform&gt;.debug"</tt>. To specify targets without
options, one can suply a special ignore option <tt>&quot;---&quot;</tt>.</p>
<p>Currently there are two targets supported: <tt>dist</tt>, and
<tt>clean</tt>. Respectively they: generate packages (compressed
@@ -1139,7 +1127,7 @@ UPDATE $(previous-updates) a-new-target ;
Grist is used instead of identifying targets with absolute paths for two
reasons:</p>
<ol summary="">
<ol>
<li>The location of targets cannot always be derived solely from what
the user puts in a Jamfile, but sometimes depends also on the <a href=
"#binding">binding</a> process. Some mechanism to distinctly identify
@@ -1187,32 +1175,28 @@ if $(MESSAGE) { ECHO The message is: $(MESSAGE) ; }
unintuitive, with regards to how other Unix programs accept options.
There are two variants accepted as valid for an option:</p>
<ol summary="">
<ol>
<li><tt>-xvalue</tt>, and</li>
<li><tt>-x value</tt>.</li>
</ol>
<p>Please also read <a href="./Jam.html">The Jam language reference</a>
for the additional details, and the <a href="./RELNOTES">Jam release
notes</a> for a brief description of recent, but <b>fundamental changes
to the Jam language</b> without which you will probably not understand
any of the build system code. In particular, note that the
<tt>return</tt> statement does not affect control flow.</p>
<p>Please also read <a href="./Jam.html">The Jam language reference</a> for the
additional details.</p>
<hr>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
2 February, 2003
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="mailto:rrivera@acm.org">Ren&eacute;
Rivera</a>, David Abrahams, Vladimir Prus 2003. All Rights Reserved.</i>
Permission to copy, use, modify, sell and distribute this document is
granted provided this copyright notice appears in all copies. This
document is provided "as is" without express or implied warranty, and
with no claim as to its suitability for any purpose.</p>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
7 June, 2003
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright Ren&eacute; Rivera, David Abrahams, Vladimir Prus 2003.
All Rights Reserved.</i> Permission to copy, use, modify, sell and distribute
this document is granted provided this copyright notice appears in all copies.
This document is provided "as is" without express or implied warranty, and with
no claim as to its suitability for any purpose.</p>
</body>
</html>