diff --git a/v1/acc-tools.jam b/v1/acc-tools.jam deleted file mode 100644 index 12eecfce4..000000000 --- a/v1/acc-tools.jam +++ /dev/null @@ -1,119 +0,0 @@ -# (C) Copyright Toon Knapen 2002, David Abrahams 2002 -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# -# Jam tools information for : -# HP-UX aCC compiler -# - -set-as-singleton acc.root-directory ; -acc.bin-directory = $(acc.root-directory)$(SLASH)bin$(SLASH) ; -acc.bin-directory ?= " " ; - - -flags acc CC : cc ; -flags acc CXX : aCC ; - -flags acc CFLAGS off : ; -flags acc CFLAGS default : -O ; -flags acc CFLAGS speed : -O3 ; -flags acc CFLAGS space : -O2 ; - -flags acc CFLAGS off : +d ; -flags acc CFLAGS on : ; -flags acc CFLAGS full : ; -flags acc CFLAGS multi : -mt ; - -flags acc C++FLAGS off : ; -flags acc C++FLAGS on : ; - -flags acc C++FLAGS off : ; -flags acc C++FLAGS on : ; - -flags acc LINKFLAGS static : -llibstd_v2.a ; -flags acc LINKFLAGS shared : -llibstd_v2.sl ; - - -# We want the full path to the sources in the debug symbols because otherwise -# the debugger won't find the sources when we use boost.build. -flags acc CFLAGS on : -g ; -flags acc LINKFLAGS on : -g ; -flags acc LINKFLAGS off : -s ; -flags acc LINKFLAGS multi : -mt ; - -flags acc CFLAGS true : +Z ; -flags acc CFLAGS $(SHARED_TYPES) : +z ; -flags acc CFLAGS off : -w ; -flags acc LINKFLAGS $(SHARED_TYPES) : -b ; - -flags acc CFLAGS on : -pg ; -flags acc LINKFLAGS on : -pg ; - -flags acc CFLAGS ; -flags acc C++FLAGS ; -flags acc DEFINES ; -flags acc UNDEFS ; -flags acc HDRS ; -flags acc STDHDRS ; -flags acc LINKFLAGS ; -flags acc ARFLAGS ; - -flags acc LIBPATH ; -flags acc NEEDLIBS ; -flags acc FINDLIBS ; - -# BOOST_COMPATIBILITY ?= $(BOOST_ROOT)$(SLASH)boost$(SLASH)compatibility$(SLASH)cpp_c_headers ; -# flags tru64cxx STDHDRS : $(BOOST_COMPATIBILITY) ; - -if ! $(ARFLAGS) -{ - flags acc ARFLAGS : "" ; -} - -#### Link #### - -rule Link-action -{ - aCC-Link-action $(<) : $(>) ; -} - -actions aCC-Link-action bind NEEDLIBS -{ - $(acc.bin-directory)$(CXX) $(LINKFLAGS) -AA -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) -} - -#### Cc ##### - -rule Cc-action -{ - acc-Cc-action $(<) : $(>) ; -} - -actions acc-Cc-action -{ - $(acc.bin-directory)$(CC) -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" -} - -#### C++ #### -rule C++-action -{ - aCC-C++-action $(<) : $(>) ; -} - -actions aCC-C++-action -{ - $(acc.bin-directory)$(CXX) -AA -c +W823 -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" -} - -#### Archive #### - -rule Archive-action -{ - acc-Archive-action $(<) : $(>) ; -} - -actions updated together piecemeal acc-Archive-action -{ - ar ru$(ARFLAGS) "$(<)" "$(>)" -} diff --git a/v1/allyourbase.jam b/v1/allyourbase.jam deleted file mode 100644 index 4b4e28f5b..000000000 --- a/v1/allyourbase.jam +++ /dev/null @@ -1,2246 +0,0 @@ -# -# /+\ -# +\ Copyright 1993, 2000 Christopher Seiwald. -# \+/ -# -# This file is part of Jam - see jam.c for Copyright information. -# - -# This file is ALSO: -# (C) Copyright David Abrahams 2001. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# -# JAMBASE - jam 2.3 ruleset providing make(1)-like functionality -# -# Supports UNIX, NT, and VMS. -# -# 12/27/93 (seiwald) - purturb library sources with SOURCE_GRIST -# 04/18/94 (seiwald) - use '?=' when setting OS specific vars -# 04/21/94 (seiwald) - do RmTemps together -# 05/05/94 (seiwald) - all supported C compilers support -o: relegate -# RELOCATE as an option; set Ranlib to "" to disable it -# 06/01/94 (seiwald) - new 'actions existing' to do existing sources -# 08/25/94 (seiwald) - new ObjectCcFlags rule to append to per-target CCFLAGS -# 08/29/94 (seiwald) - new ObjectHdrs rule to append to per-target HDRS -# 09/19/94 (seiwald) - LinkLibraries and Undefs now append -# - Rule names downshifted. -# 10/06/94 (seiwald) - Dumb yyacc stuff moved into Jamfile. -# 10/14/94 (seiwald) - (Crude) support for .s, .C, .cc, .cpp, and .f files. -# 01/08/95 (seiwald) - Shell now handled with awk, not sed -# 01/09/95 (seiwald) - Install* now take dest directory as target -# 01/10/95 (seiwald) - All entries sorted. -# 01/10/95 (seiwald) - NT support moved in, with LauraW's help. -# 01/10/95 (seiwald) - VMS support moved in. -# 02/06/95 (seiwald) - ObjectC++Flags and SubDirC++Flags added. -# 02/07/95 (seiwald) - Iron out when HDRSEARCH uses "" or SEARCH_SOURCE. -# 02/08/95 (seiwald) - SubDir works on VMS. -# 02/14/95 (seiwald) - MkDir and entourage. -# 04/30/95 (seiwald) - Use install -c flag so that it copies, not moves. -# 07/10/95 (taylor) - Support for Microsoft C++. -# 11/21/96 (peterk) - Support for BeOS -# 07/19/99 (sickel) - Support for Mac OS X Server (and maybe client) -# 02/18/00 (belmonte)- Support for Cygwin. - -# Special targets defined in this file: -# -# all - parent of first, shell, files, lib, exe -# first - first dependent of 'all', for potential initialization -# shell - parent of all Shell targets -# files - parent of all File targets -# lib - parent of all Library targets -# exe - parent of all Main targets -# dirs - parent of all MkDir targets -# clean - removes all Shell, File, Library, and Main targets -# uninstall - removes all Install targets -# - -# Rules defined by this file: -# -# as obj.o : source.s ; .s -> .o -# Bulk dir : files ; populate directory with many files -# Cc obj.o : source.c ; .c -> .o -# C++ obj.o : source.cc ; .cc -> .o -# Clean clean : sources ; remove sources with 'jam clean' -# File dest : source ; copy file -# Fortran obj.o : source.f ; .f -> .o -# GenFile source.c : program args ; make custom file -# Hardlink target : source ; make link from source to target -# HdrRule source : headers ; handle #includes -# InstallInto dir : sources ; install any files -# InstallBin dir : sources ; install binaries -# InstallLib dir : sources ; install files -# InstallFile dir : sources ; install files -# InstallMan dir : sources ; install man pages -# InstallShell dir : sources ; install shell scripts -# Lex source.c : source.l ; .l -> .c -# Library lib : source ; archive library from compiled sources -# LibraryFromObjects lib : objects ; archive library from objects -# LinkLibraries images : libraries ; bag libraries onto Mains -# Main image : source ; link executable from compiled sources -# MainFromObjects image : objects ; link executable from objects -# MkDir dir ; make a directory, if not there -# Object object : source ; compile object from source -# ObjectCcFlags source : flags ; add compiler flags for object -# ObjectC++Flags source : flags ; add compiler flags for object -# ObjectHdrs source : dirs ; add include directories for object -# Objects sources ; compile sources -# RmTemps target : sources ; remove temp sources after target made -# Setuid images ; mark executables Setuid -# SubDir TOP d1 d2 ... ; start a subdirectory Jamfile -# SubDirCcFlags flags ; add compiler flags until next SubDir -# SubDirC++Flags flags ; add compiler flags until next SubDir -# SubDirHdrs dirs ; add include dirs until next SubDir -# SubInclude TOP d1 d2 ... ; include a subdirectory Jamfile -# Shell exe : source ; make a shell executable -# Undefines images : symbols ; save undef's for linking -# UserObject object : source ; handle unknown suffixes for Object -# Yacc source.c : source.y ; .y -> .c -# -# Utility rules that have no side effects (not supported): -# -# FAppendSuffix f1 f2 ... : $(SUF) ; return $(<) with suffixes -# join value ... ; return contatenated values -# FDirName d1 d2 ... ; return path from root to dir -# FGrist d1 d2 ... ; return d1!d2!... -# FGristFiles value ; return $(value:G=$(SOURCE_GRIST)) -# FGristSourceFiles value ; return $(value:G=$(SOURCE_GRIST)) -# FRelPath d1 : d2 ; return rel path from d1 to d2 -# FSubDir d1 d2 ... ; return path to root -# - - -# Brief review of the jam language: -# -# Statements: -# rule RULE - statements to process a rule -# actions RULE - system commands to carry out target update -# -# Modifiers on actions: -# together - multiple instances of same rule on target get executed -# once with their sources ($(>)) concatenated -# updated - refers to updated sources ($(>)) only -# ignore - ignore return status of command -# quietly - don't trace its execution unless verbose -# piecemeal - iterate command each time with a small subset of $(>) -# existing - refers to currently existing sources ($(>)) only -# bind vars - subject to binding before expanding in actions -# -# Special rules: -# ALWAYS - always build a target -# DEPENDS - builds the dependency graph -# ECHO - blurt out targets on stdout -# EXIT - blurt out targets and exit -# INCLUDES - marks sources as headers for target (a codependency) -# NOCARE - don't panic if the target can't be built -# NOUPDATE - create the target if needed but never update it -# NOTFILE - ignore the timestamp of the target (it's not a file) -# TEMPORARY - target need not be present if sources haven't changed -# -# Special variables set by jam: -# $(<) - targets of a rule (to the left of the :) -# $(>) - sources of a rule (to the right of the :) -# $(xxx) - true on xxx (UNIX, VMS, NT, OS2, MAC) -# $(OS) - name of OS - varies wildly -# $(JAMVERSION) - version number (2.3) -# -# Special variables used by jam: -# SEARCH - where to find something (used during binding and actions) -# LOCATE - where to plop something not found with SEARCH -# HDRRULE - rule to call to handle include files -# HDRSCAN - egrep regex to extract include files -# -# Special targets: -# all - default if none given on command line -# - -# Initialize variables -# - -# -# OS specific variable settings -# - -# dwa 6/4/01 - removed all settings of the following variables for boost: -# CC, CCFLAGS, C++, C++FLAGS, LINK, LINKFLAGS, LINKLIBS -# probably a lot more could be cleared away - -if $(NT) -{ - CP ?= copy ; - RM ?= del /f/q ; - SLASH ?= \\ ; - SPLITPATH ?= ";" ; # dwa -- added missing SPLITPATH - SUFLIB ?= .lib ; - SUFOBJ ?= .obj ; - SUFEXE ?= .exe ; - SUFDLL ?= .dll .lib ; - gLINK_VARIABLE(.dll) = ; # dlls are NOT linked to directly - gLINK_VARIABLE(.lib) = NEEDLIBS ; # instead, users link to import libs - PREDLL ?= "" ; - NOARSCAN ?= true ; - SHELL_EXPORT ?= ; - SHELL_SET ?= "set " ; - - # dwa 6/4/01 - removed compiler determination for boost - # added some yacc/lex stuff, assuming cygwin for now. - LEX ?= flex ; - YACC ?= bison -y ; - YACCFILES ?= y.tab ; - YACC_OUTPUT ?= --output= ; - LEX_OUTPUT ?= -o ; - - LN ?= $(CP) ; - NULL_OUT ?= >NUL: ; -} -else if $(OS2) -{ - WATCOM ?= $(watcom) ; - - if ! $(WATCOM) - { - EXIT On OS2, set WATCOM to the root of the Watcom directory. ; - } - - AR ?= wlib ; - BINDIR ?= \\os2\\apps ; - CP ?= copy ; - DOT ?= . ; - DOTDOT ?= .. ; - MV ?= move ; - NOARSCAN ?= true ; - OPTIM ?= ; - RM ?= del /f ; - SLASH ?= \\ ; - SPLITPATH ?= ";" ; # dwa -- added missing SPLITPATH - STDHDRS ?= $(WATCOM)\\h ; - SUFEXE ?= .exe ; - SUFLIB ?= .lib ; - SUFOBJ ?= .obj ; - UNDEFFLAG ?= "/u _" ; - -} -else if $(VMS) -{ - CHMOD ?= set file/prot= ; - CP ?= copy/replace ; - CRELIB ?= true ; - DOT ?= [] ; - DOTDOT ?= [-] ; - EXEMODE ?= (w:e) ; - FILEMODE ?= (w:r) ; - HDRS ?= ; - MKDIR ?= create/dir ; - MV ?= rename ; - OPTIM ?= "" ; - RM ?= delete ; - RUNVMS ?= mcr ; - SHELLMODE ?= (w:er) ; - SLASH ?= . ; - STDHDRS ?= decc$library_include ; - SUFEXE ?= .exe ; - SUFLIB ?= .olb ; - SUFOBJ ?= .obj ; - - switch $(OS) - { - case VMS : LINKLIBS ?= sys$library:vaxcrtl.olb/lib ; - } -} -else if $(MAC) -{ - local OPT ; - - CW ?= "{CW}" ; - - MACHDRS ?= - "$(UMACHDRS):Universal:Interfaces:CIncludes" - "$(CW):MSL:MSL_C:MSL_Common:Include" - "$(CW):MSL:MSL_C:MSL_MacOS:Include" ; - - MACLIBS ?= - "$(CW):MacOS Support:Universal:Libraries:StubLibraries:Interfacelib" - "$(CW):MacOS Support:Universal:Libraries:StubLibraries:Mathlib" ; - - MPWLIBS ?= - "$(CW):MacOS Support:Libraries:Runtime:Runtime PPC:MSL MPWCRuntime.lib" - "$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL C.PPC MPW.Lib" ; - - MPWNLLIBS ?= - "$(CW):MacOS Support:Libraries:Runtime:Runtime PPC:MSL MPWCRuntime.lib" - "$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL C.PPC MPW(NL).Lib" ; - - SIOUXHDRS ?= ; - - SIOUXLIBS ?= - "$(CW):MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.lib" - "$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL SIOUX.PPC.Lib" - "$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL C.PPC.Lib" ; - - CP ?= duplicate -y ; - DOT ?= ":" ; - DOTDOT ?= "::" ; - HDRS ?= $(MACHDRS) $(MPWHDRS) ; - MKDIR ?= newfolder ; - MV ?= rename -y ; - NOARSCAN ?= true ; - OPTIM ?= ; - RM ?= delete -y ; - SLASH ?= ":" ; - STDHDRS ?= ; - SUFLIB ?= .lib ; - SUFOBJ ?= .o ; -} -else if $(OS) = BEOS && $(METROWERKS) -{ - AR ?= mwld -xml -o ; - BINDIR ?= /boot/apps ; - FORTRAN ?= "" ; - LIBDIR ?= /boot/develop/libraries ; - MANDIR ?= /boot/documentation/"Shell Tools"/HTML ; - NOARSCAN ?= true ; - STDHDRS ?= /boot/develop/headers/posix ; -} -else if $(OS) = BEOS -{ - BINDIR ?= /boot/apps ; - FORTRAN ?= "" ; - LIBDIR ?= /boot/develop/libraries ; - NOARSCAN ?= true ; - STDHDRS ?= /boot/develop/headers/posix ; -} -else if $(UNIX) -{ - switch $(OS) - { - case AIX : - IMPLIB_FLAGS ?= -bI: ; - SUFDLL ?= .so ; - gLINK_VARIABLE(.so) = NEEDLIBS ; # shared libs should be added to the list of libs needed - gLINK_VARIABLE(.imp) = NEEDIMPS ; # import libs are handled separately. - gSHELL_LIBPATH = LIBPATH ; - - case AMIGA : - YACC ?= bison -y ; - - case CYGWIN : - LEX ?= flex ; - RANLIB ?= "" ; - SUFEXE ?= .exe ; - YACC ?= bison -y ; - MKDIR ?= mkdir -p ; - SUFDLL ?= .dll ; - - case DGUX : - RANLIB ?= "" ; - RELOCATE ?= true ; - - case HPUX : - RANLIB ?= "" ; - - case INTERIX : - RANLIB ?= "" ; - - case IRIX : - RANLIB ?= "" ; - - case KFREEBSD : - CLONE ?= cp -fpd ; - - case LINUX : - CLONE ?= cp -fpd ; - - case MPEIX : - HDRS += /usr/include ; - RANLIB ?= "" ; - NOARSCAN ?= true ; - NOARUPDATE ?= true ; - - case MVS : - RANLIB ?= "" ; - - case NEXT : - AR ?= libtool -o ; - RANLIB ?= "" ; - - case MACOSX : - MANDIR ?= /usr/local/share/man ; - SUFDLL ?= .dylib ; - gSHELL_LIBPATH ?= DYLD_LIBRARY_PATH ; - NOARSCAN ?= true ; - - case NCR : - RANLIB ?= "" ; - - case PTX : - RANLIB ?= "" ; - - case QNX : - AR ?= wlib ; - NOARSCAN ?= true ; - RANLIB ?= "" ; - - case SCO : - RANLIB ?= "" ; - RELOCATE ?= true ; - - case SINIX : - RANLIB ?= "" ; - - case SOLARIS : - RANLIB ?= "" ; - AR ?= "/usr/ccs/bin/ar ru" ; - STDHDRS ?= "." ; - - case UNICOS : - NOARSCAN ?= true ; - OPTIM ?= -O0 ; - - case UNIXWARE : - RANLIB ?= "" ; - RELOCATE ?= true ; - - case OSF : - gLINK_VARIABLE(.so) = NEEDLIBS ; # shared objects should be added to the list of libs needed - } - - # UNIX defaults - CHMOD ?= chmod ; - LEX ?= lex ; - OPTIM ?= -O ; - RANLIB ?= ranlib ; - YACC ?= yacc ; - YACCFILES ?= y.tab ; - YACCFLAGS ?= -d ; - SHELL_EXPORT ?= "export " ; - SHELL_SET ?= "" ; - gSHELL_LIBPATH ?= LD_LIBRARY_PATH ; - BINDIR ?= /usr/local/bin ; - LIBDIR ?= /usr/local/lib ; - MANDIR ?= /usr/local/man ; - STDHDRS ?= /usr/include ; -} - -# -# General defaults; a lot like UNIX -# - -AR ?= ar ru ; -AS ?= as ; -ASFLAGS ?= ; -AWK ?= awk ; -BINDIR ?= ; -CLONE ?= $(CP) ; -CLONE ?= cp -fp ; -CP ?= cp -f ; -CRELIB ?= ; -DOT ?= . ; -DOTDOT ?= .. ; -EXEMODE ?= 711 ; -DLLMODE ?= 755 ; -FILEMODE ?= 644 ; -FORTRAN ?= f77 ; -FORTRANFLAGS ?= ; -HDRS ?= ; -JAMFILE ?= Jamfile ; -JAMRULES ?= Jamrules ; -LEX ?= ; -LIBDIR ?= ; -LN ?= ln ; -MANDIR ?= ; -MKDIR ?= mkdir ; -MV ?= mv -f ; -OPTIM ?= ; -RCP ?= rcp ; -RM ?= rm -f ; -RSH ?= rsh ; -SED ?= sed ; -SHELLHEADER ?= "#!/bin/sh" ; -SHELLMODE ?= 755 ; -SHELL_EXPORT ?= ; -SHELL_SET ?= "" ; -SLASH ?= / ; -SPLITPATH ?= ":" ; # dwa -- added missing SPLITPATH -STDHDRS ?= ; -SUFEXE ?= "" ; -SUFDLL ?= .so ; -SUFLIB ?= .a ; -SUFOBJ ?= .o ; -PREDLL ?= lib ; -PRELIB ?= lib ; -UNDEFFLAG ?= "-u _" ; -YACC ?= ; -YACCFILES ?= ; -YACCFLAGS ?= ; -BIN_DIRECTORY ?= bin ; - -#~ HDRPATTERN = - #~ "^[ ]*#[ ]*include[ ]*([<\"][^\">]*[\">]).*$" ; -HDRPATTERN = - "^[ ]*#[ ]*include[ ]*([<\"][^\">]*[\">]).*$" ; - -#" My Jam mode gets its syntax highlighting confused without this comment - -OSFULL = $(OS)$(OSVER)$(OSPLAT) $(OS)$(OSPLAT) $(OS)$(OSVER) $(OS) ; - -# -# Rule to automate patching of singleton variables from the user so that -# they are correctly interpreted as a single entry instead of as a list if -# they happen to contain spaces. -# -# This also remembers the first(global) value so that it can be reset -# when cleared, but used again. -# -rule set-as-singleton ( variables + ) -{ - for local variable in $(variables) - { - $(variable) = $($(variable):J=" ") ; - #~ if ! $(gSINGLETON_SET($(variable))) - #~ { - #~ gSINGLETON($(variable)) = $($(variable)) ; - #~ gSINGLETON_SET($(variable)) = true ; - #~ } - #~ $(variable) ?= $(gSINGLETON($(variable))) ; - } -} - -# -# "Fix" the known possibly directory variables. -# -set-as-singleton - BINDIR - CW - JAMFILE - JAMRULES - JAMSHELL - LIBDIR - MANDIR - WATCOM - ; - -# -# Base dependencies - first for "bootstrap" kinds of rules -# - -# dwa 6/17/01 - added test -DEPENDS all : shell files lib dll exe obj ; -DEPENDS all shell files lib dll exe obj test : first ; -NOTFILE all first shell files lib dll exe obj dirs clean uninstall test nothing ; -ALWAYS clean uninstall ; - -# -# Prevent external variables from interfeering with some esnetial intenal -# variables. -# -TOP = ; - -# -# Rules -# - -# dwa 6/4/01 - added for boost -# type-DEPENDS type : targets... -# -# Use this to create a dependency between a fake type-target and other targets. Will prevent -# targets in dependee subprojects from being added to the type-target's dependencies. -rule type-DEPENDS # type-target : targets... -{ - if ! $(gSUPPRESS_FAKE_TARGETS) && ! $(gIN_LIB_INCLUDE) - { - DEPENDS $(<) : $(>) ; - } -} - -# dwa 6/4/01 - added for boost -# Archive file-target : sources -# -# Used to dispatch through Archive-action, which should be redefined in toolset -# description files. -rule Archive -{ - Archive-action $(<) : $(>) ; -} - -rule As -{ - DEPENDS $(<) : $(>) ; - ASFLAGS on $(<) += $(ASFLAGS) $(SUBDIRASFLAGS) ; -} - -rule Bulk -{ - local i ; - - for i in $(>) - { - File $(i:D=$(<)) : $(i) ; - } -} - -# dwa 6/4/01 - modified for boost -# factored out stuff from the builtin Cc and C++ rules -rule Cc-platform-specifics -{ - # If the compiler's -o flag doesn't work, relocate the .o - - if $(RELOCATE) - { - CcMv $(<) : $(>) ; - } - - local _h = $(SEARCH_SOURCE) $(HDRS) ; - - if $(VMS) && $(_h) - { - SLASHINC on $(<) = "/inc=(" $(_h[1]) ,$(_h[2-]) ")" ; - } - else if $(MAC) && $(_h) - { - local _i _j ; - _j = $(_h[1]) ; - for _i in $(_h[2-]) - { - _j = $(_j),$(_i) ; - } - MACINC on $(<) = \"$(_j)\" ; - } -} - -# dwa 6/4/01 - added for boost -# always-c++ filename... -# -# declares that the given files should be compiled as C++, regardless of their -# filename extension. -rule always-c++ -{ - gALWAYS_C++ += [ FGristFiles $(<) ] ; -} - -# dwa 6/4/01 - modified for boost -rule Cc -{ - DEPENDS $(<) : $(>) ; - - Cc-platform-specifics $(<) : $(>) ; - - if $(>) in $(gALWAYS_C++) - { - C++-action $(<) : $(>) ; - } - else - { - Cc-action $(<) : $(>) ; - } -} - -# dwa 6/4/01 - modified for boost -rule C++ -{ - DEPENDS $(<) : $(>) ; - - Cc-platform-specifics $(<) : $(>) ; - - C++-action $(<) : $(>) ; -} - -rule Chmod -{ - if $(CHMOD) { Chmod1 $(<) ; } -} - -# dwa 6/4/01 - added for boost -# conditional : : -# returns if , otherwise -rule conditional -{ - if $(1) { return $(2) ; } else { return $(3) ; } -} - -# dwa 6/4/01 - modified for boost -rule File -{ - type-DEPENDS files : $(<) ; - DEPENDS $(<) : $(>) ; - SEARCH on $(>) = $(SEARCH_SOURCE) ; - MODE on $(<) = $(FILEMODE) ; - Chmod $(<) ; -} - -rule FileClone -{ - type-DEPENDS files : $(<) ; - DEPENDS $(<) : $(>) ; - SEARCH on $(>) = $(SEARCH_SOURCE) ; -} - -rule Fortran -{ - DEPENDS $(<) : $(>) ; -} - -rule GenFile -{ - local _t = [ FGristSourceFiles $(<) ] ; - local _s = [ FAppendSuffix $(>[1]) : $(SUFEXE) ] ; - Depends $(_t) : $(_s) $(>[2-]) ; - GenFile1 $(_t) : $(_s) $(>[2-]) ; - Clean clean : $(_t) ; -} - -rule GenFile1 -{ - MakeLocate $(<) : $(LOCATE_SOURCE) ; - SEARCH on $(>) = $(SEARCH_SOURCE) ; -} - -# dwa 6/4/01 - modified for boost -rule HardLink -{ - type-DEPENDS files : $(<) ; - DEPENDS $(<) : $(>) ; - SEARCH on $(>) = $(SEARCH_SOURCE) ; -} - -rule HdrRule -{ - # HdrRule source : headers ; - - # N.B. This rule is called during binding, potentially after - # the fate of many targets has been determined, and must be - # used with caution: don't add dependencies to unrelated - # targets, and don't set variables on $(<). - - # Tell Jam that anything depending on $(<) also depends on $(>), - # set SEARCH so Jam can find the headers, but then say we don't - # care if we can't actually find the headers (they may have been - # within ifdefs), - - local angle-includes = [ MATCH "[<]([^>]+)[>]" : $(>) ] ; - local quoted-includes = [ MATCH "[\"]([^\"]+)[\"]" : $(>) ] ; - - local s ; - - if $(HDRGRIST) - { - angle-includes = $(angle-includes:G=$(HDRGRIST)) ; - quoted-includes = $(quoted-includes:G=$(HDRGRIST)) ; - } - - local s = $(angle-includes) $(quoted-includes) ; - - INCLUDES $(<) : $(s) ; - NOCARE $(s) ; - - SEARCH on $(angle-includes) = $(HDRSEARCH) ; - SEARCH on $(quoted-includes) = $(gBINDING($(<)):D) $(HDRSEARCH) ; - - BINDRULE on $(s) = remember-binding ; - - # Propagate on $(<) to $(>) - - HDRSEARCH on $(s) = $(HDRSEARCH) ; - HDRSCAN on $(s) = $(HDRSCAN) ; - HDRRULE on $(s) = $(HDRRULE) ; - HDRGRIST on $(s) = $(HDRGRIST) ; -} -rule HdrSearchAndLocate ( header : search * ) -{ - if ! $(gBINDING($(header))) - { - local header-glob = [ GLOB "$(search:G=)" : $(header:G=) ] ; - local header-locate = ; - for local bound-path in $(header-glob) - { - if ! $(header-locate) - { - if ! [ GLOB "$(bound-path)" : * ] - { - header-locate = $(bound-path) ; - } - } - } - if $(header-locate) - { - LOCATE on $(header) = $(header-locate:D) ; - gBINDING($(header)) = $(header-locate) ; - } - else - { - LOCATE on $(header) = $(DOT) ; - gBINDING($(header)) = $(header:G=:R=$(DOT)) ; - } - } -} - -# dwa 6/4/01 - modified for boost -rule InstallInto -{ - local i t ; - - t = $(>:G=installed) ; - - type-DEPENDS install : $(t) ; - DEPENDS $(t) : $(>) ; - SEARCH on $(>) = $(SEARCH_SOURCE) ; - MakeLocate $(t) : $(<) ; - - # Arrange for jam uninstall - - Clean uninstall : $(t) ; - - for i in $(>) - { - Install $(i:G=installed) : $(i) ; - } - - Chmod $(t) ; - - if $(UNIX) - { - if $(OWNER) { Chown $(t) ; OWNER on $(t) = $(OWNER) ; } - if $(GROUP) { Chgrp $(t) ; GROUP on $(t) = $(GROUP) ; } - } -} - -rule InstallBin -{ - local _t = [ FAppendSuffix $(>) : $(SUFEXE) ] ; - - InstallInto $(<) : $(_t) ; - MODE on $(_t:G=installed) = $(EXEMODE) ; -} - -rule InstallFile -{ - InstallInto $(<) : $(>) ; - MODE on $(>:G=installed) = $(FILEMODE) ; -} - -rule InstallLib -{ - InstallInto $(<) : $(>) ; - MODE on $(>:G=installed) = $(FILEMODE) ; -} - -rule InstallMan -{ - # Really this just strips the . from the suffix - - local i s d ; - - for i in $(>) - { - switch $(i:S) - { - case .1 : s = 1 ; case .2 : s = 2 ; case .3 : s = 3 ; - case .4 : s = 4 ; case .5 : s = 5 ; case .6 : s = 6 ; - case .7 : s = 7 ; case .8 : s = 8 ; case .l : s = l ; - case .n : s = n ; case .man : s = 1 ; - } - - d = man$(s) ; - - InstallInto $(d:R=$(<)) : $(i) ; - } - - MODE on $(>:G=installed) = $(FILEMODE) ; -} - -rule InstallShell -{ - InstallInto $(<) : $(>) ; - MODE on $(>:G=installed) = $(SHELLMODE) ; -} - -# dwa 6/4/01 - modified for boost -rule Lex # file.c : file.l -{ - # If we don't have a way of specifying the lex output file, we'll have to move it - # We'd rather not do this if possible because: a. lex generates #line - # directives for the output file which would refer to the wrong place and - # b. the Jam invocation directory could be read-only - if ! $(LEX_OUTPUT) - { - LexMv $(<) : $(>) ; - } - - DEPENDS $(<) : $(>) ; - MakeLocate $(<) : $(LOCATE_SOURCE) ; - SEARCH on $(<) = $(LOCATE_SOURCE) ; - Clean clean : $(<) ; -} - -# dwa 6/4/01 - modified for boost -rule Library -{ - LibraryFromObjects $(<) : [ Objects $(>) ] ; -} - -# dwa 6/4/01 - modified for boost -rule LibraryFromObjects -{ - local _i _l ; - - _l = $(<:S=$(SUFLIB)) ; - - # library depends on its member objects - - if $(KEEPOBJS) - { - type-DEPENDS obj : $(>) ; - } - else - { - type-DEPENDS lib : $(_l) ; - } - - # Set LOCATE for the library and its contents. The bound - # value shows up as $(NEEDLIBS) on the Link actions. - # For compatibility, we only do this if the library doesn't - # already have a path. - - if ! $(_l:D) - { - MakeLocate $(_l) $(_l)($(>:BS)) : $(LOCATE_TARGET) ; - } - - if $(NOARSCAN) - { - # If we can't scan the library to timestamp its contents, - # we have to just make the library depend directly on the - # on-disk object files. - - DEPENDS $(_l) : $(>) ; - } - else - { - # If we can scan the library, we make the library depend - # on its members and each member depend on the on-disk - # object file. - - DEPENDS $(_l) : $(_l)($(>:BS)) ; - - for _i in $(>) - { - DEPENDS $(_l)($(_i:BS)) : $(_i) ; - } - } - - Clean clean : $(_l) ; - - if $(CRELIB) { CreLib $(_l) : $(>[1]) ; } - - Archive $(_l) : $(>) ; - - if $(RANLIB) { Ranlib $(_l) ; } - - # If we can't scan the library, we have to leave the .o's around. - - if ! ( $(NOARSCAN) || $(KEEPOBJS) ) { RmTemps $(_l) : $(>) ; } -} - -# dwa 6/4/01 - modified for boost to dispatch through Link-action and to pass -# the target-type through. *** NOW UNUSED BY BOOST *** -# -# Link executable-target : object-target... -rule Link -{ - MODE on $(<) = $(EXEMODE) ; - Link-action $(<) : $(>) : $(3) ; - Chmod $(<) ; -} - -rule LinkLibraries -{ - # make library dependencies of target - # set NEEDLIBS variable used by 'actions Main' - - local _t = [ FAppendSuffix $(<) : $(SUFEXE) ] ; - - DEPENDS $(_t) : $(>:S=$(SUFLIB)) ; - NEEDLIBS on $(_t) += $(>:S=$(SUFLIB)) ; -} - -# dwa 6/4/01 - modified for boost -rule Main -{ - MainFromObjects $(<) : [ Objects $(>) ] ; -} - -# dwa 6/4/01 - modified for boost -rule MainFromObjects -{ - local _s _t ; - - # Add grist to file names - # Add suffix to exe - - _s = $(>) ; - _t = [ FAppendSuffix $(<) : $(SUFEXE) ] ; - - if $(_t) != $(<) - { - DEPENDS $(<) : $(_t) ; - NOTFILE $(<) ; - } - - # make compiled sources a dependency of target - - type-DEPENDS exe : $(_t) ; - DEPENDS $(_t) : $(_s) ; - MakeLocate $(_t) : $(LOCATE_TARGET) ; - - Clean clean : $(_t) ; - - Link $(_t) : $(_s) ; -} - -# dwa 6/4/01 - modified for boost -rule MakeLocate -{ - if $(>) - { - LOCATE on $(<) = $(>) ; - - # provide a way to get back the location from a built target name. - gLOCATE($(<)) = $(>) ; - - # We add directory-grist here so that implicitly-created directory - # target names don't collide with user-specified targets. - Depends $(<) : [ MkDir $(>[1]:G=directory-grist) ] ; - } -} - -# now returns the created directory target -- dwa -rule MkDir -{ - # If dir exists, don't update it - # Do this even for $(DOT). - - local dir = $(<) ; - if $(NT) - { - # make sure slashes all go the right way - dir = [ split-path $(dir) ] ; - dir = $(dir:J=$(SLASH)) ; - } - - local result = $(dir) ; - - while $(dir) && ( $(dir) != $(DOT) ) && ! $($(dir)-mkdir) - { - # Cheesy gate to prevent multiple invocations on same dir - # MkDir1 has the actions - # Arrange for jam dirs - - $(dir)-mkdir = true ; - MkDir1 $(dir) ; - Depends dirs : $(dir) ; - NOUPDATE $(dir) ; - - - # Recursively make parent directories. - # $(dir:P) = $(dir)'s parent, & we recurse until root - - local s = $(dir:P) ; - - if $(NT) - { - switch $(s) - { - case *: : s = ; - case *:\\ : s = ; - } - } - - if $(s) && $(s) != $(dir) - { - Depends $(dir) : $(s) ; - dir = $(s) ; - } - else - { - dir = ; # stop iterating - if $(s) { NOTFILE $(s) ; } - } - } - return $(result) ; -} - -# dwa 6/4/01 - modified for boost -rule Object -{ - local h ; - - type-DEPENDS obj : $(<) ; - set-target-variables $(<) ; - - # Make it possible to compile a given source file by giving its - # object file name as a target. - type-DEPENDS $(<:G=) : $(<) ; - - # locate object and search for source, if wanted - - Clean clean : $(<) ; - - MakeLocate $(<) : $(LOCATE_TARGET) ; - SEARCH on $(>) = $(SEARCH_SOURCE) ; - - # Save HDRS for -I$(HDRS) on compile. - # We shouldn't need -I$(SEARCH_SOURCE) as cc can find headers - # in the .c file's directory, but generated .c files (from - # yacc, lex, etc) are located in $(LOCATE_TARGET), possibly - # different from $(SEARCH_SOURCE). - - # Use unique to clean up confusing duplicates a bit - HDRS on $(<) = [ unique $(LOCATE_SOURCE) $(HDRS) ] ; - - # Set STDHDRS on the object so that multi-compiler builds will search for - # headers in the right places. - STDHDRS on $(<) = $(STDHDRS) ; - SYSHDRS on $(<) = $(SYSHDRS) ; - - # handle #includes for source: Jam scans for headers with - # the regexp pattern $(HDRSCAN) and then invokes $(HDRRULE) - # with the scanned file as the target and the found headers - # as the sources. HDRSEARCH is the value of SEARCH used for - # the found header files. Finally, if jam must deal with - # header files of the same name in different directories, - # they can be distinguished with HDRGRIST. - - # $(h) is where cc first looks for #include "foo.h" files. - # If the source file is in a distant directory, look there. - # Else, look in "" (the current directory). - - if $(SEARCH_SOURCE) - { - h = $(SEARCH_SOURCE)$(SLASH)$(>:D) ; - } - else - { - h = $(>:D) ; - } - - HDRRULE on $(>) = HdrRule ; - HDRSCAN on $(>) = $(HDRPATTERN) ; - HDRSEARCH on $(>) = $(HDRS) $(h) $(STDHDRS) $(SYSHDRS) ; - HDRGRIST on $(>) = $(HDRGRIST) ; - - # if source is not .c, generate .c with specific rule - - # make sure we don't generate the same object twice. - if ! $(gGENERATED_TARGET($(<))) - { - switch $(>:S) - { - case .asm : As $(<) : $(>) ; - case .c : Cc $(<) : $(>) ; - case .C : C++ $(<) : $(>) ; - case .cc : C++ $(<) : $(>) ; - case .cpp : C++ $(<) : $(>) ; - case .cxx : C++ $(<) : $(>) ; - case .f : Fortran $(<) : $(>) ; - case .s : As $(<) : $(>) ; - case * : UserObject $(<) : $(>) ; - } - gGENERATED_TARGET($(<)) = true ; - } -} - -# dwa 6/4/01 - added for boost -# Return the corresponding object file target names given a list of source file -# target names. -rule object-name # sources... -{ - return $(<:D=:S=$(SUFOBJ):G=$(TARGET_GRIST)) ; -} - -# dwa 6/4/01 - added for boost -# Build a generated source file from input-target, and build whatever that file generates. -# Return a list of all object target names ultimately generated by recursively -# building the products of input-target. -rule gen-source # source => object-file-names -{ - local suffix = .c ; - if $(<:S) in .lpp .ypp - { - suffix = .cpp ; - } - - local immediate-target = $(<:D=:S=$(suffix):G=$(SOURCE_GRIST)) ; - # make sure we don't regenerate sources twice. - if ! $(gGENERATED_TARGET($(immediate-target))) - { - switch $(<:S) - { - case .l* : Lex $(immediate-target) : $(<) ; SEARCH on $(<) = $(SEARCH_SOURCE) ; - case .y* : Yacc $(immediate-target) : $(<) ; SEARCH on $(<) = $(SEARCH_SOURCE) ; - } - gGENERATED_TARGET($(immediate-target)) = true ; - } - return [ Objects $(immediate-target) ] ; -} - -# dwa 6/4/01 - added for boost -# A list of all file extensions which generate source files when built. -SOURCE_GENERATING_EXTENSIONS ?= .lpp .ypp .l .y ; - -# dwa 6/4/01 - modified for boost -# Build all object files generated by building $(<), and return a list of the -# names of those object file targets. -rule Objects -{ - local _i _n _r ; - - - for _i in $(<) - { - if $(_i:S) in $(SOURCE_GENERATING_EXTENSIONS) - { - _n = [ gen-source $(_i) ] ; - } - else - { - _n = [ object-name $(_i) ] ; - Object $(_n) : $(_i) ; - } - _r += $(_n) ; - } - - return $(_r) ; -} - -rule RmTemps -{ - TEMPORARY $(>) ; -} - -rule Setuid -{ - MODE on [ FAppendSuffix $(<) : $(SUFEXE) ] = 4711 ; -} - -# dwa 6/4/01 - modified for boost -rule Shell -{ - type-DEPENDS shell : $(<) ; - DEPENDS $(<) : $(>) ; - SEARCH on $(>) = $(SEARCH_SOURCE) ; - MODE on $(<) = $(SHELLMODE) ; - Clean clean : $(<) ; - Chmod $(<) ; -} - -# dwa 6/7/01 - added for boost -# subproject path -# -# Invokes SubDir with a path description -rule subproject -{ - SubDir TOP [ split-path $(<) ] ; -} - -# dwa 6/18/01 - added for boost -# project-root -# -# Declares this directory to be the project root. -rule project-root ( ) -{ - local project-location ; - if $(gTOP) - { - project-location = [ root-paths $($(gTOP)) : [ PWD ] ] ; - } - else - { - project-location = [ PWD ] ; - } - local name ; - name = $(PROJECT($(project-location))) ; - name ?= $(project-location:B) ; - PROJECT = $(name) ; - gPROJECT($(name)) = $(project-location) ; - SubDir TOP ; -} - -# grafik. -# -# Declare either your own project, or an external project. -# -rule project ( name : location ? ) -{ - if ! $(location) - { - gPROJECT($(name)) = $(gPROJECT($(PROJECT))) ; - PROJECT($(gPROJECT($(name)))) = $(name) ; - PROJECT = $(name) ; - } - else - { - gPROJECT($(name)) = [ root-paths $(location) : [ root-paths $($(gTOP)) : [ PWD ] ] ] ; - # - # Root the path globals to fix a bug which prevented to use them from an external - # project. The fix is as as uninvasive as possible, as it will only trigger when - # an external project is declared. So it will not interfere with the build of the - # boost library. I took this route, as at the time of this fix, the bbv1 is expected - # to be retired soon. - # N.B.: The path-globals rule is expected to be invoked from Jamrules files only. - local val ; - for val in $(gPATH_GLOBALS) { - gPATH_GLOBAL_VALUE($(val)) = [ root-paths $(gPATH_GLOBAL_VALUE($(val))) : - [ root-paths $($(gTOP)) : [ PWD ] ] - ] ; - } - # - local [ protect-subproject ] ; - enter-subproject @$(name) ; - } -} - -# grafik. -# -# Returns the set of vars to localize to prevent changes from -# affecting the current project. Also remembers the current values -# to use by enter-subproject to set the defaults for the new vars. -# -rule protect-subproject ( ) -{ - .TOP = $(TOP) ; - .TOP_TOKENS = $(TOP_TOKENS) ; - .gTOP = $(gTOP) ; - .PROJECT = $(PROJECT) ; - return TOP TOP_TOKENS gTOP PROJECT [ protect-subdir ] ; -} - -# grafik. -# -# Sets up the environment as if the context is another project in -# preparation to include the external projects targets. This also -# works for refering to the current project. -# -rule enter-subproject ( project-path ) -{ - TOP = $(.TOP) ; - TOP_TOKENS = $(.TOP_TOKENS) ; - gTOP = $(.gTOP) ; - PROJECT = $(.PROJECT) ; - - local project-name = [ MATCH "^@([^/\\]+)" : $(project-path) ] ; - project-name ?= $(PROJECT) ; - project-name ?= "" ; - local project-subdir = [ MATCH "^@[^/\\]+[/\\](.*)" : $(project-path) ] ; - local project-top ; - - if $(project-name) - { - project-top = [ split-path $(gPROJECT($(project-name))) ] ; - if $(project-subdir) - { - project-top += - [ split-path [ relative-path $(project-subdir) ] ] - [ split-path [ FSubDir [ split-path [ relative-path $(project-subdir) ] ] ] ] ; - } - TOP = [ join-path $(project-top) ] ; - TOP_TOKENS = $(project-top) ; - gTOP = TOP ; - PROJECT = $(project-name) ; - } - project-subdir ?= . ; - - subproject $(project-subdir) ; - - return $(project-name) $(project-subdir) ; -} - -# dwa 6/7/01 - added for boost -# subinclude path... -# -# Invokes SubInclude for each path -rule subinclude -{ - local d ; - for d in $(<) - { - SubInclude TOP [ split-path $(d) ] ; - } -} - -# dwa 10/6/01 - added for boost -# -# path-global variable-name : path... ; -# -# if $(variable-name) is unset, sets variable-name to path... -# variable-name will be adjusted on a per-subproject basis to refer to the same path. -rule path-global -{ - $(<) ?= $(>) ; - gPATH_GLOBAL_VALUE($(<)) = $($(<)) ; - - if ! ( $(<) in $(gPATH_GLOBALS) ) - { - gPATH_GLOBALS += $(<) ; - } -} - -# dwa 6/4/01 - modified for boost -rule SubDir -{ - local _r ; - - # - # SubDir TOP d1 [ ... ] - # - # This introduces a Jamfile that is part of a project tree - # rooted at $(TOP). It (only once) includes the project-specific - # rules file $(TOP)/Jamrules and then sets search & locate stuff. - # - # If the variable $(TOPRULES) is set (where TOP is the first arg - # to SubDir), that file is included instead of $(TOP)/Jamrules. - # - # d1 ... are the directory elements that lead to this directory - # from $(TOP). We construct the system dependent path from these - # directory elements in order to set search&locate stuff. - # - - if ! $($(<[1])) - { - if ! $(<[1]) - { - EXIT SubDir syntax error ; - } - - $(<[1]) = [ FSubDir $(<[2-]) ] ; - $(<[1])_TOKENS = [ split-path $($(<[1])) ] ; - gTOP = $(<[1]) ; # not sure why someone would want to use anything - # other than TOP, but just in case... - } - - # Get path to current directory from root using SubDir. - # Save dir tokens for other potential uses. - local .SUBDIR_TOKENS = $(<[2-]) ; - - # This allows us to determine whether we're in the directory where jam was - # invoked from so that we can make locally named targets - gINVOCATION_SUBDIR_TOKENS ?= $(.SUBDIR_TOKENS) ; - gINVOCATION_SUBDIR_TOKENS ?= $(DOT) ; - - # - # If $(TOP)/Jamrules hasn't been included, do so. - # - - local top = [ root-paths $($(gTOP)) : [ PWD ] ] ; - if ! $(gINCLUDED($(JAMRULES:R=$(top)))) - { - # Gated entry. - - gINCLUDED($(JAMRULES:R=$(top))) = TRUE ; - - # Include it. - - project-root ; - include $(JAMRULES:R=$(top)) ; - } - - # Get path to current directory from root using SubDir. - # Save dir tokens for other potential uses. - SUBDIR_TOKENS = $(<[2-]) ; - - # SUBDIR is the path from the invocation directory to the subproject - # directory. - SUBDIR = [ tokens-to-simple-path $($(gTOP)_TOKENS) $(SUBDIR_TOKENS) ] ; - - SEARCH_SOURCE = $(SUBDIR) ; - - # This will strip off any leading dot on SUBDIR_TOKENS - local nodot_subdir = [ simplify-path-tokens $(SUBDIR_TOKENS) ] ; - - if $(ALL_LOCATE_TARGET) && ! $(first_ALL_LOCATE_TARGET) - { - normalized_ALL_LOCATE_TARGET = [ join-path $($(gTOP)) $(ALL_LOCATE_TARGET) ] ; - } - else - { - normalized_ALL_LOCATE_TARGET ?= [ join-path $($(gTOP)) $(ALL_LOCATE_TARGET) ] ; - } - first_ALL_LOCATE_TARGET ?= $(ALL_LOCATE_TARGET) ; - LOCATE_SOURCE = [ FDirName $(normalized_ALL_LOCATE_TARGET) $(BIN_DIRECTORY) $(PROJECT) $(nodot_subdir) ] ; - LOCATE_TARGET = $(LOCATE_SOURCE) ; - HCACHEFILE = [ FDirName $(normalized_ALL_LOCATE_TARGET) $(BIN_DIRECTORY) .jamdeps ] ; - - SOURCE_GRIST = [ FGrist @$(PROJECT) $(SUBDIR_TOKENS) ] ; - - # Reset per-directory ccflags, hdrs - - SUBDIRCCFLAGS = ; - SUBDIRC++FLAGS = ; - - # This variable holds the path from the directory of Jam's invocation to the - # directory of the current subproject. - RELATIVE_SUBDIR_TOKENS = [ simplify-path-tokens $($(gTOP)_TOKENS) $(SUBDIR_TOKENS) : $(DOT) ] ; - RELATIVE_SUBDIR = [ join-path $(RELATIVE_SUBDIR_TOKENS) ] ; - - adjust-path-globals ; -} - -rule in-invocation-subdir -{ - local subdir-tokens = $(SUBDIR_TOKENS) ; - subdir-tokens ?= $(DOT) ; - if $(subdir-tokens) = $(gINVOCATION_SUBDIR_TOKENS) - { - return true ; - } -} - -# These are the global variables that get set up by SubDir. If you need to -# invoke SubDir temporarily and then restore them, declare -# local $(gSUBDIR_GLOBALS) ; -gSUBDIR_GLOBALS = SUBDIR SUBDIR_TOKENS SEARCH_SOURCE LOCATE_SOURCE LOCATE_TARGET - SOURCE_GRIST RELATIVE_SUBDIR RELATIVE_SUBDIR_TOKENS ; - - -rule protect-subdir -{ - return $(gSUBDIR_GLOBALS) $(gPATH_GLOBALS) ; -} - -# prepends root to any unrooted elements of paths, and simplifies -rule root-paths ( paths * : root ) -{ - local path result ; - for path in $(paths) - { - local rooted = $(path:R=$(root)) ; - path = [ tokens-to-simple-path [ split-path $(rooted:G=) ] ] ; - path = $(path:G=$(rooted:G)) ; - result += $(path) ; - } - return $(result) ; -} - -# Adjust all path globals so that they are relative to the current subproject. -rule adjust-path-globals -{ - # compute path tokens from current subproject to root - local tokens-to-root = [ split-path [ FSubDir $(SUBDIR_TOKENS) ] ] ; - - # compute path tokens from current subproject to invocation - # directory. $(DOT) is added just in case we're building from the project - # root - local tokens-to-invocation - = $(tokens-to-root) $(gINVOCATION_SUBDIR_TOKENS) ; - - local variable ; - for variable in $(gPATH_GLOBALS) - { - local paths = $(gPATH_GLOBAL_VALUE($(variable))) ; - $(variable) = ; - local path ; - for path in $(paths) - { - # is path already rooted? - if $(path:R=x) = $(path) - { - $(variable) += $(path) ; - } - else - { - local tokens = $(tokens-to-invocation) [ split-path $(path) ] ; - $(variable) += [ tokens-to-simple-path $(tokens) ] ; - } - } - } -} - -# dwa 6/4/01 - added for boost -# strip-grist value -# -# strip all leading gristed elements from value and return the result. -rule strip-grist -{ - local x = $(<:G=) ; - if ! $(x:G) - { - return $(x) ; - } - else - { - return [ strip-grist $(x) ] ; - } -} - -# dwa 6/4/01 - added for boost -# Breaks $(<) into path components -# This could certainly be improved now that we have David Turner's regular expression features. -# -# split-path bar/baz/mumble => bar baz mumble -rule split-path -{ - local result = $(gSPLIT-PATH.$(<)) ; - - if ! $(result) - { - local parent = $(<:P) ; - if $(NT) - { - switch $(<:G=) - { - # It turns out that to match a backslash, you need a /quadruple/ slash - # in the case clause! - case *\\\\*:* : # continue splitting - case *:\\\\*\\\\* : # continue splitting - case *:/*\\\\* : # continue splitting - case *:\\\\*/* : # continue splitting - case *:/*/* : # continue splitting - case *:/* : result = $(<) ; - case *:\\\\* : result = $(<) ; - case *: : result = $(<) ; - } - } - - if ( ! $(<:B) ) && ( $(<) != $(DOT) ) # handle the case where $(<) is all grist. - { - result ?= $(<:G) ; - } - else if ( ! $(parent:G=) ) - { - result ?= $(<) ; - } - else - { - local p = [ split-path $(parent) ] ; - local b = [ strip-grist $(<) ] ; - p += $(b:D=) ; # can't use :B here because it destroys . and .. - result ?= $(p) ; - } - gSPLIT-PATH.$(<) = $(result) ; - } - return $(result) ; -} - -rule split ( string separator ) -{ - local result ; - local s = $(string) ; - - while $(s) - { - local match = [ MATCH ^(.*)$(separator)(.*) : $(s) ] ; - - local tail = $(match[2]) ; - tail ?= $(s) ; - - result = $(tail) $(result) ; - s = $(match[1]) ; - } - return $(result) ; -} - -rule split-path ( path ) -{ - if ! $(gSPLIT_PATH_CACHE($(path))) - { - gSPLIT_PATH_CACHE($(path)) = - [ MATCH "^([/$(SLASH)]+).*" : $(path) ] # rooting slash(es), if any - [ split $(path) "[/$(SLASH)]" ] # the rest. - ; - } - return $(gSPLIT_PATH_CACHE($(path))) ; -} - -# dwa 6/4/01 - added for boost -# reverse item1 item2... -# -# Returns ...item2 item1 -rule reverse -{ - local result ; - for x in $(<) - { - result = $(x) $(result) ; - } - return $(result) ; -} - -# dwa 6/28/01 - added for boost -# strip-initial tokens... : input -# -# if input begins with tokens, remove the initial sequence of tokens and return -# the rest. Otherwise return input unchanged. -rule strip-initial -{ - local result = $(>) ; - local t ; - local matched = true ; - for t in $(<) - { - if $(matched) && ( $(t) = $(result[1]) ) - { - result = $(result[2-]) ; - } - else - { - matched = ; - result = $(>) ; - } - } - return $(result) ; -} - -# dwa 6/4/01 - added for boost -# simplify-path-tokens token1 token2 ... tokenN : DOT-opt -# -# Remove redundant information from the given path elements -# if DOT-opt is supplied, empty results are replaced with -# $(DOT-opt). -# -# [ simplify-path-tokens a b . c .. .. d e ] => a d e -# [ simplify-path-tokens a b .. .. .. d e ] => .. d e -# [ simplify-path-tokens .. .. d e : xxx ] => .. .. d e (provided TOP != ../..) -# [ simplify-path-tokens a b .. .. : xxx ] => xxx -rule simplify-path-tokens -{ - local reverse-path = [ reverse $(<) ] ; - local dotdots ; - local result ; - local token ; - for token in $(reverse-path) - { - if $(token) = $(DOT) - { - } - else if $(token) = $(DOTDOT) - { - dotdots += $(token) ; - } - else if $(dotdots) - { - dotdots = $(dotdots[2-]) ; - } - else - { - result = $(token) $(result) ; - } - } - - result = $(dotdots) $(result) ; - result = [ strip-initial $($(gTOP)_TOKENS) $(gINVOCATION_SUBDIR_TOKENS) : $(result) ] ; - result ?= $(>) ; - return $(result) ; -} - -rule tokens-to-simple-path -{ - return [ FDirName [ simplify-path-tokens $(<) ] ] ; -} - -rule SubDirCcFlags -{ - SUBDIRCCFLAGS += $(<) ; -} - -rule SubDirC++Flags -{ - SUBDIRC++FLAGS += $(<) ; -} - -rule SubDirHdrs -{ - SUBDIRHDRS += $(<) ; -} - -rule SubInclude -{ - local _s ; - - # That's - # SubInclude TOP d1 [ d2 [ d3 [ d4 ] ] ] - # - # to include a subdirectory's Jamfile. - - if ! $($(<[1])) - { - EXIT Top level of source tree has not been set with $(<[1]) ; - } - - _s = [ FDirName $(<[2-]) ] ; - - # protect variables from being permanently set by SubDir invocations - # in included files. - local project = $(PROJECT) ; - local [ protect-subdir ] ; - PROJECT = $(project) ; - local jamfile-path - = [ tokens-to-simple-path - [ split-path $(JAMFILE:D=$(_s):R=$($(<[1]))) ] ] ; - load-jamfiles $(jamfile-path) ; -} - -# Load a user's Jamfile(s). -# -rule load-jamfiles ( jamfiles * ) -{ - # First we load the Jamfiles without generation of main targets so that - # dependencies are preloaded. Then we reload the files with target - # generation enabled. - - local jamfile ; - local as-dependant = $(gIN_LIB_INCLUDE) ; - local gIN_LIB_INCLUDE ; - - gIN_LIB_INCLUDE = TRUE ; - for jamfile-path in $(jamfiles) - { - if ! $(gINCLUDED_AS_DEPENDANT($(jamfile-path))) - { - gINCLUDED_AS_DEPENDANT($(jamfile-path)) = TRUE ; - include $(jamfile-path) ; - } - } - - if ! $(as-dependant) - { - gIN_LIB_INCLUDE = ; - for jamfile-path in $(jamfiles) - { - if ! $(gINCLUDED($(jamfile-path))) - { - gINCLUDED($(jamfile-path)) = TRUE ; - include $(jamfile-path) ; - } - } - } -} - -rule Undefines -{ - UNDEFS on [ FAppendSuffix $(<) : $(SUFEXE) ] += $(UNDEFFLAG)$(>) ; -} - -rule UserObject -{ - EXIT "Unknown suffix on" $(>) "- see UserObject rule in Jamfile(5)." ; -} - -# dwa 6/4/01 - modified for boost -rule Yacc -{ - local _h ; - - # Can't just replace .cpp with .h, because bison seems to generate a .cpp.h file - _h = $(<).h ; - - # Some places don't have a yacc. - - MakeLocate $(<) $(_h) : $(LOCATE_SOURCE) ; - SEARCH on $(<) $(_h) = $(LOCATE_SOURCE) ; - - if $(YACC) - { - DEPENDS $(<) $(_h) : $(>) ; - - # if YACC can accept an output file, we'll just generate the file there. - YACCFILES on $(<) $(_h) = [ join-path $(LOCATE_SOURCE) $(<[1]) ] ; - - Yacc1 $(<) $(_h) : $(>) ; - - if ! $(YACC_OUTPUT) - { - YaccMv $(<) $(_h) : $(>) ; - } - - Clean clean : $(<) $(_h) ; - } - - # make sure someone includes $(_h) else it will be - # a deadly independent target - - INCLUDES $(<) : $(_h) ; -} - -rule remember-binding ( target : bound-path ) { - gBINDING($(target)) = $(bound-path) ; -} - -# -# Utility rules; no side effects on these -# - -rule FGrist -{ - # Turn individual elements in $(<) into grist. - - local _g _i ; - - _g = $(<[1]) ; - - for _i in $(<[2-]) - { - _g = $(_g)!$(_i) ; - } - - return $(_g) ; -} - -rule FGristFiles -{ - if ! $(SOURCE_GRIST) - { - return $(<) ; - } - else - { - return $(<:G=$(SOURCE_GRIST)) ; - } -} - -# dwa 6/4/01 - modified for boost -rule FGristSourceFiles -{ - # Produce source file name name with grist in it, - # if SOURCE_GRIST is set. - - # Leave header files alone, because they have a global - # visibility. - - if ! $(SOURCE_GRIST) - { - return $(<) ; - } - else - { - local _i _o ; - - for _i in $(<) - { - switch $(_i) - { - case *.h : _o += $(_i) ; - case *.hpp : _o += $(_i) ; - case * : _o += $(_i:G=$(SOURCE_GRIST)) ; - } - } - - return $(_o) ; - } -} - -# dwa 6/4/01 - modified for boost -# join values... : [separator] -# -# Pastes values together into a single list element, separated by an optional separator. -rule join ( values * : sep ? ) -{ - sep ?= "" ; - return $(values:J=$(sep)) ; -} - -# Given $(<), the tokens comprising a relative path from D1 to a subdirectory -# D2, return the relative path from D2 to D1, using ../../ etc. -rule FSubDir -{ - local _d ; - - if ! $(<[1]) - { - _d = $(DOT) ; - } - else - { - _d = $(DOTDOT) ; - - local _i ; - for _i in $(<[2-]) - { - _d = $(_d:R=$(DOTDOT)) ; - } - } - - return $(_d) ; -} - -# dwa 6/4/01 - added for boost -# Turn individual elements in $(<) into a usable path. If $(<) is empty, $(>) is -# returned. -rule join-path -{ - local _s _i ; - - if ! $(<) - { - _s = $(>) ; - } - else if $(VMS) - { - # This handles the following cases: - # a -> [.a] - # a b c -> [.a.b.c] - # x: -> x: - # x: a -> x:[a] - # x:[a] b -> x:[a.b] - - switch $(<[1]) - { - case *:* : _s = $(<[1]) ; - case \\[*\\] : _s = $(<[1]) ; - case * : _s = [.$(<[1])] ; - } - - for _i in [.$(<[2-])] - { - _s = $(_i:R=$(_s)) ; - } - } - else if $(MAC) - { - _s = $(DOT) ; - - for _i in $(<) - { - _s = $(_i:R=$(_s)) ; - } - } - else - { - _s = $(<[1]) ; - local _r = $(<[2-]) ; - - # Jam doesn't handle the root directory properly - if $(_s) in / $(SLASH) - { - _s = $(_s)$(_r[1]) ; - _r = $(_r[2-]) ; - } - - for _i in $(_r) - { - _s = $(_i:R=$(_s)) ; - } - } - - return $(_s) ; -} - -# dwa 6/4/01 - modified for boost -rule FDirName -{ - # Turn individual elements in $(<) into a usable path. - return [ join-path $(<) : $(DOT) ] ; -} - - -rule _makeCommon -{ - # strip common initial elements - - if $($(<)[1]) && $($(<)[1]) = $($(>)[1]) - { - $(<) = $($(<)[2-]) ; - $(>) = $($(>)[2-]) ; - _makeCommon $(<) : $(>) ; - } -} - - -rule FRelPath -{ - local _l _r ; - - # first strip off common parts - - _l = $(<) ; - _r = $(>) ; - - _makeCommon _l : _r ; - - # now make path to root and path down - - _l = [ FSubDir $(_l) ] ; - _r = [ FDirName $(_r) ] ; - - # Concatenate and save - - # XXX This should be better - - if $(_r) = $(DOT) { - return $(_l) ; - } else { - return $(_r:R=$(_l)) ; - } -} - -# dwa 6/17/01 - modified for boost to handle multiple suffixes -rule FAppendSuffix -{ - # E.g., "FAppendSuffix yacc lex foo.bat : $(SUFEXE) ;" - # returns (yacc,lex,foo.bat) on Unix and - # (yacc.exe,lex.exe,foo.bat) on NT. - - if $(>) - { - local _i _o ; - - for _i in $(<) - { - if $(_i:S) - { - _o += $(_i) $(_i:S=$(>[2-])) ; - } - else - { - _o += $(_i:S=$(>)) ; - } - } - return $(_o) ; - } - else - { - return $(<) ; - } -} - -rule unmakeDir -{ - if $(>[1]:D) && $(>[1]:D) != $(>[1]) && $(>[1]:D) != \\\\ - { - unmakeDir $(<) : $(>[1]:D) $(>[1]:BS) $(>[2-]) ; - } - else - { - $(<) = $(>) ; - } -} - -# -# Actions -# - -# -# First the defaults -# - -actions As -{ - $(AS) $(ASFLAGS) -I$(HDRS) -o $(<) $(>) -} - -actions Chgrp -{ - chgrp $(GROUP) $(<) -} - -actions Chmod1 -{ - $(CHMOD) $(MODE) "$(<)" -} - -actions Chown -{ - chown $(OWNER) $(<) -} - -actions piecemeal together existing Clean -{ - $(RM) "$(>)" $(NULL_OUT) -} - -actions File -{ - $(CP) "$(>)" "$(<)" $(NULL_OUT) -} - -actions FileClone -{ - $(CLONE) "$(>)" "$(<)" $(NULL_OUT) -} - -actions GenFile1 -{ - $(>[1]) $(<) $(>[2-]) -} - -actions Fortran -{ - $(FORTRAN) $(FORTRANFLAGS) -o $(<) $(>) -} - -actions HardLink -{ - $(RM) "$(<)" 2$(NULL_OUT) $(NULL_OUT) - $(LN) "$(>)" "$(<)" $(NULL_OUT) -} - -actions Install -{ - $(CP) $(>) $(<) -} - -# dwa 6/4/01 - modified for boost -actions together Lex -{ - $(LEX) $(LEXFLAGS) $(LEX_OUTPUT)$(<) $(>) -} - -# dwa 6/4/01 - modified for boost -actions together LexMv -{ - $(MV) lex.yy.c $(<) -} - -actions MkDir1 -{ - $(MKDIR) "$(<)" -} - -rule Ranlib -{ - Ranlib-action $(<) : $(>) ; -} - -rule Ranlib-action -{ - system-Ranlib $(<) : $(>) ; -} - -actions together system-Ranlib -{ - $(RANLIB) "$(<)" -} - -actions quietly updated piecemeal together RmTemps -{ - $(RM) "$(>)" -} - -actions Shell -{ - $(AWK) ' - NR == 1 { print "$(SHELLHEADER)" } - NR == 1 && /^[#:]/ { next } - /^##/ { next } - { print } - ' < $(>) > $(<) -} - -# dwa 6/4/01 - modified for boost -actions together Yacc1 -{ - $(YACC) $(YACCFLAGS) $(YACC_OUTPUT)$(<[1]) $(>) -} - -# dwa 6/4/01 - modified for boost -actions together YaccMv -{ - $(MV) $(YACCFILES).c $(<[1]) - $(MV) $(YACCFILES).h $(<[2]) -} - -# dwa 6/4/01 - killed all platform-specific actions for boost - -# dwa 6/4/01 - modified for boost -actions together Yacc-fix-line-directives -{ - $(YACC_FIX_LINES) $(<) > $(<) -} diff --git a/v1/boost-base.jam b/v1/boost-base.jam deleted file mode 100644 index f0af377c9..000000000 --- a/v1/boost-base.jam +++ /dev/null @@ -1,2977 +0,0 @@ -#~ Copyright 2002-2004 Rene Rivera. -#~ Copyright 2001-2004 David Abrahams. -#~ Distributed under the Boost Software License, Version 1.0. -#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# (C) Copyright David Abrahams and Carlos Pinto Coelho 2001. Permission to -# copy, use, modify, sell and distribute this software is granted provided this -# copyright notice appears in all copies. This software is provided "as is" -# without express or implied warranty, and with no claim as to its suitability -# for any purpose. -# -# Jamrules file by David Abrahams (abrahams@mediaone.net) and Carlos Pinto -# Coelho (cfspc@altrabroadband.com). - -# Notes on the design of the system: -# -# This system is designed to support building the "same" targets with multiple -# build tool suites (e.g. msvc, gcc,...) and build variants (e.g. debug, -# release...). Although it currently varies across two dimensions, it should -# trivially support extension to three or more, e.g. in case of cross-platform -# builds. The word "same" is written in quotes above because internally, -# separate targets are generated for each unique toolset/build-variant -# combination. -# -# Specifics of build tool suites are specified in files with names of the form -# "-tools.jam", where is the name used to identify the tool suite. - -# Workarounds for Jam limitations: -# -# 1. Jam supports something like the setting of attributes on targets using the -# syntax: -# on = -# -# This facility is used to control build actions for individual targets -# (target-specific variables take precedence over global ones when build -# actions # are executed). An obvious approach would be to use target -# attributes to hold # properties of build tools (e.g. where to find the -# standard includes). # Unfortunately, although you can write target -# attributes, there is no way to # read them. Instead, we take advantage of -# two properties of Jam: -# -# a. A variable name can be formed by evaluating an expression. For example, -# the following rule, appends FOOBAR to its first argument to form the -# name of a new variable, which is given the value "baz" -# -# rule X { $(1)FOOBAR = baz ; } -# -# b. Any character is allowed in a variable name. So, although they are -# actually global variables, we can form names like .c++-flags thus: -# -# C++FLAGS = $($(1).c++-flags) # Get the c++-flags "attribute" from $(1) -# -# 2. There is no way to call a rule based on the value of a variable -# other than by using a switch statement. Because that approach requires -# intrusive changes to rules when the system is extended, we have avoided -# it. Instead, we have taken advantage of two "features" of Jam: -# -# a. The name of a file to be included can be computed from an -# expression. For example, the following includes a file whose name is -# formed by concatenating $(1) and "-tools.jam": -# -# include $(1)-tools.jam -# -# b. A rule can be redefined any number of times. Its latest definition is -# the one invoked. For example, the following prints "#2". -# -# rule X { ECHO #1 ; } -# rule X { ECHO #2 ; } -# X ; -# -# Together, these facts allow us to select tool-suite-specific actions for -# building specific target types by repeatedly redefining the generalized -# build actions in the various -tools.jam files - -if $(NT) -{ - TOOLS ?= vc-7_1 ; -} -else if $(UNIX) -{ - switch $(JAMUNAME) - { - case Darwin* : - { - TOOLS ?= darwin ; - } - - case * : - { - TOOLS ?= gcc ; - } - } -} -else -{ - TOOLS ?= gcc ; -} - -SHARED_TYPES = DLL ; -STATIC_TYPES = LIB ; - -# detect-build-tools : -# -# Declares a pseudotarget for the specified build tools which is built by -# the given . -# -# Although not currently implemented, the plan is to make compilation of -# tool-specific targets dependent on this pseudotarget. That way, we will never -# even attempt to build targets for tools that don't exist. -rule detect-build-tools -{ - detection-command on $(<) = $($(<).bin-directory)$(>) ; -} - -# lib: generator function -# -rule library-file ( target : sources + ) -{ - LibraryFromObjects $(<) : [ Objects $(>) ] ; -} - -# exe: generator function -# -rule executable-file ( target : sources + ) -{ - type-DEPENDS exe : $(<) ; - main-from-objects $(<) : [ Objects $(>) ] : EXE ; -} - -# dll: generator function -# -rule dll-files ( module implib ? : sources * : target-type ? ) -{ - type-DEPENDS dll : $(<) ; - - # Set up the import library dependency on Windows - if $(<[2]) - { - INCLUDES $(<[1]) : $(<[2-]) ; - INCLUDES $(<[2-]) : $(<[1]) ; - } - - target-type ?= DLL ; - if [ MATCH ^(CRAY).* : $(JAMUNAME[-1]) ] # no shared libs on cray - { - NOTFILE $(<) ; - } - else - { - main-from-objects $(<) : [ Objects $(>) ] : $(target-type) ; - } -} - -# template: modifier function -# -# The target specs are modified by adding those previously specified in a template source. -# Any specs containing paths are rerooted to correctly reference the dependee locations. -# -rule template-modifier ( target : source ) -{ - local source-dir = [ directory-of $(source:G=) ] ; - local source-id = [ target-id-of $(source) ] ; - - # Make sure it's defined. - # - if ! $(gTARGET_TYPE($(source-id))) - { - dependent-include $(source:G=) ; - } - - # Copy the base specs into the target specs, adjust any paths - # - gTARGET_SOURCES($(target)) += - [ root-paths $(gTARGET_SOURCES($(source-id))) : $(source-dir) ] ; - gTARGET_DEPS($(target)) += - [ root-paths $(gTARGET_DEPS($(source-id))) : $(source-dir) ] ; - gTARGET_REQUIREMENTS($(target)) += - [ fixup-path-properties $(gTARGET_REQUIREMENTS($(source-id))) : $(source-dir) ] ; - gTARGET_DEFAULT_BUILD($(target)) += - $(gTARGET_DEFAULT_BUILD($(source-id))) ; -} - -# main-from-objects exe-target : obj-target... : ("EXE"|"DLL") -# -# generate instructions to build the given "main" target from the given object -# files given in the 2nd parameter. The 3rd parameter should be EXE for an -# executable, or DLL for a shared library. -rule main-from-objects ( targets * : objects * : type ) -{ - # make compiled sources a dependency of target - - MakeLocate $(targets) : $(LOCATE_TARGET) ; - - Clean clean : $(targets) ; - - MODE on $(targets) = $($(type)MODE) ; - local link-function = Link-$(type) ; - local extra-files = [ $(link-function) $(targets) : $(objects) : $(type) ] ; - Chmod $(targets[1]) ; - DEPENDS $(targets) : $(objects) ; - - # locate and attach the extra files generated - if $(extra-files) - { - MakeLocate $(extra-files) : $(LOCATE_TARGET) ; - DEPENDS $(targets) : $(extra-files) ; - } - - gFILES($(targets[1])) = $(targets) $(extra-files) ; -} - -rule .do-link ( targets + : sources + : type ) -{ - # Prepare NEEDLIBS for use by the toolsets' link action (e.g. for - # invoking with-command-file) - local NEEDLIBS = [ on $(<) return $(NEEDLIBS) ] ; - - return [ Link-action $(targets) : $(sources) : $(type) ] ; -} - -rule Link-EXE -{ - # N.B. By the time this rule is invoked, we had better have gRUN_PATH completely set. - - local extra-files = [ .do-link $(<) : $(>) : EXE ] ; - RUN_PATH on $(<) = [ join [ unique $(gRUN_PATH($(<))) $(gTOOLSET_LIB_PATH) ] : $(SPLITPATH) ] ; - if $(UNIX) - { - LINK_LIBPATH on $(<) = [ join $(gRUN_LD_LIBRARY_PATH($(<))) : $(SPLITPATH) ] ; - } - - return $(extra-files) ; -} - -rule Link-DLL -{ - gRUN_LD_LIBRARY_PATH($(<)) += $(gLOCATE($(<[1]))) $(gTOOLSET_LIB_PATH) ; - if $(UNIX) - { - LINK_LIBPATH on $(<) = [ join $(gRUN_LD_LIBRARY_PATH($(<))) : $(SPLITPATH) ] ; - } - - return [ .do-link $(<) : $(>) : DLL ] ; -} - -# store the shell's PATH again, just in case someone uses PATH. -# This also allows the user to customize the base path for running built -# products from the command-line -RUN_PATH ?= $(PATH) ; -if $(UNIX) -{ - LINK_LIBPATH ?= $($(gSHELL_LIBPATH)) ; - gAPPEND_LD_LIBRARY_PATH = ":$"$(gSHELL_LIBPATH) ; - gAPPEND_PATH = ":$"PATH ; -} -if $(NT) -{ - # Try some other likely spellings - RUN_PATH ?= $(Path) ; - RUN_PATH ?= $(path) ; - gAPPEND_LD_LIBRARY_PATH = ";%LD_LIBRARY_PATH%" ; - gAPPEND_PATH = ;\"%PATH%\" ; -} - -# Now set this, just in case someone tries to use it. -PATH = $(RUN_PATH) ; -if $(UNIX) -{ - $(gSHELL_LIBPATH) = $(LINK_LIBPATH) ; -} - -DOLLAR = "$" ; - -# bubble variable-name -# -# Helper function for sort, below -# Removes the greatest element from $(variable-name) and returns it. -rule bubble # -{ - local result = ; - local last = $($(<)[1]) ; - for x in $($(<)[2-]) - { - if $(last) <= $(x) - { - result += $(last) ; - last = $(x) ; - } - else - { - result += $(x) ; - } - } - $(<) = $(result) ; - return $(last) ; -} - -# sort args -# -# return args sorted in lexicographic order. -rule sort -{ - local _all = $(<) ; - local _result = ; - local _count ; - for _count in $(<) - { - _result = [ bubble _all ] $(_result) ; - } - return $(_result) ; -} - -# min args -# -# return the lexicographic minimum element of args -rule min -{ - local result = ; - local x ; - for x in $(<) - { - if ! $(result) || ( $(x) < $(result) ) - { - result = $(x) ; - } - } - return $(result) ; -} - -# difference listB : listA -# returns the elements of B that are not in A -rule difference -{ - local result = ; - local element ; - for element in $(<) - { - if ! ( $(element) in $(>) ) - { - result += $(element) ; - } - } - return $(result) ; -} - -# replace list : old-value new-value -# -# returns list with occurrences of old-value replaced by new-value -rule replace -{ - local result = ; - local x ; - for x in $(<) - { - if $(x) = $(>[1]) - { - result += $(>[2]) ; - } - else - { - result += $(x) ; - } - } - return $(result) ; -} - -# select-ungristed list... -# -# Returns the elements of list that have no grist -rule select-ungristed -{ - local result x ; - for x in $(<) - { - if ! $(x:G) - { - result += $(x) ; - } - } - return $(result) ; -} - -rule select-gristed ( list * ) -{ - local result ; - for local x in $(list) - { - if $(x:G) - { - result += $(x) ; - } - } - return $(result) ; -} - -# Returns grist without "<"/">" for elements matching "<.*>", -# and ignores other elements. -rule ungrist ( names * ) -{ - local result ; - for local name in $(names) - { - local stripped = [ MATCH ^<(.*)>$ : $(name) ] ; - result += $(stripped) ; - } - return $(result) ; -} - - -# Split a qualified property into 3 elements. -# -# Grammar description of qualified-property : -# [[]]property -# -# returns property -# missing or are treated as <*> -rule split-qualified-property -{ - local grist1 = $(<:G) ; - local ungrist1 = $(<:G=) ; - local grist2 = $(ungrist1:G) ; - local ungrist2 = $(ungrist1:G=) ; - local grist3 = $(ungrist2:G) ; - local ungrist3 = $(ungrist2:G=) ; - if $(grist3) - { - return $(grist1) $(grist2) $(grist3)$(ungrist3) ; - } - else if $(grist2) - { - return <*> $(grist1) $(grist2)$(ungrist2) ; - } - else - { - return <*> <*> $(<) ; - } -} - -rule unique # list -{ - local result = ; - local f ; - for f in $(<) - { - if ! $(f) in $(result) - { - result += $(f) ; - } - } - return $(result) ; -} - -# get-properties features : properties -# -# Given a list of gristed features and a list of properties, returns the -# properties matching the given features. -rule get-properties -{ - local result = ; - local property ; - for property in $(>) - { - if $(property:G) in $(<) - { - result += $(property) ; - } - } - return $(result) ; -} - -# get-values features : properties -# -# Given a list of gristed feature names and a list of properties, returns the -# value(s) of the given features. -rule get-values -{ - local _properties = [ get-properties $(<) : $(>) ] ; - return $(_properties:G=) ; -} - -rule replace-properties ( property-set * : new-properties * ) -{ - local result = ; - for local x in $(property-set) - { - if $(x:G) in $(new-properties:G) - { - if ! $(x:G) in $(result:G) - { - result += [ get-properties $(x:G) : $(new-properties) ] ; - } - - } - else - { - result += $(x) ; - } - } - return $(result) ; -} - - -# normalize-properties properties -# -# Normalizes a set of (possibly qualified) properties by prepending <*> as many -# times as necessary to ensure that each property has at least 3 gristed elements. -rule normalize-properties -{ - local property ; - local result ; - for property in $(<) - { - switch $(property) - { - case <*><*>* : result += $(property) ; - case <*>* : result += <*>$(property) ; - case * : result += <*><*>$(property) ; - - case <*><*><*>* : result += $(property) ; - case <*><*><*>* : result += <*>$(property) ; - case <*><*>* : result += $(property) ; - case <*><*>* : result += <*><*>$(property) ; - case <*>* : result += <*>$(property) ; - case <*>* : result += <*><*><*>$(property) ; - case * : result += <*><*>$(property) ; - - case <*><*><*><*@*>* : result += $(property) ; - case <*><*><*@*>* : result += <*>$(property) ; - case <*><*@*>* : result += <*><*>$(property) ; - case <*@*>* : result += <*><*><*>$(property) ; - - case <*><*><*>* : result += $(property) ; - case <*><*>* : result += <*>$(property) ; - case <*>* : result += <*><*>$(property) ; - case * : result += <*><*><*>$(property) ; - } - } - return $(result) ; -} - -# intersection set1 : set2 -# -# Removes from set1 any items which don't appear in set2 and returns the result. -rule intersection -{ - local result v ; - for v in $(<) - { - if $(v) in $(>) - { - result += $(v) ; - } - } - return $(result) ; -} - -# subset sub : super -# -# Returns true iff sub is a subset of super, empty otherwise -rule is-subset -{ - if [ intersection $(<) : $(>) ] = $(<) - { - return true ; - } -} - -# distribute-feature value1[/value2...] -# -# Distribute the given feature across the slash-separated set of values, i.e. -# returns value1[ /value2...] -rule distribute-feature -{ - local g = $(<:G) ; - local result = [ split-path $(<:G=) ] ; - return $(g)$(result) ; -} - -# set-insert variable-name : value... ; -# -# Appends the given values to the list designated by variable-name if they are -# not already present. -rule set-insert -{ - local v ; - for v in $(>) - { - if ! ( $(v) in $($(<)) ) - { - $(<) += $(v) ; - } - } -} - -# equal-sets set1 : set2 -# -# Returns true iff set1 contains the same elements as set2. -# Not sensitive to the same element appearing multiple times -rule equal-sets -{ - if ( ! [ difference $(<) : $(>) ] ) && ( ! [ difference $(>) : $(<) ] ) - { - return true ; - } -} - -# feature name : [values...] -# -# Declares a feature with the given name, and the given allowed values. -rule feature -{ - if $(<) in $(gFEATURES) - { - EXIT feature $(<) : $(gFEATURE_VALUES(<$(<)>) redeclared as $(<) : $(>) ; - } - gFEATURES += <$(<)> ; - gUNGRISTED(<$(<)>) = $(<) ; - gFEATURE_VALUES(<$(<)>) = $(>) ; -} - -rule free-feature -{ - feature $(<) : $(>) ; - gFREE_FEATURES += <$(<)> ; - if $(>) - { - gSINGLE_VALUED_FREE_FEATURES += <$(<)> ; - } -} - -rule path-feature -{ - free-feature $(<) : $(>) ; - gPATH_FEATURES += <$(<)> ; -} - -rule dependency-feature -{ - path-feature $(<) : $(>) ; - gDEPENDENCY_FEATURES += <$(<)> ; -} - -# feature-default ... -# -# return the default properties corresponding to the given feature(s) -rule feature-default -{ - local result f ; - for f in $(<) - { - result += $(f)$(gFEATURE_VALUES($(f))[1]) ; - } - return $(result) ; -} - -# flags tools-name variable-name condition [: value(s)] -# -# Declare command-line settings for a given toolset. -# toolset: the name of the toolset -# variable-name: the name of a global variable which can be used to carry -# information to a command-line -# condition: One of the following: -# 1. zero or more property-sets of the form: -# value[/value...] -# 2. one or more [/...] -# -# This rule appends to the specified variable, depending on a target's build -# configuration and the form of condition. -# -# 1. if any specified property-set is a subset of the target's build properties or if -# condition is empty, the values specified in $(3) will be appended once to -# /variable-name/. -# -# 2. The value of each specified feature that participates in the target's -# build properaties is appended to /variable-name/. -# -# The variable will be set "on" the target so it may be used in its build actions. -rule flags -{ - local toolset = $(gCURRENT_TOOLSET) ; - local variable = $(<[2]) ; - local condition = $(<[3-]) ; - - # record the names of all variables used so they can be set on targets - if ! ( $(variable) in $(gTARGET_VARIABLES) ) - { - gTARGET_VARIABLES += $(variable) ; - $(variable) = ; - } - - local found = ; - local x ; - for x in $(condition) - { - x = [ split-path $(x) ] ; - - # Add each feature to the set of features relevant to the toolset - gRELEVANT_FEATURES($(toolset)) += $(x:G) ; - - # is it a property set? - if $(x:G=) - { - # if this property_set is a subset of the current build-properties - if ( ! $(found) ) && [ is-subset $(x) : $(gBUILD_PROPERTIES) ] - { - found = true ; - $(variable) += $(>) ; - } - } - else - { - $(variable) += [ get-values $(x) : $(gBUILD_PROPERTIES) ] ; - if $(x:G) in $(gDEPENDENCY_FEATURES) - { - gDEPENDENCY_VARIABLES($(toolset)) += $(variable) ; - } - } - } - if ! $(condition) - { - $(variable) += $(>) ; - } -} - -# include-tools toolset -# -# Unconditionally process the specification file for the given toolset. It is -# necessary to do this for each target built with that toolset, since the -# toolset will invoke the flags rule to set global variables based on the build -# properties of the target. -rule include-tools -{ - if ! $(gIN_INCLUDE_TOOLS) - { - gCURRENT_TOOLSET = $(<) ; - gRELEVANT_FEATURES($(<)) = ; # clear relevant feature set - gDEPENDENCY_VARIABLES($(<)) = ; - - # clear any lingering target variables that may have been declared - $(gTARGET_VARIABLES) = ; - gTARGET_VARIABLES = NEEDLIBS NEEDIMPS ; # start over from the beginning - gTOOLSET_LIB_PATH = ; - } - - { - local gIN_INCLUDE_TOOLS = true ; - SEARCH on $(<)-tools.jam = $(BOOST_BUILD_PATH) ; - include $(<)-tools.jam ; - } - - # Always maintain the list of relevant features as unique - if ! $(gIN_INCLUDE_TOOLS) - { - gRELEVANT_FEATURES($(<)) = [ - unique $(gRELEVANT_FEATURES($(<))) - $(gALWAYS_RELEVANT) - ] ; - } - - gINCLUDED($(<)-tools.jam) = TRUE ; -} - -# extends-toolset toolset -# -# Used in a toolset definition file; Declares that the toolset currently being -# defined is an extension of the given toolset. -rule extends-toolset -{ - include-tools $(<) ; -} - -# relevant-features toolset -# -# Returns the set of unique features relevant to the given toolset; includes the -# toolset description file as a side-effect if necessary. -rule relevant-features # name -{ - if ! $(gRELEVANT_FEATURES($(<))) - { - include-tools $(<) ; - } - return $(gRELEVANT_FEATURES($(<))) ; -} - -# variant name [ : parents... ] : []value... -# -# Declare a build variant, whose configuration is given by the given (optionally -# toolset-qualified) properties. -rule variant ( name : parents-or-properties * : tool-properties * ) -{ - gALL_VARIANTS += $(name) ; - local parents ; - if ! $(tool-properties) - { - if $(parents-or-properties[1]:G) - { - tool-properties = $(parents-or-properties) ; - } - else - { - parents = $(parents-or-properties) ; - } - } - else - { - parents = $(parents-or-properties) ; - } - local toolset ; - for toolset in $(TOOLS) - { - # We hijack select-properties to do our dirty work here. - # Because properties in a variant declaration are only qualified with - # toolset and not variant, we specify the toolset where - # select-properties expects a variant name. The first toolset parameter - # is necessary to get the relevant-features correctly set. We supply - # the variant name as the target name, so that error messages will look - # coherent. - local name-properties - = [ select-properties $(toolset) $(toolset) $(name) : $(tool-properties) ] ; - if $(parents) - { - local parent ; - for parent in $(parents) - { - local parent-properties - = $(gBASE_PROPERTIES($(toolset),$(parent))) ; - local inherited-features - = [ unique - [ difference $(parent-properties:G) : $(name-properties:G) ] - $(gFREE_FEATURES) - $(gPATH_FEATURES) - $(gDEPENDENCY_FEATURES ] ; - local inherited-properties - = [ get-properties $(inherited-features) : $(parent-properties) ] ; - name-properties - += $(inherited-properties) ; - } - } - gBASE_PROPERTIES($(toolset),$(name)) = [ sort $(name-properties) ] ; - } -} - -# select-properties toolset variant target : qualified-properties... -# -# Returns -rule select-properties ( toolset variant target ? : qualified-properties * ) -{ - local relevant_features = [ relevant-features $(toolset) ] ; - local normalized = [ normalize-properties $(>) ] ; - - # Classify properties by the specificity of their qualification. - # First, grab those that apply to this toolset, or all toolsets - local this_toolset = [ get-values <$(toolset)> : $(normalized) ] ; - local all_toolsets = [ get-values <*> : $(normalized) ] ; - - local 0-stars = [ get-values <$(variant)> : $(this_toolset) ] ; - local 1-stars = [ get-values <*> : $(this_toolset) ] [ get-values <$(variant)> : $(all_toolsets) ] ; - local 2-stars = [ get-values <*> : $(all_toolsets) ] ; - - # Select feature names from the features relevant to the toolset. - local features = [ intersection $(relevant_features) - : $(0-stars:G) $(1-stars:G) $(2-stars:G) ] ; - - local result f ; - for f in $(features) - { - local is_free = [ intersection $(f) : $(gFREE_FEATURES) ] ; - - # Go through the $(n-stars) lists from most- to least- specific; - # collect the best set of values of a simple feature, and /all/ - # values of a free feature. - local r n ; - for n in 0 1 2 - { - if ! $(r) || $(is_free) - { - r += [ get-values $(f) : $($(n)-stars) ] ; - } - } - - r = [ unique $(r) ] ; - if $(r[2]) && ! $(is_free) # Check for conflicting simple-feature requests - { - EXIT "Error: Ambiguous properties requested for" - $(target) <$(toolset)><$(variant)> ":" $(f)$(r) ; - } - result += $(f)$(r) ; - } - return $(result) ; -} -# get toolset features -SEARCH on features.jam = $(BOOST_BUILD_PATH) ; -include features.jam ; - -# ungrist-properties properties... -# -# Transforms a list of properties of the form: -# value1 [value2... ] -# into a list of the form: -# feature1-value1 feature2-value2 -# suitable for use as directory path elements -# -rule ungrist-properties -{ - local property ; - local result = ; - for property in $(<) - { - result += $(gUNGRISTED($(property:G)))-$(property:G=) ; - } - return $(result) ; -} - -# set-target-variables target -# -# attach global build tool settings to the given file-target, so that they can be -# used in build actions. -rule set-target-variables ( targets * ) -{ - local s ; - for s in $(gTARGET_VARIABLES) - { - $(s) on $(targets) = $($(s)) ; - - # set up dependencies if the target is a "top-level" target - if ( $(s) in $(gDEPENDENCY_VARIABLES($(gCURRENT_TOOLSET))) ) && $(gTARGET_TYPE($(<))) - { - DEPENDS $(targets) : $($(s)) ; - } - } - local libpath = [ get-properties : $(gBUILD_PROPERTIES) ] ; - gRUN_PATH($(targets)) += $(libpath:G=) ; - gRUN_LD_LIBRARY_PATH($(targets)) += $(libpath:G=) ; -} - -# For path properties, add a relative path prefix to the value as -# necessary to locate the path relative to the given subproject -# directory. -rule fixup-path-properties ( properties * : subproject-directory ? ) -{ - local result ; - - for local p in $(properties) - { - if $(p:G) in $(gPATH_FEATURES) - { - # If the path property value is project-relative, re-root - # it appropriately for that project - local parse-project = [ MATCH ^@([^/$(SLASH)]+)[/$(SLASH)]?(.*) : $(p:G=) ] ; - if $(parse-project) - { - local project = $(parse-project[1]) ; - local subproject = $(parse-project[2]) ; - p = [ root-paths $(subproject:G=$(p:G)) : $(gPROJECT($(project))) ] ; - } - else if $(subproject-directory) # re-root it relative to this directory - { - p = [ root-paths $(p) : $(subproject-directory) ] ; - } - } - - result += $(p) ; - } - - return $(result) ; -} - -# remove-incompatible-builds requirements... : build-request... : target-name -# -# If any element of requirements has the same grist but a different ungristed -# part as any element of build-request, exits with an error report about target-name -rule remove-incompatible-builds ( requirements * : build-request * : target-name + ) -{ - local all-properties = [ unique $(<) $(>) ] ; - local all-features = $(all-properties:G) ; - local unique-features = [ unique $(all-features) ] ; - if $(all-features) != $(unique-features) - { - local result ; - local skip ; - for local p in $(build-request) - { - # if a feature of the build request is also in the - # requirements, but with differing value(s) - if ( $(p:G) in $(requirements:G) ) - && ! ( $(p) in $(requirements) ) - { - # decide what to do. - local value = [ get-values $(p:G) : $(requirements) ] ; - if $(value[2]) - { - EXIT Unexpectedly found multiple build requests - for feature $(p:G) with values $(values) ; - } - - local requested = [ split-path $(p:G=) ] ; - if $(requested[2]) - { - local skipped = [ difference $(requested) : $(value) ] ; - - if ! $(gNOWARN_INCOMPATIBLE_BUILDS) - { - ECHO $(target-name) requires $(p:G)$(value), - skipping requested build configuration(s) $(p:G)$(skipped). ; - } - - result += $(p:G)$(value) ; - } - else - { - if ! $(gNOWARN_INCOMPATIBLE_BUILDS) - { - ECHO skipping $(target-name) due to incompatible - build requirements $(p:G)$(value). ; - } - skip = true ; - } - } - else - { - result += $(p) ; - } - } - - if $(skip) - { - build-request = SKIP ; - } - else - { - build-request = $(result) ; - } - } - return $(build-request) ; -} - -# multiply-property-sets [value1[/value2...] ]... -# -# Expands a set of (possibly multi-valued) properties into all the combinations -# that include every feature in the set. Each combination is given as a path, -# with the slash separating the properties, sorted in feature order. -rule multiply-property-sets -{ - local result p ; - for p in [ sort $(<) ] - { - # expand any multi-valued simple features from the default build - local multiple = [ distribute-feature $(p) ] ; - - # concatenation produces a product, so the tree branches for each - # multi-valued simple feature. - result = $(result)/$(multiple) ; - result ?= $(multiple) ; # this trick allows us to get started - } - return $(result) ; -} - -# Return a list consisting of all the elements of properties which -# aren't the defaults for their features. -rule remove-default-properties ( properties * ) -{ - return [ difference $(properties) : [ feature-default $(properties:G) ] ] ; -} - -# make-path-property-sets base-path : common-properties : property-sets -# -# Returns a list of paths where the initial ungristed part of each element is a -# relative path to a subvariant directory from a target's build root and the -# rest of the element is a slash-separated property set describing the -# properties of the target to be built. -# -# Each path returned is base-path extended by one of the ungristed property-sets -# (or just the base-path if no property-sets are supplied). Each property set -# returned is formed by extending common-properties with one of the property-sets. -# -# For example, -# -# make-path-property-sets gcc/release : v1 : v2/v3 -# -# returns this single-element list: -# -# gcc/release/p2-v2/p3-v3/v1/v2/v3 -# |<-- subvariant path -->|<-- property-set -->| -rule make-path-property-sets ( base-path : common-properties * : property-sets * ) -{ - local result ; - local s ; - for s in $(property-sets) - { - local x = - # directory components - $(base-path) - [ ungrist-properties - [ remove-default-properties [ split-path $(s) ] ] - ] - # properties - $(common-properties) $(s) - ; - - result += $(x:J=$(SLASH)) ; - } - - # if there were no overrides, just add the base variant and properties - if ! $(result) - { - result = [ join $(base-path) $(common-properties) : $(SLASH) ] ; - } - return $(result) ; -} - -# segregate-overrides override-var base-var -# -# removes elements of $(base-var) from $(override-var), and removes elements -# whose grist is in $(override-var:G) from $(base-var). -rule segregate-overrides -{ - $(<) = [ difference $($(<)) : $($(>)) ] ; - - # Which features, and thus properties, of the base variant are we keeping? - local kept-features = [ difference $($(>):G) : $($(<):G) ] ; - $(>) = [ get-properties $(kept-features) : $($(>)) ] ; -} - -# If any single-valued free-feature appears more than once in free-property..., -# exit with an appropriate error message. -rule report-free-property-conflicts ( free-property * : target + ) -{ - local p = [ get-properties $(gSINGLE_VALUED_FREE_FEATURES) : $(free-property) ] ; - local f = [ unique $(p:G) ] ; - if $(p:G) != $(f) - { - EXIT $(>): multiple values for single-valued free feature(s) - [ difference $(p:G) $(f) ] requested ; - } -} - -# Returns a list of path-property-sets (see make-path-property-sets above) for -# all build configurations based on the given toolset, requirements, and -# build-request. Target-name is just used for error reporting. -rule expand-build-request ( toolset variant target : raw-requirements * : raw-build-request * ) -{ - # grab the requirements and BUILD-request relevant to this toolset and variant - local requirements = [ select-properties $(toolset) $(variant) : $(raw-requirements) ] ; - local build-request = [ select-properties $(toolset) $(variant) : $(raw-build-request) ] ; - - # Separate the free features (e.g. , , ) from the others - local free-properties = [ segregate-free-properties requirements build-request ] ; - - # Check for conflicts - report-free-property-conflicts $(free-properties) : $(target) ; - build-request = [ remove-incompatible-builds $(requirements) - : $(build-request) : $(target) ] ; - - if $(build-request) != SKIP - { - # Get the base variant for the toolset. Includes free features - local base-properties = $(gBASE_PROPERTIES($(toolset),$(variant))) ; - - # Which properties will override settings in the base variant? - local override-properties = [ unique $(requirements) $(build-request) ] ; - segregate-overrides override-properties : base-properties ; - - # Which features will pick up a default value because they are not in - # the base variant or in the overrides? - local relevant-features = [ relevant-features $(toolset) ] ; - local override-free-features = [ intersection $(gSINGLE_VALUED_FREE_FEATURES) - : $(free-properties:G) ] ; - local defaulted-features = [ difference $(relevant-features) - : $(override-properties:G) $(base-properties:G) - $(override-free-features) - ] ; - - local defaulted-properties = [ feature-default $(defaulted-features) ] ; - - # VP: defaulted-properties have the form value and there's 1 value. - # Hence, each element of defaulted-properties will be part of each - # component of override-sets and will be a part of each property-set - # returned. By segregating them, the result is changed in only one - # way: free properties does not show up in target path. - local defaulted-free-properties = [ segregate-free-properties defaulted-properties ] ; - - # - # Allow properties and rules to take effect. - # - local default-requirements = [ get-values : $(free-properties) ] ; - - defaulted-properties = [ replace-properties $(defaulted-properties) - : [ select-gristed $(default-requirements) ] ] ; - - local non-defaults = $(requirements) $(build-request) $(free-properties) ; - - for local r in [ select-ungristed $(default-requirements) ] - { - local x = [ $(r) $(toolset) $(variant) : $(non-defaults) ] ; - # ECHO $(r) yields $(x) ; - # ECHO defaulted-properties= $(defaulted-properties) ; - defaulted-properties = [ - replace-properties $(defaulted-properties) : $(x) ] ; - } - - # In case any defaults should conflict with the requirements, - # force them to match up. - defaulted-properties = [ replace-properties $(defaulted-properties) : $(requirements) ] ; - - # form override property sets of the form (property1[/property2...] )+, - # sorted in feature order. These represent the properties of subvariants - # that differ from the base variant - local override-sets - = [ multiply-property-sets $(override-properties) $(defaulted-properties) ] ; - - # return path-property-sets corresponding to each (sub)variant build - # described. - return [ make-path-property-sets - $(toolset)$(SLASH)$(variant) - : [ fixup-path-properties - $(base-properties) - $(free-properties) - $(defaulted-free-properties) - : $(RELATIVE_SUBDIR) - ] - : $(override-sets) - ] ; - } -} - -# split-path-at-grist path -# -# Breaks path at each $(SLASH) that is followed by grist. This can be used to -# break apart property sets, particularly where the feature is used, -# since its value is typically a path. -rule split-path-at-grist -{ - local full-split = [ split-path $(<) ] ; - local last ; - local result x ; - for x in $(full-split) - { - if $(x:G) - { - result += $(last) ; - last = $(x) ; - } - else - { - last = $(last)$(SLASH)$(x) ; - last ?= $(x) ; - } - } - return $(result) $(last) ; -} - -# -# GIVEN: -# -# A set of dependency sources with grist to indicate the types -# (*, *, etc) -# -# RESULT: -# -# Will use the type, basename, and SUF*/PRE* to expand the name -# of the sources to their fully specific target name. -# -# EXAMPLE: -# -# [ expand-source-names test test test README.txt test ] -# -# RETURNS: -# -# libtest.a libtest.so test.app README.TXT test.so -# -rule expand-source-names ( sources * ) -{ - local x-sources = ; - for local source in $(sources) - { - local grist = [ ungrist $(source:G) ] ; - local type = $(gTARGET_TYPE_ID($(grist))) ; - if $(type) - { - local p = "" ; if $(source:B=:S=:G=) { p = "/" ; } - local prefix = "" ; - local suffix = "" ; - if $(PRE$(type)[1]) { prefix = $(PRE$(type)[1]) ; } - if $(SUF$(type)[1]) { suffix = $(SUF$(type)[1]) ; } - x-sources += $(source:B=:S=)$(p)$(prefix)$(source:B:S=)$(suffix) ; - } - else - { - x-sources += $(source) ; - } - } - return $(x-sources) ; -} - -# -# GIVEN: -# -# A set of targets and a single target type for all the targets -# (DLL, LIB, etc.) -# -# RESULT: -# -# Will use the type, basename, and SUF*/PRE* to expand the name -# of the targets to their fully specific target name. -# -# EXAMPLE: -# -# [ expand-targets-names foo bar : DLL ] -# -# RETURNS: -# -# libfoo.a libbar.so -# -rule expand-target-names ( targets + : target-type ) -{ - local x-targets = ; - for local target in $(targets) - { - local prefix = "" ; - local suffix = "" ; - if $(PRE$(target-type)[1]) { prefix = $(PRE$(target-type)[1]) ; } - if $(SUF$(target-type)[1]) { suffix = $(SUF$(target-type)[1]) ; } - x-targets += $(prefix)$(target)$(suffix) ; - } - return $(x-targets) ; -} - -# declare-local-target name : sources : requirements : local-BUILD : target-type -# -# declares a subproject-local target of the given name and target-type. This is -# all top-level rules which declare targets should eventually go through here. -# -# RETURNS: the a list of target names for the files built by the target. -rule declare-local-target ( target : sources * : requirements * : default-build * : target-type ) -{ - # We expand out the name of the target - local x-target = [ expand-target-names $(target) : $(target-type) ] ; - - # We add SOURCE_GRIST the base target name here because we're referring the - # abstract target which generates all of the actual builds. We need a way to - # distinguish targets of the same name from different subprojects. - local target-id = [ FGristFiles $(x-target) ] ; - - if ! $(target-type) - { - EXIT No target type given for "$(x-target)" ; - } - - # Define the specifications of the target. - gTARGET_NAME($(target-id)) = $(target) ; - - # Declare the basic target. - declare-basic-target $(target-id) : $(sources) : $(requirements) : $(default-build) : $(target-type) ; - - # Generate build instructions, but only if the target has a generator. - # - if $(gGENERATOR_FUNCTION($(gTARGET_TYPE($(target-id))))) - { - # Supress the regular build of this target - local suppress = [ get-values : $(default-build) ] ; - local gSUPPRESS_FAKE_TARGETS = $(suppress[1]) ; - - declare-fake-targets $(target) : $(target-id) ; - - # Just gather information if we are including a library's Jamfile for a - # dependent target. Don't generate build instructions here. - if ! $(gIN_LIB_INCLUDE) - { - main-target $(target-id) : $(gTARGET_DEFAULT_BUILD($(target-id))) ; - } - } - - return $(gTARGET_FILES($(target-id))) ; -} - -# declare-basic-target target-id : sources : requirements : local-BUILD : target-type -# -# Declares a basic target for the given target-id and target-type. -# All target generation should go through here to ensure all vars are set -# for the targets. -# -# WARNING: This only declares, no build instructions are generated here. -rule declare-basic-target ( target-id : sources * : requirements * : default-build * : target-type ) -{ - # We expand out the name of the sources - local x-sources = [ expand-source-names $(sources) ] ; - - # Define the specifications of the target, but only if we haven't already. - # - if ! $(gTARGET_TYPE($(target-id))) - { - # Save basic information about the target. - # - gTARGET_TYPE($(target-id)) = $(target-type) ; - - # Add the specified requirements to any requirements given by the target - # type, and the corresponding property. - # - gTARGET_REQUIREMENTS($(target-id)) - = toolset::requirements $(requirements) $(gTARGET_TYPE_REQUIREMENTS($(target-type))) ; - if ! $(gNO_TARGET_TYPE_REQUIREMENT($(target-type))) - { - gTARGET_REQUIREMENTS($(target-id)) += $(target-type) ; - } - - # Collect the recognized dependencies to other targets. - # - local dependencies ; - for local source in [ select-gristed $(x-sources) ] - { - local dependency-type = [ ungrist $(source:G:L) ] ; - local dependency-type-id = $(gTARGET_TYPE_ID($(dependency-type))) ; - if $(gIS_DEPENDENCY($(dependency-type-id))) - { - gTARGET_DEPS($(target-id)) += $(source:G=$(dependency-type-id)) ; - } - } - - # Sources that aren't recognized as targets, are considered raw sources. - # - gTARGET_SOURCES($(target-id)) - = [ FGristFiles - [ difference $(x-sources:G=) : $(gTARGET_DEPS($(target-id)):G=) ] ] ; - - # Save the default builds. - # - gTARGET_DEFAULT_BUILD($(target-id)) = $(default-build) ; - - # Apply any modifiers to the target specs. - # - for local mod in $(gTARGET_DEPS($(target-id))) - { - local dependency-type-id = [ ungrist $(mod:G) ] ; - local modifier-function = $(gMODIFIER_FUNCTION($(dependency-type-id))) ; - if $(modifier-function) - { - # Remove and apply the modifier. - gTARGET_DEPS($(target-id)) = [ difference $(gTARGET_DEPS($(target-id))) : $(mod) ] ; - local ignored = [ $(modifier-function) $(target-id) : $(mod) ] ; - } - } - } - # Trying to define the same specific target with a different type. - # - else if $(gTARGET_TYPE($(target-id))) != $(target-type) - { - EXIT conflicting target types for "$(x-target)": - "$(gTARGET_TYPE($(target-id)))" "$(target-type)" ; - } -} - -# directory-of files... -# -# Returns a list of the directories containing each element of files -rule directory-of -{ - local result d ; - for d in $(<:D) - { - if $(d) = "" - { - result += $(DOT) ; - } - else - { - result += $(d) ; - } - } - return $(result) ; -} - -# top-relative-tokens path -# -# Returns a list of path elements which form the relative path from TOP to path, -# which is expected to be given relative to the current subproject. -rule top-relative-tokens -{ - return [ simplify-path-tokens $(SUBDIR_TOKENS) [ split-path $(<) ] ] ; -} - -.project-root-tokens = [ split-path $(.boost-build-file:D) ] ; - -# try to make a potentially absolute path relative to the project -# root. Only works for paths below the project root right now; others -# will remain absolute. -rule relative-path ( path ) -{ - local path-tokens = [ split-path $(path) ] ; - - # try to strip the project root - local r = $(.project-root-tokens) ; - local p = $(path-tokens) ; - while $(r) && ( $(r[1]) = $(p[1]) ) - { - p = $(p[2-]) ; - r = $(r[2-]) ; - } - - # if successful, use the stripped project root - if ! $(r) - { - path-tokens = $(p) ; - } - - return [ tokens-to-simple-path $(path-tokens) ] ; -} - -# dependent-include target-path... -# -# For each target-path, ensure that the appropriate Jamfile has been -# included. Used when a target declares its dependency on another target. -rule dependent-include -{ - local target ; - for target in $(<) - { - { - local .project-path = [ target-path-of $(target) ] ; - .project-path = $(.project-path:D) ; - - # load the file as a dependent. - local gIN_LIB_INCLUDE = TRUE ; - - # - local [ protect-subproject ] ; - local .project-name-and-subdir = [ enter-subproject $(.project-path) ] ; - local .project-name = $(.project-name-and-subdir[1]) ; - local .project-subdir = $(.project-name-and-subdir[2]) ; - local .jamfile-path = [ root-paths $(JAMFILE) : [ root-paths $(.project-subdir) : $(TOP) ] ] ; - - load-jamfiles $(.jamfile-path) ; - } - } -} - -# segregate-free-properties variable1 variable2... -# -# returns the and removes the unique list of free properties from -# $(variable1) $(variable2)... -rule segregate-free-properties -{ - local free-properties = [ unique [ get-properties $(gFREE_FEATURES) : $($(<)) ] ] ; - local v ; - for v in $(<) - { - $(v) = [ difference $($(v)) : $(free-properties) ] ; - } - return $(free-properties) ; -} - -# is-link-compatible feature : value1 : value2 -# -# return non-empty iff a library built with value1 can be linked into a -# target with value2, empty otherwise -rule is-link-compatible ( feature : value1 : value2 ) -{ - return [ intersection - $(feature) $(value1:G=$(feature)) - $(value1:G=$(feature))$(SLASH)$(value12:G=$(feature)) - $(value2:G=$(feature)) - : $(gLINK_COMPATIBLE) ] ; -} - -# find-compatible-subvariant main-target : toolset variant : dependent-simple-properties -rule find-compatible-subvariant ( main-target : toolset variant : dependent-simple-properties * ) -{ - # calculate the subvariant only of what is requested - # the subvariant requested... - local sv-request = - [ multiply-property-sets - [ get-properties $(BUILD:G) : $(dependent-simple-properties) ] ] ; - # the available build requests... - local build-requests = - [ multiply-property-sets [ select-gristed $(BUILD) ] ] ; - # the build requst we want to build... - local sv-build = - [ intersection $(sv-request) : $(build-requests) ] ; - sv-build ?= "" ; - local BUILD = $(variant) [ split-path $(sv-build) ] ; - local gTARGET_DEFAULT_BUILD($(main-target)) = ; - # the full subvariant to build... - local subvariant = [ expand-target-subvariants $(main-target) : $(variant) : $(toolset) ] ; - - local sv-target = ; local sv-properties = ; local sv-toolset = ; local sv-variant = ; - split-target-subvariant sv-target sv-properties sv-toolset sv-variant : $(subvariant) ; - local sv-overrides = - [ difference $(dependent-simple-properties) : [ select-gristed $(sv-properties) ] ] ; - sv-overrides += - [ get-properties - [ difference $(dependent-simple-properties:G) : $(sv-overrides:G) ] : $(sv-properties) ] ; - - if ! $(gTARGET_TYPE($(main-target))) - { - EXIT unknown dependent target $(main-target) ; - } - - # check to make sure we can link against the subvariant - local target-requirements - = [ select-gristed $(gTARGET_REQUIREMENTS($(main-target))) ] ; - local override-conflicts - = [ get-properties $(target-requirements:G) $(gALWAYS_RELEVANT) : $(sv-overrides) ] ; - for local sv-override in $(override-conflicts) - { - local sv-required = [ get-values $(sv-override:G) : $(sv-properties) ] ; - if $(sv-override:G=) != $(sv-required) && - ! [ is-link-compatible $(sv-override:G) : $(sv-override:G=) : $(sv-required) ] - { - EXIT $(main-target): required property $(sv-override:G)$(sv-required) - incompatible with $(sv-override) ; - } - } - - # now that we have a mostly (or completely) compatible subvariant do the overrides - local gTARGET_REQUIREMENTS($(main-target)) = - # property rules... - [ select-ungristed $(gTARGET_REQUIREMENTS($(main-target))) ] - # always relevant properties to target... - [ difference - $(target-requirements) : - [ get-properties [ difference $(sv-overrides:G) : $(gALWAYS_RELEVANT) ] : $(target-requirements) ] ] - # link compatible properties, on the target... - [ get-properties - [ difference $(sv-overrides:G) : $(gALWAYS_RELEVANT) ] : $(target-requirements) ] - # overrides from dependent... - [ get-properties - [ difference $(sv-overrides:G) : $(override-conflicts:G) ] : $(dependent-simple-properties) ] - ; - subvariant = [ expand-target-subvariants $(sv-target) : $(sv-variant) : $(sv-toolset) ] ; - split-target-subvariant sv-target sv-properties sv-toolset sv-variant : $(subvariant) ; - - return $(sv-properties) ; -} - - -# For each target specified in libs, generate build instructions -# for a subvariant that can be linked with a dependent target with -# dependent-properties, returning a list of all generated targets. -rule link-libraries ( libs * : toolset variant : dependent-simple-properties * ) -{ - local lib-path result ; - - for lib-path in $(libs) - { - local lib-path = [ target-path-of $(lib-path) ] ; - local lib-target = [ target-id-of $(lib-path) ] ; - - # Enter the dependee subproject - local [ protect-subproject ] ; - enter-subproject [ directory-of $(lib-path) ] ; - - local lib-subvariant = [ - find-compatible-subvariant $(lib-target) - : $(toolset) $(variant) - : $(dependent-simple-properties) ] ; - - # Generate build instructions for the library target - result += [ subvariant-target $(lib-target) : $(lib-subvariant) : $(toolset) $(variant) ] ; - } - return $(result) ; -} - -# Which configuration(s) to build if nothing is explicitly specified -DEFAULT_BUILD ?= debug ; - -# get-BUILD [target-default-build] -# -# pick the first of ($(BUILD), $(>), $(DEFAULT_BUILD)) which is set. If it -# contains no variants, add variants from $(DEFAULT_BUILD). -rule get-BUILD -{ - local build = $(BUILD) ; - build ?= $(<) ; - build ?= $(DEFAULT_BUILD) ; - local variants = [ select-ungristed $(build) ] ; - if ! $(variants) - { - build += [ select-ungristed $(DEFAULT_BUILD) ] ; - } - return $(build) ; -} - -# declare-fake-targets abstract-target : target-file -# -# -rule declare-fake-targets -{ - # make a fake target so that it can be built without knowing the suffix - # Since executables under *NIX have no suffix, we'd better check - if $(>) != $(<) - { - DEPENDS $(<) : $(>) ; - NOTFILE $(<) ; - } - - # The following checks that we're in the subdirectory of Jam's invocation - # so that we can arrange for ungristed target names to be built from the - # command-line. - if $(<:G) && [ in-invocation-subdir ] - { - DEPENDS $(<:G=) : $(<) ; # allows $(<:G=) to be used to build all variants - NOTFILE $(<:G=) ; - } -} - -# declare-target-type TYPE : [[]]value... -rule declare-target-type -{ - gTARGET_TYPE_REQUIREMENTS($(<)) = $(>) ; -} - -declare-target-type DLL : true ; - -if $(NT) -{ - gIMPORT_SUFFIX(DLL) = .lib ; - gIMPORT_SUFFIX(LIB) = .lib ; - gEXPORT_SUFFIX(DLL) = .lib ; -} -else -{ - gIMPORT_SUFFIX(DLL) = .so ; - gIMPORT_SUFFIX(LIB) = .a ; -} - -# -# prepare path constants -# -{ - # The names of path variables that are set on targets - .run-path-vars = LD_LIBRARY_PATH PATH PYTHONPATH ; - - for local v in $(.run-path-vars) - { - .shell-var($(v)) = $(v) ; - } - - # Dynamic libraries are actually found on PATH - if $(NT) || ( $(UNIX) = CYGWIN ) - { - .shell-var(LD_LIBRARY_PATH) = PATH ; - } - - # Dynamic libraries search path var is loader, and hence system, dependant. - else - { - .shell-var(LD_LIBRARY_PATH) = $(gSHELL_LIBPATH) ; - } - - # The names of path variables in the shell - .run-path-shell-vars = [ unique $(.shell-var($(.run-path-vars))) ] ; - - # Record the original value of each shell variable - for local v in $(.run-path-shell-vars) - { - .run-path-shell-var-value($(v)) = $($(v)) ; - } - - if $(NT) - { - .env-prefix = % ; - .env-suffix = % ; - } - else - { - .env-prefix = "$" ; - .env-suffix = "" ; - } -} - - - -# Helper -rule depend-on-libs ( targets + : libs * ) -{ - LIBPATH on $(<) += [ unique $(gLOCATE($(>))) ] ; - DEPENDS $(<) : $(>) ; - library-dependencies on $(<) += $(>) ; - - # To run these targets, we need everything needed to run the libraries - for local v in $(.run-path-vars) - { - gRUN_$(v)($(<)) = [ unique $(gRUN_$(v)($(<))) $(gRUN_$(v)($(>))) ] ; - } -} - -rule depend-on-static ( targets + : static-libs * ) -{ - local NEEDLIBS = [ unique $(NEEDLIBS) $(>) ] ; - NEEDLIBS on $(<) = [ on $(<) return [ unique $(NEEDLIBS) $(>) ] ] ; - depend-on-libs $(targets) : $(static-libs) ; -} - -rule depend-on-shared ( targets + : dlls-and-import-libs * ) -{ - local linkable ; - - # collect the linkable elements of the source libs into the appropriate variables - for local f in $(dlls-and-import-libs) - { - local v = $(gLINK_VARIABLE($(f:S))) ; - $(v) += $(f) ; - $(v) on $(targets) += $(f) ; - if $(v) - { - linkable += $(f) ; - } - } - - FINDLIBS on $(<) += [ unique $(gTARGET_BASENAME($(gTARGET_SUBVARIANT($(>))))) ] ; - - depend-on-libs $(targets) : $(dlls-and-import-libs) ; -} - -# Given build properties, returns the normalised version of the features for -# use by rename-targets. -rule get-tag-features ( variant : build-properties * ) -{ - local result = ; - local tags = [ get-properties : $(build-properties) ] ; - for local tag in $(tags) - { - tag = $(tag:G=) ; - if $(tag:G) - { - result += $(tag) ; - } - else - { - result += <$(variant)>$(tag) ; - } - } - return $(result) ; -} - -rule generate-dependencies ( main-target : subvariant-targets + ) -{ - local dependencies = $(gTARGET_DEPS($(main-target))) ; - { - # Protect target variables against modification while lib dependencies - # are built. They will be made empty here, and restored when this scope exits - local $(gTARGET_VARIABLES) ; - - # extract the simple properties from dependent-properties - local p = $(gBUILD_PROPERTIES) ; - segregate-free-properties p ; - - # generate library build instructions - local BUILD = $(BUILD) ; - BUILD ?= $(gTARGET_DEFAULT_BUILD($(main-target))) ; - - for t in static shared - { - local lib-main-targets = [ get-values <$($(t:U)_TYPES)> : $(dependencies) ] ; - - local lib-targets - = [ link-libraries $(lib-main-targets) - : $(gCURRENT_TOOLSET) $(variant) : $(p) - ] ; - depend-on-$(t) $(subvariant-targets) : $(lib-targets) ; - } - } -} - -# Given main-target, a main target name gristed with $(SOURCE_GRIST), generate build -# instructions for a subvariant target using the given toolset, variant, etc. -# -# RETURNS: the a list of target names for the files built by the subvariant. If -# the main-target is a library, the first filename is the one that should be linked -# into a dependent target. -rule subvariant-target ( main-target : subvariant-id build-properties * : toolset variant ) -{ - # SOURCE_GRIST identifies the subproject directory; TARGET_GRIST will identify - # the target and subvariant, since unique versions of files will be built for - # that combination. - local property-tags = [ get-tag-features $(variant) : $(build-properties) ] ; - local tags = [ get-properties : $(gIMPOSED_REQUIREMENTS($(main-target))) ] $(property-tags) ; - local TARGET_GRIST = [ join-path $(SOURCE_GRIST) $(main-target:G=) $(subvariant-id) ] ; - local subvariant = $(main-target:G=$(TARGET_GRIST)) ; - - # Keep track of the generated targets. - if ! $(TARGET_GRIST) in $(gDECLARED_TARGETS) - { - gDECLARED_TARGETS += $(TARGET_GRIST) ; - } - - # Make sure we know how to generate these types of targets. - local target-type = $(gTARGET_TYPE($(main-target))) ; - if ! $(target-type) - { - EXIT unknown target type for $(main-target) ; - } - - gTARGET_TYPE($(subvariant)) = $(target-type) ; - - # LOCATE_TARGET affects where built targets are generated. We move it - # relative to the default location based on the subvariant - local LOCATE_TARGET - = [ join-path $(LOCATE_TARGET) $(main-target:G=) $(subvariant-id) ] ; - - # The renamed base name of the target. Only considers the tags defined directly - # on the target. - if $(gTARGET_NAME($(main-target))) - { - gTARGET_BASENAME($(main-target)) = - [ rename-target $(gTARGET_NAME($(main-target))) : [ split-path [ ungrist $(subvariant:G) ] ] : $(property-tags) ] ; - } - - # First order names have the suffix, if any according to the platform. - local target-files = [ FAppendSuffix $(subvariant) : $(SUF$(target-type)) ] ; - # Second order names have any tags as imposed from stage target contexts. - target-files = [ rename-target $(target-files) : [ split-path [ ungrist $(subvariant:G) ] ] : $(tags) ] ; - # Third order names are customized as determined by a rename rule on the target type. - if $(gNAME_ADJUST($(target-type))) - { - target-files = [ - $(gNAME_ADJUST($(target-type))) $(target-files) - : $(subvariant-id) $(build-properties) - : $(toolset) $(variant) ] ; - gTARGET_TYPE($(target-files[1])) = $(target-type) ; - } - - # Do nothing if we already have the build instructions for the specific - # target files of this subvariant target. - if ! $(target-files) in $(gTARGET_FILES($(main-target))) - { - gTARGET_SUBVARIANT($(target-files)) = $(main-target) ; - - ###gTARGET_FILES($(subvariant)) = $(target-files) ; - gTARGET_FILES($(main-target)) += $(target-files) ; - - # Remember the path from the build root to the subvariant directory - gSUBVARIANT_PATH($(subvariant)) = $(subvariant-id) ; - - # Add target suppression if was in the requirements - local gSUPPRESS_FAKE_TARGETS = [ get-values : $(gTARGET_REQUIREMENTS($(main-target))) ] $(gSUPPRESS_FAKE_TARGETS) ; - - declare-fake-targets $(main-target) : $(target-files) ; - - # set up gBUILD_PROPERTIES for include-tools (below) - local gBUILD_PROPERTIES = $(build-properties) ; - - # Include the toolset specification. This will set up the global flags - # variables in a way appropriate to this build. - - include-tools $(toolset) ; - - # headers should be identified specific to the target, since search paths - # may differ for different subvariants. The same header name or relative - # path may refer to different files. - local HDRGRIST = [ join $(SOURCE_GRIST) $(STDHDRS) $(SYSHDRS) $(HDRS) "" : "#" ] ; - - # transfer target variables to the target file. - set-target-variables $(target-files) ; - - local dependencies - = [ get-values <$(STATIC_TYPES)> <$(SHARED_TYPES)> - : $(gTARGET_DEPS($(main-target))) - ] ; - - if $(dependencies) - { - # include each jamfile describing a dependee target. - dependent-include $(dependencies) ; - generate-dependencies $(main-target) : $(target-files) ; - } - - local generator = $(gGENERATOR_FUNCTION($(target-type))) ; - local sources = $(gTARGET_SOURCES($(main-target))) ; - $(generator) $(target-files) : $(sources) ; - - $(gTARGET_VARIABLES) = ; # Be sure that we don't mask bugs with lingering target variables - } - return $(target-files) ; -} - -# Generate the expanded subvariants of a target. -# -rule expand-target-subvariants ( target : local-build * : tools + : ) -{ - local BUILD = [ get-BUILD $(local-build) ] ; - local variants = [ select-ungristed $(BUILD) ] ; - local build-request = [ difference $(BUILD) : $(variants) ] ; - - local subvariants = ; - for local toolset in $(tools) - { - for local variant in $(variants) - { - local rules = [ select-ungristed - $(gTARGET_REQUIREMENTS($(target))) - $(gIMPOSED_REQUIREMENTS($(target))) ] ; - local requirements = [ select-gristed - $(gTARGET_REQUIREMENTS($(target))) - $(gIMPOSED_REQUIREMENTS($(target))) ] ; - - local expanded - = [ expand-build-request $(toolset) $(variant) $(target) - : $(requirements) : $(build-request) ] ; - - local gNOWARN_INCOMPATIBLE_BUILDS = TRUE ; - - for local instance in $(expanded) - { - local properties = [ split-path-at-grist $(instance) ] ; - for local r in $(rules) - { - properties = [ $(r) $(toolset) $(variant) : $(properties) ] ; - } - - if ! ( no in $(properties) ) - { - # the rules may have modified the build request, reconstruct it - properties = [ expand-build-request $(toolset) $(variant) $(target) - : $(properties[2-]) : $(build-request) ] ; - - subvariants += $(target)|$(properties)|$(toolset)|$(variant) ; - } - else if --dump-unbuilt - { - ECHO **** skipping build of $(target); toolset= $(toolset) variant= $(variant) **** ; - } - } - } - } - return [ unique $(subvariants) ] ; -} - -# Given an expanded subvariant of a terget, sets the various variables accordingly. -# -rule split-target-subvariant ( target-var properties-var toolset-var variant-var : subvariant ) -{ - local subvariant-items = [ MATCH (.*)[|](.*)[|](.*)[|](.*) : $(subvariant) ] ; - $(target-var) = $(subvariant-items[1]) ; - $(properties-var) = [ split-path-at-grist $(subvariant-items[2]) ] ; - $(toolset-var) = $(subvariant-items[3]) ; - $(variant-var) = $(subvariant-items[4]) ; - return $((target-var)) ; -} - -# main-target target : local-build -# -# Generates requested subvariant build instructions for the given main target -rule main-target -{ - local subvariants = [ expand-target-subvariants $(<) : $(>) : $(TOOLS) ] ; - - # include each jamfile describing a dependee target. - dependent-include [ get-values <$(STATIC_TYPES)> <$(SHARED_TYPES)> : $(gTARGET_DEPS($(<))) ] ; - - for local subvariant in $(subvariants) - { - local target = ; - local properties = ; - local toolset = ; - local variant = ; - split-target-subvariant target properties toolset variant : $(subvariant) ; - subvariant-target $(target) : $(properties) : $(toolset) $(variant) ; - } -} - -# Declare an executable target. -# -gTARGET_TYPE_ID(exe) = EXE ; -gGENERATOR_FUNCTION(EXE) = executable-file ; -rule exe ( target : sources + : requirements * : default-build * ) -{ - declare-local-target $(target) : $(sources) : $(requirements) : $(default-build) : EXE ; -} - -# Declare a shared library target. -# -gTARGET_TYPE_ID(dll) = DLL ; -gGENERATOR_FUNCTION(DLL) = dll-files ; -gIS_DEPENDENCY(DLL) = TRUE ; -rule dll ( target : sources + : requirements * : default-build * ) -{ - if $(JAMUNAME[1]) = OpenBSD - { - if ! [ get-values : $(requirements) ] - { - requirements += 0.0 ; - } - } - declare-local-target $(target) : $(sources) : $(requirements) : $(default-build) : DLL ; -} - -# Declare a statically-linked library target. -# -gTARGET_TYPE_ID(lib) = LIB ; -gGENERATOR_FUNCTION(LIB) = library-file ; -gIS_DEPENDENCY(LIB) = TRUE ; -rule lib ( target : sources + : requirements * : default-build * ) -{ - declare-local-target $(target) : $(sources) : $(requirements) : $(default-build) : LIB ; -} - -# Declare a template target for other targets. This is a modifier only. It -# Adds the specs specified here to any other target it's a dependee of. -# -gTARGET_TYPE_ID(template) = TEMPLATE ; -gMODIFIER_FUNCTION(TEMPLATE) = template-modifier ; -gIS_DEPENDENCY(TEMPLATE) = TRUE ; -gNO_TARGET_TYPE_REQUIREMENT(TEMPLATE) = TRUE ; -rule template ( target : sources * : requirements * : default-build * ) -{ - declare-local-target $(target) : $(sources) : $(requirements) : $(default-build) : TEMPLATE ; -} - -# Declare an executable target, to be run by tests. -rule unit-test ( target + : sources + : requirements * : default-build * : cmd-line * ) -{ - if ! $(.testing.jam-included) - { - SEARCH on testing.jam = $(BOOST_BUILD_PATH) ; - include testing.jam ; - } - - DEPENDS all - : [ run $(sources) - : $(cmd-line) - : # input-files - : $(requirements) - : $(target) - : $(default-build) - ] - ; -} - -# Used to build command files from a list of sources. -rule build-command-file ( command : sources * : prefix ? line-break ? ) -{ - # Clean up after ourselves - Clean clean : $(command) ; - - DEPENDS $(command) : $(sources) ; - - PREFIX on $(command) = $(prefix:E=) ; - - local ' _ = "" ; - - if ! $(NT) - { - ' = ' ; - _ = " " ; - } - - ' on $(command) = $(') ; - _ on $(command) = $(_) ; - - EOL on $(command) = \"$(line-break:E=)$(')$(_)>>$(_)\" ; - BOL on $(command) = "\" -echo $(')$(prefix:E=)\"" ; - - # Check whether there's anything to dump, so that we don't end up - # executing a line of the form: - # - # echo >> file.CMD - # - # on Windows this writes "echo is on." into the command-file, - # which then breaks the link. - - if $(sources) - { - # Handle the first target specially, so that the first source file - # will clear the command file - command-file-dump $(command) : $(sources) ; - } -} - -# Quietly delete $(x) if it exists with $(RM1)"$(x)" -if $(NT) -{ - RM1 = "IF EXIST " "DEL " ; -} -else -{ - RM1 = "$(RM) " ; -} - -# Build the command-file -actions quietly command-file-dump -{ - $(RM1)"$(<)" - echo $(')$(PREFIX)"$(>:J=$(EOL)$(<)$(BOL))"$(')$(_)>>$(_)$(<) -} - -# Clean up the temporary COMMAND-FILE used to build TARGETS. -rule remove-command-file ( targets + : command-file ) -{ - TEMPORARY $(command-file) ; - Clean clean : $(command-file) ; # Mark the file for removal via clean -} -actions ignore quietly piecemeal together remove-command-file -{ - $(RM) $(>) -} - -# build TARGETS from SOURCES using a command-file, where RULE-NAME is -# used to generate the build instructions from the command-file to -# TARGETS -rule with-command-file ( rule-name targets * : sources * : prefix ? line-break ? ) -{ - # create a command-file target and place it where the first target - # will be built - local command-file = $(targets[1]:S=.CMD) ; - LOCATE on $(command-file) = $(gLOCATE($(targets[1]))) ; - build-command-file $(command-file) : $(sources) : $(prefix) $(line-break) ; - - # Build the targets from the command-file instead of the sources - DEPENDS $(targets) : $(command-file) ; - local result = [ $(rule-name) $(targets) : $(command-file) ] ; - - # clean up afterwards - # Can't really do this until arguments are accounted for. - # remove-command-file $(targets) : $(command-file) ; - return $(result) ; -} - -TAG(prefix) = "" ; -TAG(postfix) = "" ; - -# GIVEN: -# -# A target subvariant, the subvariant info, and a set of rename tags. -# -# RESULT: -# -# Uses the rename tags, and the global TAG map, to append a tag to the -# target basename. The new subvariant target is returned. The tag for -# the target is composed from the subvariant info and the corresponding -# entry in the tags. This creates the tag in the order as given by the -# subvariant info. -# -# EXAMPLE: -# -# [ rename-target libtest.so : gcc debug : _gcc _debug ] -# -# RETURNS: -# -# libtest_gcc_debug.so -# -rule rename-target ( target + : subvariant * : tags * ) -{ - local tag-values = ; - for local tag in $(tags) - { - local tag-tokens = [ MATCH (<)(.*)(>)(.*) : $(tag:G=) ] ; - tag-tokens = $(tag-tokens[2]) $(tag-tokens[4]) ; - tag-values += $(tag-tokens[2]:G=$(tag-tokens[1])) ; - } - - local tag-text = "" ; - - # the prefix of the tag... - # - local prefix-tag = [ get-values : $(tag-values) $(TAG(prefix):G=prefix) ] ; - tag-text = $(prefix-tag[1]) ; - - # the subvariant tags... - # - for local sv in $(subvariant) - { - local sv-tag = [ get-values <$(sv)> : $(tag-values) $(TAG($(sv)):G=$(sv)) ] ; - if $(sv-tag) - { - tag-text = $(tag-text)$(sv-tag[1]) ; - } - } - - # the postfix of the tag... - # - local postfix-tag = [ get-values : $(tag-values) $(TAG(postfix):G=postfix) ] ; - tag-text = $(tag-text)$(postfix-tag[1]) ; - - local renamed-target = ; - for local t in $(target) - { - local B-S = [ MATCH ([^\\.]*)(.*) : $(t:G=) ] ; - local B = $(B-S[1]) ; B ?= "" ; - local S = $(B-S[2]) ; S ?= "" ; - local new-name = $(B)$(tag-text)$(S) ; new-name = $(new-name:G=$(t:G)) ; - renamed-target += $(new-name) ; - } - return $(renamed-target) ; -} - -rule grist-targets ( targets + : subdir-tokens * ) -{ - local subdir-grist = "" ; - if $(subdir-tokens) - { - subdir-grist = [ FGrist $(subdir-tokens) ] ; - if $(SOURCE_GRIST) - { - subdir-grist = "!$(subdir-grist)" ; - } - } - if ! $(SOURCE_GRIST) - { - return $(targets:G=$(subdir-grist)) ; - } - else - { - return $(targets:G=$(SOURCE_GRIST)$(subdir-grist)) ; - } -} - -# EXAMPLE: -# -# stage test-stage -# : foo/bar/test1 qwerty/keys docs/README -# : "_" "D" "P" "GCC" -# : debug profile true -# ; -# -# PRODUCES: -# -# test-stage/libkeys_GCCD.so -# test-stage/libkeys_GCCP.so -# test-stage/test1_GCCD -# test-stage/test1_GCCP -# test-stage/README -# -# IFF: -# -# $shell> jam test-stage -# -rule stage ( name : sources + : requirements * : local-build * ) -{ - if ! $(gIN_LIB_INCLUDE) - { - - local stage-id = - [ grist-targets $(name) ] ; - local arch-subdirs = [ get-values : $(requirements) ] ; - local tree-root = [ get-values : $(requirements) ] ; - if $(tree-root) { tree-root = [ split-path $(tree-root[1]) ] ; } - local locate = [ get-values : $(requirements) ] ; - if $(locate) { locate = [ split-path $(locate) ] ; } - local fake-target = [ get-values : $(requirements) ] ; - local rename-rule = [ get-values : $(requirements) ] ; - - # Supress the regular build of this target - local gSUPPRESS_FAKE_TARGETS = [ get-values : $(local-build) ] ; - - local stage-dir = $(name:G=) ; - local files ; - local file-mode ; - local file-tagged ; - local file-subdir ; - - # Prevent built object from getting deleted so that when targets are linked - # multiple times they are available. - local KEEPOBJS = true ; - - # For each source, collect its information, and possibly generate it. - # - for local source in $(sources) - { - source = [ split-qualified-property $(source) ] ; - local source-build = [ MATCH "^<([^>]*)>" : $(source[1-2]) ] ; - source = [ expand-source-names $(source[3]) ] ; - - if $(source:G) - { - local gIN_LIB_INCLUDE = TRUE ; - - local target = $(source:D=:G=) ; - local target-id = [ target-id-of $(source) ] ; - local target-subdir = [ directory-of [ target-path-of $(source) ] ] ; - - dependent-include $(source:G=) ; - local gIMPOSED_REQUIREMENTS($(target-id)) = $(requirements) ; - local subvariants = [ expand-target-subvariants $(target-id) : $(local-build) : $(TOOLS) ] ; - - for local subvariant in $(subvariants) - { - local s-target = ; - local s-properties = ; - local s-toolset = ; - local s-variant = ; - split-target-subvariant s-target s-properties s-toolset s-variant : $(subvariant) ; - local s-subdir ; - if $(arch-subdirs) - { - local arch = [ get-values : $(s-properties) ] ; - arch ?= [ get-values : $(s-properties) ] ; - arch ?= $(OSPLAT:L) ; - if $(arch) = "default" { arch = $(OSPLAT:L) ; } - arch += [ get-values : $(s-properties) ] ; - arch += $(OS:L) ; - s-subdir = $(arch:J=-) ; - } - - local source-build-rule = [ MATCH "[`]([^`]+)[`]" : $(source-build[2]) ] ; - if ( $(s-toolset) = $(source-build[1]) || $(source-build[1]) = * ) && - ( $(s-variant) = $(source-build[2]) || $(source-build[2]) = * ) || - $(source-build-rule) && [ $(source-build-rule) $(s-toolset) $(s-variant) ] - { - - local target-subvariant = ; - { - local [ protect-subproject ] ; - enter-subproject $(target-subdir) ; - target-subvariant = - [ subvariant-target $(s-target) : $(s-properties) : $(s-toolset) $(s-variant) ] ; - } - - local sv-files = ; - for local sv in $(target-subvariant) - { - local sv-file = $(gFILES($(sv))) ; - sv-file ?= $(sv) ; - sv-files += $(sv-file) ; - } - sv-files = [ unique $(sv-files) ] ; - for local sv in $(sv-files) - { - local renamed-target ; - local split-properties = [ split-path $(s-properties[1]) ] ; - for local rr in $(rename-rule) - { - renamed-target += [ $(rr) $(sv) : $(split-properties) ] ; - } - renamed-target ?= - [ rename-target $(sv) : [ split-path $(s-properties[1]) ] : ] ; - - files += $(sv) ; - file-mode($(sv)) = $($(gTARGET_TYPE($(s-target)))MODE) ; - file-tagged($(sv)) = $(renamed-target) ; - file-subdir($(sv)) = $(s-subdir) ; - } - - } - } - } - else - { - local renamed-file ; - for local rr in $(rename-rule) - { - renamed-file += [ $(rr) $(source) ] ; - } - renamed-file ?= $(source) ; - - files += $(source) ; - file-tagged($(source)) = $(renamed-file) ; - } - } - - # Generate and collect the file copy build instructions. If we - # are getting defined in the dependent phase skip the actual instructions. - # - local destination-files = ; - local result-files = ; - local locate-target = $(locate) ; - if $(ALL_LOCATE_TARGET) - { - locate-target ?= [ join-path [ split-path $(ALL_LOCATE_TARGET) ] $(SUBDIR_TOKENS) ] ; - } - locate-target ?= [ split-path $(SUBDIR) ] ; - for local file in $(files) - { - local destination-file ; - local destination-subdir ; - if $(file:G) - { - destination-file = $(file-tagged($(file)):G=:D=) ; - destination-subdir = $(file-subdir($(file))) ; - } - else - { - destination-file = $(file-tagged($(file)):D=) ; - if $(tree-root) - { - destination-subdir = [ strip-initial $(tree-root) : [ split-path $(file:D) ] ] ; - } - } - destination-file = - [ grist-targets $(destination-file) : [ split-path $(stage-dir) ] $(destination-subdir) ] ; - destination-files += $(destination-file) ; - { - local FILEMODE = $(FILEMODE) ; - if $(file-mode($(file))) { FILEMODE = $(file-mode($(file))) ; } - MakeLocate $(destination-file) : - [ FDirName $(locate-target) [ split-path $(stage-dir) ] $(destination-subdir) ] ; - for local df in $(destination-file) - { - result-files += $(df) ; - FileClone $(df) : $(file) ; - } - local target = $(stage-id) $(destination-subdir) $(destination-file:G=) ; - declare-fake-targets $(target:J=/) : $(destination-file) ; - } - } - - # Don't expose fake targets when suppressing default builds. - # But honor requirement to expose sources through given . - # - if ! $(fake-target) - { - declare-fake-targets $(stage-id:G=) : $(destination-files) ; - } - else - { - if $(gSUPPRESS_FAKE_TARGETS) - { - declare-fake-targets $(fake-target) : $(files) ; - } - else - { - declare-fake-targets $(fake-target) : $(destination-files) ; - } - } - - Clean clean : $(destination-files) ; - - return $(result-files) ; - - } -} - -# GIVEN: -# -# A bare target, either with or without grist. -# -# RETURNS: -# -# The fully qualified and gristed target ID. -# -# EXAMPLE: -# -# [ target-id-of ../../sub1/sub2/test.dll ] -# -# RETURNS: -# -# test.dll -# -rule target-id-of ( target-ref ) -{ - local grist = $(target-ref:G) ; - local target = $(target-ref:G=) ; - while $(target:G) - { - grist += $(target:G) ; - target = $(target:G=) ; - } - local path = [ directory-of $(target) ] ; - if ! [ MATCH "^(@)" : $(path) ] - { - path = [ join @$(PROJECT) [ simplify-path-tokens [ top-relative-tokens $(path) ] ] : / ] ; - } - local tokens = [ split-path $(path) ] ; - local project-name = [ MATCH "^@([^/\\]+)" : $(tokens[1]) ] ; - if $(project-name) - { - tokens = $(tokens[2-]) ; - } - project-name ?= $(PROJECT) ; - local SOURCE_GRIST = [ FGrist @$(project-name) [ simplify-path-tokens $(tokens) ] ] ; - local target-id = [ FGristFiles $(target:D=) ] ; - return $(target-id) ; -} - -# -# -rule target-path-of ( target-ref ) -{ - local grist = $(target-ref:G) ; - local target = $(target-ref:G=) ; - while $(target:G) - { - grist += $(target:G) ; - target = $(target:G=) ; - } - local path = [ directory-of $(target) ] ; - if ! [ MATCH "^(@)" : $(path) ] - { - path = [ join @$(PROJECT) [ simplify-path-tokens [ top-relative-tokens $(path) ] ] : / ] ; - } - path = $(path)/$(target:D=) ; - if $(grist) - { - path = $(grist:J="")$(path) ; - } - return $(path) ; -} - -# Common rules for generating a single tag based on the -# variant, build properties, and the toolset used to build. -# To use place this rule name in the requirementes section of -# a stage target. -# -# The tag is constructed as such: -# -# [-][-][-][-] -# -# maps to an abbreviated name of the toolset -# and when possible and applicable the version of the toolset. -# -# "mt" when multi-threading is enabled. -# -# adds these single letter tags: -# "s" when static linking to runtime -# "g" when linking to debug runtime -# "y" when building debug-python variants -# "d" when building debug variants -# "p" when building with stlport libraries -# "n" when building with stlport and using native iostreams -# -# The tag added is a to allow for additional tags. -# -rule common-variant-tag ( toolset variant : properties * ) -{ - local tags = ; - - local thread-tag = ; - if multi in $(properties) { thread-tag = mt ; } - - local runtime-tag = ; - if static in $(properties) { runtime-tag += s ; } - if debug in $(properties) { runtime-tag += g ; } - if [ MATCH .*(debug-python).* : $(variant) ] { runtime-tag += y ; } - else { if [ MATCH .*(debug).* : $(variant) ] { runtime-tag += d ; } } - if [ MATCH .*(stlp).* : $(toolset) ] || - [ MATCH .*(stlp).* : $(properties:G) ] - { runtime-tag += p ; } - if off in $(properties) { runtime-tag += n ; } - - local toolset-tag = ; - if ! $(gUNVERSIONED_VARIANT_TAG) - { - local include-minor-version = YES ; - switch $(toolset) - { - case borland* : toolset-tag += bcb ; - case como* : toolset-tag += como ; - case cwpro8* : toolset-tag += cw 8 ; - case cwpro9* : toolset-tag += cw 9 ; - case cw-* : toolset-tag += cw ; include-minor-version = ; - case darwin* : toolset-tag += ; - case edg* : toolset-tag += edg ; - case gcc* : toolset-tag += gcc ; - case intel-linux* : toolset-tag += il ; - case intel-win32* : toolset-tag += iw ; - case kcc* : toolset-tag += kcc ; - case kylix* : toolset-tag += bck ; - case metrowerks* : toolset-tag += cw ; - case mingw* : toolset-tag += mgw ; - case mipspro* : toolset-tag += mp ; - case msvc* : toolset-tag += vc 6 ; - case sunpro* : toolset-tag += sw ; - case tru64cxx* : toolset-tag += tru ; - case vacpp* : toolset-tag += xlc ; - case vc[678][_]* : - { - toolset-tag += vc ; - toolset-tag += [ MATCH "vc([678])[_]([0123456789]*)" : $(toolset) ] ; - } - case vc[678]* : - { - toolset-tag += vc ; - toolset-tag += [ MATCH "vc([678])" : $(toolset) ] ; - } - case * : - toolset-tag += [ MATCH "^([^-]*)" : $(toolset) ] ; - } - if $(include-minor-version) - { - toolset-tag += [ MATCH "[-]([0123456789]+)[_.]([0123456789]*)" : $(toolset) ] ; - } - else - { - toolset-tag += [ MATCH "[-]([0123456789]+)[_.][0123456789]*" : $(toolset) ] ; - } - - # boost/config/auto_link.hpp expects toolset tags that do not always - # match the above algorithm for MSVC 6.x and 7.0. - # - switch $(toolset-tag:J=) - { - case vc6* : toolset-tag = vc 6 ; - case vc70 : toolset-tag = vc 7 ; - } - } - - local version-tag = ; - if ! $(gUNVERSIONED_VARIANT_TAG) - { - local version-number = [ get-values : $(properties) ] ; - version-number ?= $(BOOST_VERSION) ; - version-tag = [ MATCH "^([^.]+)[.]([^.]+)[.]([^.]+)" : $(version-number[1]) ] ; - if $(version-tag[3]) = 0 - { - version-tag = $(version-tag[1-2]) ; - } - version-tag = $(version-tag:J="_") ; - } - - tags += $(toolset-tag:J=) ; - tags += $(thread-tag:J=) ; - tags += $(runtime-tag:J=) ; - tags += $(version-tag) ; - - if $(tags) - { - return $(properties) <*><*>-$(tags:J=-) ; - } - else - { - return $(properties) ; - } -} - -# Recursive version of GLOB. Builds the glob of files while -# also searching in the subdirectories of the given root. -# -rule glob-tree ( root : patterns * ) -{ - local e ; - local f = [ GLOB $(root) : $(patterns) ] ; - local files ; - for e in $(f) - { - if $(e:D=) != CVS { files += $(e) ; } - } - local d = [ difference [ GLOB $(root) : * ] : $(files) ] ; - for e in $(d) - { - if ! ( $(e:D=) in . .. ) { files += [ glob-tree $(e) : $(patterns) ] ; } - } - return $(files) ; -} - -rule unless ( test * : no-value * : yes-value * ) -{ if ! $(test) { return $(no-value) ; } else { return $(yes-value) ; } } - -rule cond ( test * : yes-value * : no-value * ) -{ if $(test) { return $(yes-value) ; } else { return $(no-value) ; } } - -# If the toolset matches the given regex pattern, modify the -# subvariant-path and properties for static linking -rule force-NT-static-link ( pattern : toolset : subvariant-path properties * ) -{ - if $(NT) && [ MATCH $(pattern) : $(toolset) ] - { - properties = [ impose-requirements $(properties) : - static ] ; - } - - return $(subvariant-path) $(properties) ; -} - -# Stick this rule name in your requirements if you are building code -# which requires locale support. It handles the metrowerks-specific -# case that locale support demands the static version of the runtime -# library. -rule std::locale-support ( toolset variant : subvariant-path properties * ) -{ - return [ - force-NT-static-link .*(cw-8).* - : $(toolset) : $(subvariant-path) $(properties) - ] ; -} - -# Stick this rule name in your requirements if you are building code -# which requires facet support. It handles the intel-win32-specific -# case that facet support seems to demand the static version of the -# runtime library. -rule std::facet-support ( toolset variant : subvariant-path properties * ) -{ - return [ - force-NT-static-link .*(intel).* - : $(toolset) : $(subvariant-path) $(properties) - ] ; -} - -# load the specified modules if they haven't been loaded already. If -# the module has no suffix, ".jam" is appended. If the module name is -# prepended with a path, it is sought in that location relative to the -# current Jamfile, otherwise it is sought in BOOST_BUILD_PATH. -rule import ( modules + ) -{ - for local name in $(modules) - { - local search = $(BOOST_BUILD_PATH) ; # search here - local n = $(name:D=) ; # for this basename - if ! $(n:S) - { - n = $(n).jam ; - } - - # if a directory was specified - local d = $(name:D) ; - if $(d) - { - # Normalize the path relative to the invocation directory. - n = [ root-paths $(n) : $(d:R=$(SUBDIR)) ] ; - n = [ root-paths $(n) : [ PWD ] ] ; - search = ; # no searching; the path was specified. - } - - SEARCH on $(n) = $(search) ; - - if ! $($(n).included) - { - include $(n) ; - $(n).included = true ; - } - } -} - -# Declare a project's installable sources (raw sources or built targets) -# -rule install ( - name # The name to refer to these set of targets/sources. - type # The type of targets/sources, and therefore their install location. - : sources + # The targets and sources to make available for installation. - : options * - ) -{ - if $(gINSTALL_SOURCES) - { - local _include_ ; - if $(gINSTALL_INCLUSIONS) - { - if $(name) in $(gINSTALL_INCLUSIONS) - { - _include_ = true ; - } - } - else if ! $(name) in $(gINSTALL_EXCLUSIONS) - { - _include_ = true ; - } - if $(_include_) - { - local result ; - for local source in $(sources) - { - result += [ target-path-of $(source) ] ; - } - if ! $(result) in $(gINSTALL_SOURCES($(type))) - { - gINSTALL_SOURCES($(type)) += $(result) ; - } - return $(result) ; - } - } -} - -# -rule install-subinclude ( jamfiles + : options * ) -{ - local gINSTALL_SOURCES = TRUE ; - local gIN_LIB_INCLUDE = TRUE ; - local gINSTALL_EXCLUSIONS = [ get-values : $(options) ] ; - local gINSTALL_INCLUSIONS = [ get-values : $(options) ] ; - - for local jamfile in $(jamfiles) - { - local sub-jamfile = [ relative-path $(jamfile) ] ; - dependent-include $(sub-jamfile) ; - } -} - -# get project installation sources of a given type -rule install-sources ( type ) -{ - return $(gINSTALL_SOURCES($(type))) ; -} - -rule common-names ( ) -{ - return common-variant-tag ; -} -rule common-stage-tag ( toolset variant : subvariant-path properties * ) -{ - return [ common-variant-tag $(toolset) $(variant) : $(subvariant-path) $(properties) ] ; -} - -# Enforces toolset level requirements. This is added to all targets. -rule toolset::requirements ( toolset variant : subvariant-path properties * ) -{ - local requirements = ; - switch $(toolset) - { - case cwpro8* : - { - # dynamic runtime only comes in the multi-threading flavor - if dynamic in $(properties) { requirements += multi ; } - } - case cwpro9* : - { - # dynamic runtime only comes in the multi-threading flavor - if dynamic in $(properties) { requirements += multi ; } - } - case cw* : - { - # dynamic runtime only comes in the multi-threading flavor - if dynamic in $(properties) { requirements += multi ; } - } - case msvc* : - { - # dynamic runtime only comes in the multi-threading flavor - if dynamic in $(properties) { requirements += multi ; } - if [ MATCH .*(stlp).* : $(toolset) ] || - [ MATCH .*(stlp).* : $(properties:G) ] - { - # STLPort doesn't have any single-threaded builds, so we're going - # to force all such targets to be built with multithread support. - # This is essentially a usage-requirement on the stlport library. - requirements += multi ; - } - } - case vc* : - { - # dynamic runtime only comes in the multi-threading flavor - if dynamic in $(properties) { requirements += multi ; } - if [ MATCH .*(stlp).* : $(toolset) ] || - [ MATCH .*(stlp).* : $(properties:G) ] - { - # STLPort doesn't have any single-threaded builds, so we're going - # to force all such targets to be built with multithread support. - # This is essentially a usage-requirement on the stlport library. - requirements += multi ; - # STLPort doesn't support off with vc7 and vc8. - # This is essentially a usage-requirement on the stlport library. - switch $(toolset) - { - case vc7* : requirements += on ; - case vc8* : requirements += on ; - case vc-7* : requirements += on ; - case vc-8* : requirements += on ; - } - } - # vc8 doesn't have any single threaded runtime - switch $(toolset) - { - case vc-8* : requirements += multi ; - } - } - case intel-win32* : - { - # dynamic runtime only comes in the multi-threading flavor - if dynamic in $(properties) { requirements += multi ; } - } - case iw* : - { - # dynamic runtime only comes in the multi-threading flavor - if dynamic in $(properties) { requirements += multi ; } - } - } - if 5.0 in $(properties) - { - # STLPort-5 doesn't have any single-threaded builds, so we're going - # to force all such targets to be built with multithread support. - # This is essentially a usage-requirement on the stlport library. - requirements += multi ; - } - return $(subvariant-path) [ impose-requirements $(properties) : $(requirements) ] ; -} - -# Utility, to impose a subset of requirements onto a property set. -rule impose-requirements ( properties * : requirements * ) -{ - local requirements = [ unique $(requirements) ] ; - local free-feature-requirements = [ segregate-free-properties properties ] ; - properties = - [ sort - [ difference $(properties) : [ get-properties $(requirements:G) : $(properties) ] ] - $(requirements) - ] - $(free-feature-requirements) - ; - return $(properties) ; -} diff --git a/v1/bootstrap.jam b/v1/bootstrap.jam deleted file mode 100644 index 323b775b6..000000000 --- a/v1/bootstrap.jam +++ /dev/null @@ -1,43 +0,0 @@ -# (C) Copyright David Abrahams 2001. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# -# Enforce toolset names to be lowercase for consistency. This also -# removes bugs for incompatible names on file systems that are -# case-insensitive. -# -TOOLS = $(TOOLS:L) ; - -SEARCH on allyourbase.jam = $(BOOST_BUILD_PATH) ; -include allyourbase.jam ; -SEARCH on boost-base.jam = $(BOOST_BUILD_PATH) ; -include boost-base.jam ; - -# -# Now include the user's Jamfile. -# -{ - load-jamfiles $(JAMFILE) ; -} - -# -# Cause the targets specified in the command line to be updated -# -if $(JAM_VERSION) && $(JAM_VERSION:J="") >= 030101 && $(JAM_VERSION:J="") < 030104 -{ - # Only the last invocation of UPDATE takes effect; we must - # accumulate the entire list before invoking UPDATE. I always - # thought this was a confusing semantics, and probably the fact - # that the author of UPDATE got it wrong is proof. - - local t ; - for local e in $(ARGV[2-]) - { - if ! [ MATCH "^(-).*" : $(e) ] - { - t += $(e) ; - } - } - UPDATE $(t) ; -} diff --git a/v1/borland-5_5_1-tools.jam b/v1/borland-5_5_1-tools.jam deleted file mode 100644 index 20088776c..000000000 --- a/v1/borland-5_5_1-tools.jam +++ /dev/null @@ -1,14 +0,0 @@ -# (C) Copyright David Abrahams 2002. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# The following #// line will be used by the regression test table generation -# program as the column heading for HTML tables. Must not include version number. -#//Borland -{ - BCCROOT = $(BCC_551_ROOT) ; - extends-toolset borland ; - C++FLAGS = [ difference $(C++FLAGS) : -WU ] ; - CFLAGS = [ difference $(CFLAGS) : -WU ] -DBOOST_ALL_NO_LIB=1 ; - LINKFLAGS = [ difference $(LINKFLAGS) : -WU ] ; -} diff --git a/v1/borland-5_6_4-tools.jam b/v1/borland-5_6_4-tools.jam deleted file mode 100644 index d92f83b5b..000000000 --- a/v1/borland-5_6_4-tools.jam +++ /dev/null @@ -1,14 +0,0 @@ -# (C) Copyright David Abrahams 2002. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# The following #// line will be used by the regression test table generation -# program as the column heading for HTML tables. Must not include version number. -#//Borland -{ - BCCROOT = $(BCC_564_ROOT) ; - extends-toolset borland ; - C++FLAGS = [ difference $(C++FLAGS) : -WU ] ; - CFLAGS = [ difference $(CFLAGS) : -WU ] -DBOOST_ALL_NO_LIB=1 ; - LINKFLAGS = [ difference $(LINKFLAGS) : -WU ] ; -} diff --git a/v1/borland-5_8_2-tools.jam b/v1/borland-5_8_2-tools.jam deleted file mode 100644 index 590d6e702..000000000 --- a/v1/borland-5_8_2-tools.jam +++ /dev/null @@ -1,14 +0,0 @@ -# (C) Copyright David Abrahams 2002. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# The following #// line will be used by the regression test table generation -# program as the column heading for HTML tables. Must not include version number. -#//Borland -{ - BCCROOT = $(BCC_582_ROOT) ; - extends-toolset borland ; - C++FLAGS = [ difference $(C++FLAGS) : -WU ] ; - CFLAGS = [ difference $(CFLAGS) : -WU ] -DBOOST_ALL_NO_LIB=1 ; - LINKFLAGS = [ difference $(LINKFLAGS) : -WU ] ; -} diff --git a/v1/borland-tools.html b/v1/borland-tools.html deleted file mode 100644 index 126b2df65..000000000 --- a/v1/borland-tools.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - Boost.Build - borland toolset - - - - - - - - - - - -
-

C++ Boost

-
-

Boost.Build

- -

borland toolset

-
-
- -

Introduction

- -

Boost.Build's borland toolset - supports the Borland C++Builder (BCC - 5.5) compiler.

- -

Configuration Variables

The borland toolset responds to the - following variables which can be set in the environment or configured on - the jam command-line using - -sVARIABLE_NAME=value: - - - - - - - - - - - - - - - - - - - - - - - -
Variable NameSemanticsDefaultNotes
BCCROOTThe directory in which BCC was installed.(none)If not set the user must ensure that the tools, the bin directory - of BCC, is available as part of the executable search path.
-
- -

Revised - - 06 May, 2002

- -

Copyright © Dave Abrahams 2002.

- -

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

- - diff --git a/v1/borland-tools.jam b/v1/borland-tools.jam deleted file mode 100644 index dc8c2ea89..000000000 --- a/v1/borland-tools.jam +++ /dev/null @@ -1,211 +0,0 @@ -# (C) Copyright David Abrahams 2001. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# The following #// line will be used by the regression test table generation -# program as the column heading for HTML tables. Must not include version number. -#//Borland - -# Borland tool definitions. -# -# Please note that wide-character support is currently disabled for Borland in -# features.jam, pending someone taking the time to figure out how to get the -# appropriate libraries into the link command line. - -# BCCROOT is the install location of the borland tools. -set-as-singleton BCCROOT ; - -# Get these variable set on the targets so that we can re-use the -# build actions for other toolsets using this one as a base. -flags borland BCC_TOOL_PATH ; - -# compute Borland tool path -# You can either put the borland bin directory in your PATH, or you can set -# BCCROOT to point at the borland installation directory -BCC_TOOL_PATH = $(BCCROOT)$(SLASH)bin$(SLASH) ; -BCC_TOOL_PATH ?= "" ; # Don't clobber adjoining text if BCCROOT isn't set - -# specify compilation and link flags -flags borland CFLAGS on : -v ; -flags borland LINKFLAGS on : -v ; -flags borland CFLAGS off : -Od ; -flags borland CFLAGS speed : -O2 ; -flags borland CFLAGS space : -O1 ; - -# Borland has inlining bugs that affect destructors -# (http://lists.boost.org/boost-testing/2005/10/2079.php). Define -# this variable to force inlining for Borland to always be shut off. -# We decided it was a bad idea to do it by default, because it would -# hide bugs that users would see. -if ! $(.BORLAND_INLINING_BUG_BRUTE_FORCE_WORKAROUND) -{ - flags borland CFLAGS off : -vi- ; - flags borland CFLAGS on : -vi -w-inl ; - flags borland CFLAGS full : -vi -w-inl ; -} -else -{ - flags borland CFLAGS : -vi- ; -} - -# build the options common to the link and C/C++ command-lines -{ - local bcc-common-flags ; - - # this section sets up the target type (threading, - # RTL, and console/GUI options). The order in which - # these options appear is generally important, as some - # (such as -tWR) can have unexpected side effects. - - - local target-type = [ get-values : $(gBUILD_PROPERTIES) ] ; - if ! $(target-type) || ! ( $(target-type) in $(SHARED_TYPES) ) - { - flags borland bcc-common-flags console : -tWC ; - # -tWR sets -tW as well, so we turn it off here and then turn it - # on again later if we need it: - flags borland bcc-common-flags dynamic : -tWR -tWC ; - flags borland bcc-common-flags gui : -tW ; - } - else - { - flags borland bcc-common-flags dynamic : -tWR ; - } - - flags borland bcc-common-flags $(SHARED_TYPES) : -tWD ; - flags borland bcc-common-flags : -WM- ; - flags borland bcc-common-flags multi : -tWM ; - - flags borland LINKFLAGS : $(bcc-common-flags) ; - flags borland CFLAGS : $(bcc-common-flags) ; -} - - -flags borland LINKFLAGS on : -WU ; -flags borland CFLAGS on : -WU ; - -flags borland CFLAGS ; -flags borland C++FLAGS ; -flags borland DEFINES ; -flags borland UNDEFS ; -flags borland HDRS ; -flags borland SYSHDRS ; -flags borland LINKFLAGS ; -flags borland ARFLAGS ; - -flags borland STDHDRS : $(BCCROOT)$(SLASH)include ; -flags borland STDLIBPATH : $(BCCROOT)$(SLASH)lib ; - -flags borland LIBPATH ; -flags borland NEEDLIBS ; -flags borland FINDLIBS ; - -# suppress some specific warnings - -flags borland C++FLAGS : -w-8001 ; - -# For detailed information about borland tools and their command-line switches, -# see http://www.objectcentral.com/vide/help/videdoc/bcc32.html - -#### Link #### - -rule Link-action -{ - # Make sure that the borland runtime dlls are in the runtime path - gRUN_PATH($(<)) += $(BCC_TOOL_PATH) ; - - with-command-file borland-Link-action $(<) : $(>) $(NEEDLIBS) ; - - if $(3) in $(SHARED_TYPES) - { - borland-IMPLIB-action $(<) : $(>) ; - } -} - -# bcc32 needs to have ilink32 in the path in order to invoke it, so explicitly -# specifying $(BCC_TOOL_PATH)bcc32 doesn't help. You need to add -# $(BCC_TOOL_PATH) to the path -if $(NT) -{ -actions borland-Link-action -{ - set "PATH=$(BCC_TOOL_PATH);%PATH%" - "$(BCC_TOOL_PATH)bcc32" -v -q $(LINKFLAGS) -L"$(LIBPATH)" -L"$(STDLIBPATH)" -e"$(<[1])" @"$(>)" $(FINDLIBS:S=.lib) -} -} -else -{ -actions borland-Link-action -{ - export PATH=$(BCC_TOOL_PATH):$PATH - "$(BCC_TOOL_PATH)bcc32" -v -q $(LINKFLAGS) -L"$(LIBPATH)" -L"$(STDLIBPATH)" -e"$(<[1])" @"$(>)" $(FINDLIBS:S=.lib) -} -} - -actions borland-IMPLIB-action bind IMPLIB -{ - $(BCC_TOOL_PATH)implib $(<[2]) $(<[1]) -} - -#### Cc ##### - -rule Cc-action -{ - borland-Cc-action $(<) : $(>) ; -} - -actions borland-Cc-action -{ - "$(BCC_TOOL_PATH)bcc32" -j5 -g255 -q -c -w -a8 -b- -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o"$(<)" "$(>)" -} - -#### C++ #### -rule C++-action -{ - borland-C++-action $(<) : $(>) ; -} - -# -# for C++ compiles the following options are turned on by default: -# -# -j5 stops after 5 errors -# -g255 allow an unlimited number of warnings -# -q no banner -# -c compile to object -# -P C++ code regardless of file extention -# -w turns on all warnings -# -Ve zero sized empty base classes, this option is on in the IDE by default -# and effects binary compatibility. -# -Vx zero sized empty members, this option is on in the IDE by default -# and effects binary compatibility. -# -a8 8 byte alignment, this option is on in the IDE by default -# and effects binary compatibility. -# -actions borland-C++-action -{ - "$(BCC_TOOL_PATH)bcc32" -j5 -g255 -q -c -P -w -Ve -Vx -a8 -b- -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o"$(<)" "$(>)" -} - -if ! $(BORLAND_ARCHIVE_LINESEP) -{ - if $(NT) - { - if [ W32_GETREG "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion" : CurrentVersion ] - { - BORLAND-ARCHIVE-LINESEP = " ^&" ; - } - } - BORLAND-ARCHIVE-LINESEP ?= " &" ; -} - -#### Archive #### -rule Archive-action -{ - with-command-file borland-Archive-action $(<) : $(>) : + $(BORLAND-ARCHIVE-LINESEP) ; -} - -actions borland-Archive-action -{ - IF EXIST "$(<)" DEL "$(<)" - "$(BCC_TOOL_PATH)tlib" /P64 /u /a /C /$(ARFLAGS) "$(<)" @"$(>)" -} diff --git a/v1/build_system.htm b/v1/build_system.htm deleted file mode 100644 index 9747f719a..000000000 --- a/v1/build_system.htm +++ /dev/null @@ -1,1565 +0,0 @@ - - - - - - - - - - - Boost Build System - - - - - - - - - - - -
-

C++ Boost

-
-

Boost Build System

-
- -

Synopsis

- -

Boost.Build is a system for large project software construction built on - Boost.Jam, a descendant of "Perforce Jam", an open-source - make replacement[1]. Key features are:

- -
    -
  • A simple target description language
  • - -
  • Build with your choice (or multiple) toolsets from a single command - invocation
  • - -
  • Build your choice of basic variants (e.g. debug, release, profile...) - and subvariant modifications (e.g. inlining off) from a single command - invocation
  • - -
  • ``Feature Normalization'' allows target configurations to be - described independently from the toolset used
  • - -
  • Modular toolset description files allow build instructions for - different toolsets to be described independently
  • - -
  • Multiple subproject support
  • - -
  • Automatic building of subproject dependencies
  • -
- -

Status

Boost.Build v1 is a useful, - mature system. However, its design and structure are not easily adapted to - support some of the features we'd like to see in the future. To this end, - the Boost.Build developers are working on Boost.Build v2, which is pretty usable already. If - you are interested in contributing to this effort or you wish to discuss - the design of Boost.Build, please post inquiries to the Boost.Build mailing list. - -

Here are some of the design criteria that - led to these features.

- -

Table of Contents

- - - -

Getting Started

- -

Installing - Boost.Jam

Follow these instructions to acquire a - bjam executable for your platform. Install it somewhere in your path. - -

Initiating a Build

- -

Boost.Build responds to several global variable settings. The easiest - way to get going is usually to use environment variables, though you can - also set them on the command-line, using - -sVARIABLE_NAME=value. In addition to the - toolset configuration - variables, you can use the TOOLS variable to indicate which - toolset(s) to build with, and the BUILD variable to describe how - you want things built. In many cases it should be sufficient to invoke - bjam with no variable settings.

- -

Some example Boost.Jam invocations:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Command Line(s)Effects
-
-bjam -sTOOLS=gcc my_target
-
-
default (debug) BUILD of - my_targetwith GCC
-
-bjam "-sTOOLS=msvc gcc"
-
-
default-build all with msvc and gcc
-
-set TOOLS=msvc
-bjam
-
-
Set an NT environment variable to always build with MSVC
- default-build all.
-
-bjam "-sBUILD=release <debug-symbols>on"
-
-
release build with debug symbols of all using default - TOOLS
-
-bjam "-sBUILD=debug release"
-
-
debug and release build all.
set TOOLS=msvc
- bjam "-sBUILD=<cxxflags>-G6"
-  
Set an NT environment variable to always build with MSVC
- default-build all, adding a compiler command line switch
set TOOLS=msvc gcc
- bjam "-sBUILD=<msvc><*><cxxflags>-G6"
-  
Set an NT environment variable to always build with MSVC and - GCC
- default-build all, adding a MSVC-specific compiler command - line switch
bjam "-sBUILD=<define>BOOST_POSIX"build all, with the macro BOOST_POSIX defined for all - compilers
- -

Setting Jam - Variables

- -

The "-s" options in the command lines above are passing - variable settings to the build system. There are actually three ways to do - that:

- -
    -
  • Jam picks up variable settings from your environment by default, so - you can set them there: - -
    -
    -> BUILD="debug release"  # assuming Unix
    -> export BUILD
    -> bjam ...
    -
    -
    This approach can be OK for quick-and-dirty tests, but - environment variable settings tend to be unstable and non-uniform - across users and machines, so it's best not to rely on the environment - much. -
  • - -
  • Explicitly on the command-line, with the "-s" option.
  • - -
  • Directly in Jam code. A project's Jamrules - file is a convenient place to make global settings.
  • -
- -

An Example - Jamfile

Here is an example of a simple subproject Jamfile. In this - example, it is assumed that the user has set BOOST_ROOT, either as - an environment variable, on the command-line or in the project's - Jamrules file: - -
-
-subproject foo/bar/baz ; # path to here from project root
-
-# A static library called 'baz'
-lib baz : baz1.cpp baz2.cpp # C++ sources
-          parser/src/baz4.ll # Lex->C++ sources
-          parser/src/baz5.yy  # Yacc->C++ sources
-        : <include>$(BOOST_PARENT_DIRECTORY)  # Put boost in #include path
-    ;
-
-# An executable called 'test'
-exe test : <lib>baz # use the 'baz' library
-           baz_test.cpp   # C++ source
-         : <include>$(BOOST_ROOT)
-    ;
-
-
- -

That's it! The build system takes care of the rest. If the you want to - be able to build all subprojects from the project root directory, you can - add a Jamfile at the root:

- -
-
-project-root ; # declare this to be the project root directory
-# Read subproject Jamfiles
-subinclude foo/bar/baz foo/bar/... ;
-subinclude a/b/c ... ; # more subincludes
-
-
- -

Support Files

- -

To use the build system, the following must be located in your project's - root directory, or in a directory specified in the - BOOST_BUILD_PATH variable. It is usually convenient to specify the - BOOST_BUILD_PATH in your project's Jamrules file. The Boost - Jamrules file shows an example.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Filename(s)Meaning
toolset-tools.jamFeature-to-command-line mapping for toolset.
features.jamAbstract toolset feature descriptions.
boost-base.jamBoost build system-specific rule definitions.
unit-tests.jamUnit tests and assertions for boost Jam code.
The boost-base.jam file is temporary, and will eventually - be compiled into our Jam executable. - -

Basic Design and Terminology

This - section gives an overview of the way that the system works, outlining the - system's capabilities and overall design. It also introduces the - terminology and concepts necessary to understand the sections on writing - Jamfiles and command-line invocations. - -

Projects and - Subprojects

- -

A project is a source directory tree containing at least one - Jamfile. The root directory of the project is known as the - project root. The root - directory of a project may contain a Jamrules file, which contains - project-specific Jam code. If the Jamrules file is not present - when Jam is invoked, a warning will be issued.

- -

Subdirectories containing Jamfiles are called subproject - directories. Each such Jamfile describes a - subproject.

- -

The build system installation directory is a directory containing - Jam files describing compilers and build variants. The installation - directory can be specified in a file called boost-build.jam in the - project root directory. This file should contain a line boost-build - $path-to-installation-dir. If no such file is available the - environment variable BOOST_BUILD_PATH will be used. This lists a - set of directories to search for the files comprising the build system. If - the installation directory is not specified, it is the same as the project - root, and BOOST_BUILD_PATH is set to include that directory.

- -

Targets

- -

Each Jamfile describes one or more main targets.

- -

Each main target is an abstract description of one or more built - targets which are expressions of the corresponding main target under - particular compilers and build variants. Intermediate files such as - .o/.obj files generated by compiling .cpp files - as a consequence of building a main target are also referred to as built - targets. The term build directory tree refers to the location of - built target files.

- -
    -
  • By default, the build directory tree is overlaid with the project - directory tree, with targets generated into a subtree rooted at the - bin subdirectory of each subproject directory (the name of this - directory can be customized by changing the BIN_DIRECTORY - variable.
  • - -
  • If the variable - ALL_LOCATE_TARGET is set, it specifies an alternate build - directory tree whose structure mirrors that of the project. In this case, - built targets of a subproject are generated into the corresponding - directory of the build directory tree.
  • -
For each main target, there is a corresponding location in the build - directory tree known as the target's build root, where all - intermediate and final targets resulting from that main target are located. - -

Features and Properties

- -

A feature is a normalized (toolset-independent) description of an - individual build parameter, such as whether inlining is enabled. Each - feature usually corresponds to a command-line option of one or more build - tools. Features come in four varieties:

- -
    -
  1. Simple features can take on any of several predetermined - values. For example, the feature optimization might take one of - the values off, speed, or space. Simple - features have a default value. The key aspect of simple features is that - they are assumed to affect link compatibility: object files generated - with different values for a simple feature are generated into a separate - directories, and (with a few exceptions) main targets generated with - different values won't be linked together.
  2. - -
  3. Free features can either be single-valued, as above, or may - take on any number of user-specified values simultaneously. For example, - the define feature for a release build might have the values - NDEBUG and BOOST_RELEASE_BUILD. Free features are - assumed not to affect link compatibility.
  4. - -
  5. Path features are free features whose values describe paths - which may be relative to the subproject (such as linked libraries or - #include search directories). The build system treats the values - of these features specially to ensure that they are interpreted relative - to the subproject directory regardless of the directory where Jam was - invoked.
  6. - -
  7. Dependency features are path features whose values describe a - dependency of built targets. For example, an external library might be - specified with a dependency-feature: if the library is updated, the - target will be updated also. The <library-file> feature - works this way [2].
  8. -
- -

A feature-value pair is known as a build property, or simply - property. The prefixes simple, free, path, and - dependency apply to properties in an analogous way to features.

- -

Build Variants

- -

A build variant, or simply variant is a named set of build - properties describing how targets should be built. Typically you'll want at - least two separate variants: one for debugging, and one for your release - code.

- -

Built targets for distinct build variants and toolsets are generated in - separate parts of the build directory tree, known as the variant - directories. For example, a (sub)project with main targets foo - and bar, compiled with both GCC and KAI for debug and - release variants might generate the following structure (target - directories in bold).

- -
-
- bin
- +-foo  <--- foo's build root
- | +-gcc
- | | +-debug
- | | `-release
- | `-kai
- |   +-debug
- |   `-release
- `-bar  <--- bar's build root
-   +-gcc
-   | +-debug
-   | `-release
-   `-kai
-     +-debug
-     `-release
-
-
- -

The properties constituting a variant may differ according to toolset, - so debug may mean a slightly different set of properties for two - different compilers.

- -

Subvariants

- -

When a target is built with simple properties that don't exactly - match those specified in a build variant, the non-matching features are - called subvariant features and the target is located in a - subvariant directory beneath the directory of the base variant. This - can occur for two reasons:

- -
    -
  1. Some features are only relevant to certain compilers. When relevant - simple features have no value specified in the build variant, a value - must be chosen. Even when the default value is used, the target is - generated into a subvariant directory. For example, the - runtime-link feature may be unspecified in the debug - variant, but relevant to MSVC. In that case, a fragment of the target - tree might look like: - -
    -
    - bin
    - +-foo  <--- foo's build root
    - | +-msvc
    - | | +-debug
    - . . . `-runtime-link-dynamic
    - . . .
    -
    -
    Because the default value of runtime-link is - dynamic, when the debug variant is requested, the - runtime-link-dynamic subvariant of foo is built.
    -
    -
  2. - -
  3. It is possible to request (either on the command-line, or as part of - a main target description) that particular subvariants be built. For - example, it may be desirable to generate builds that link to the runtime - both statically and dynamically. In that case, both subvariant - directories in the example above would be generated: - -
    -
    - bin
    - +-foo  <--- foo's build root
    - | +-msvc
    - | | +-debug
    - . . . +-runtime-link-dynamic
    - . . . `-runtime-link-static
    - . . .
    -
    -
    -
  4. -
In no case will targets be built directly into - bin/foo/msvc/debug, since the debug variant doesn't - include the runtime-link feature, which is relevant to MSVC. - -

When a subvariant includes multiple subvariant features, targets are - built into a subvariant directory whose path is determined by concatenating - the properties sorted in order of their feature names. For example, the - borland compiler, which uses different libraries depending on whether the - target is a console or GUI program, might create the following structure - for a DLL:

- -
-
- bin
- +-foo  <--- foo's build root
- | +-msvc
- | | +-debug
- | | | +-runtime-link-dynamic
- | | | | +-user-interface-console
- | | | | `-user-interface-gui
- . . . `-runtime-link-static
- . . .   +-user-interface-console
- . . .   `user-interface-gui
-
-
- -

Any configuration of properties for which a target is built, whether - base variant or subvariant, is known as a build configuration, or - simply a build.

- -

Dependent Targets

- -

When a main target depends on the product of a second main target (as - when an executable depends on and links to a static library), each build - configuration of the dependent target is depends on the - corresponding build of the dependency. Because only simple features - participate in build identity, the dependent and dependency targets may - have completely different free features. This puts the onus on the user for - ensuring link-compatibility when certain free properties are used. For - example, when assert() is used in header files, the preprocessor - symbol NDEBUG can impact link-compatibility of separate - compilation units. This danger can be minimized by encapsulating such - feature differences inside of build variants.

- -

Usage

- -

This section describes how to start a build from the command-line and - how to write project and subproject Jamfiles. It also describes the other - files written in the Jam language: build-tool specification files, feature - descriptions files.

- -

The Command Line

- -

This section describes in detail how the build system can be - invoked.

- -

User Targets

- -

The Jam command line ends with an optional list of target names; if no - target names are supplied, the built-in pseudotarget all is built. - In a large project, naming targets can be dicey because of collisions. Jam - uses a mechanism called grist to distinguish targets that would otherwise - have the same name. Fortunately, you won't often have to supply grist at - the command-line. When you declare a main target, a Jam pseudotarget of the - same name is created which depends on all of the subvariants - requested for your invocation of the build system. For example, if your - subproject declares:

- -
-
-exe my_target : my_source1.cpp my_source2.c ;
-
-
and you invoke Jam with -sBUILD="debug - release" my_target, you will build both the debug and release - versions of my_target. - -

These simple, ungristed names are called user targets, and are - only available for the subproject where Jam is invoked. That way, builds - from the top level (which may include many Jamfiles through the subinclude - rule) and builds of library dependencies (which may live in other - subprojects), don't collide. If it is necessary to refer more explicitly to - a particular target from the command-line, you will have to add ``grist''. - Please see this section for a more complete - description of how to name particular targets in a build.

- -

Global Variables

- -

This is a partial list of global variables that can be set on the - command-line. Of course you are free to write your own Jam rules which - interpret other variables from the command-line. This list just details - some of the variables used by the build system itself. Note also that if - you don't like the default values you can override them in your project's - Jamrules file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Variable DefaultExampleNotes
TOOLS - Platform-dependent"-sTOOLS=gcc msvc"build with gcc and msvc
-sTOOLS=gccbuild with gcc
BUILD - - debug-sBUILD=releasebuild the release variant
"-sBUILD=debug release"build both debug and release variants
"-sBUILD=<optimization>speed"build a subvariant of the default variant (debug) with - optimization for speed.
"-sBUILD=debug release - <runtime-link>static/dynamic"build subvariants of the debug and release variants that link to - the runtime both statically and dynamically.
ALL_LOCATE_TARGET - - empty-sALL_LOCATE_TARGET=~/buildGenerate all build results in the build subdirectory of - the user's home directory (UNIX).
This section describes how to write a Jamfile for a subproject. - -

SubProject - Jamfiles

- -

The subproject - rule

- -

A subproject's Jamfile begins with an invocation of the - subproject rule that specifies the subproject's location relative - to the top of the project tree:

- -
-
-subproject path-from-top ;
-
-
- -

The subproject rule tells the build system where to place built - targets from the subproject in case ALL_LOCATE_TARGET is used to - specify the build directory tree. If there is a Jamfile in the project root - directory, you should use the project-root rule instead:

- -
-
-project-root ;
-
-
- -

Describing Main - Targets

- -

A main target is described using the following syntax:

- -
-
-target-type name : sources
-    [ : requirements [ : default-BUILD ] ] ;
-
-
- -
    -
  • target-type may be one of exe, lib, - dll, stage or template. These are actually - names of Jam rules. Additional main target rules are possible; see - status/Jamfile or - libs/python/build/Jamfile - for examples.
    -
  • - -
  • name specifies the name of the main target, multiple targets - with the same name are allowed but only if they are of different types. - Normally this is not the name of the final target file generated. The - target file name depends on the type of target which controls how the - base target name is renamed to conform to platform conventions. For - exes the name might be the same or *.exe. For - libs the name might be *.lib or lib*.a. And - for dlls the name might be *.dll or lib*.so. - For platform specific naming consult the allyourbase.jam file in the build system.
    -
  • - -
  • - sources is a list of paths to source files and dependency - targets. The syntax for - dependency targets is described by the following grammar: - -
    -
    -dependency-target -> type-tag location target-name
    -
    -type-tag -> "<template>" | "<lib>" | "<dll>" | "<exe>"
    -
    -location -> ( @project-id/ )? relative-path
    -
    -relative-path -> ( path-element/ ) *
    -
    -
    The location specifies the location of a Jamfile in - which a dependency target called target-name can be - found, declared with the given type-tag. Other type-tags - are possible; for example the python.jam - module defines Python extensions with the "<pyd>" - tag. If @project-id is specified, the - relative-path is interpreted with respect to the root directory - of the specified project. Otherwise, it - is interpreted with respect to the directory of the current Jamfile. - -

    The dependency's type-tag is also used to decide how to link - to it when needed. <lib> targets are linked statically - and <dll> targets are linked dynamically. On Unix - platforms dynamic linking will use (the appropriate platform equivalent - of) LD_LIBRARY_PATH and the "-l" linker flag to avoid - creating executables which expect to find dynamic libraries in - particular locations in the filesystem.

    - -

    NOTE: It is important to match the type-tag dependency - with the type of the dependency target. Trying to specify a - type-tag of <lib> when the target is defined as a - <dll> will cause an error.


    -
  • - -
  • - requirements specifies the build - properties intrinsic to the target. Requirements are given as sets of - optionally-qualified build properties: - -
    -
    -[[<compiler>]<variant>]<feature>value
    -
    -
    <compiler> and - <variant>, if supplied, can be used to restrict - the applicability of the requirement. Either one may be replaced by - <*>, which is the same as omitting it. - -

    The system checks that simple feature requirements are not violated - by explicit subvariant build requests, and will issue a warning - otherwise. Free features specified as requirements are simply added to - each corresponding build configuration.


    -
  • - -
  • - default-BUILD - specifies the configurations that should be built if the BUILD variable is not otherwise specified. Any - elements not beginning with ``<...>'' refer to - build variants. Other elements use the same syntax as the requirements described above, except that - multiple values may be specified for a simple feature by separating - them with a slash, forming (qualified) multi-valued properties: - -
    -
    -[[<compiler>]<variant>]<feature>value1[/value2...]
    -
    -
    When multiple values are specified, it causes all - the implied configurations to be built by default. It is also possible - to prevent any default builds from occurring on this target by using - <suppress>true . This suppresses any local targets, - either implicit or explicit, from building. But, this does not prevent - implied targets as required by a dependency by another target to this - one from being built. This is useful, for example, for defining a set - of libraries generically and having them built only when another target - like an exe is built. Such use might look like: - -
    -
    -lib basic : basic.cpp : : <suppress>true ;
    -
    -exe test : test.cpp <lib>basic ; -
    -
    With that the basic library will only be built - when the test executable is built, and only the variations - required by the executable will be built.
    -
  • -
- -

NOTE: for simple features in both requirements and default-BUILD, more-specific qualification - overrides less-specific.

- -

Describing Template - Targets

- -

Template targets provide a way to handle commonalities between projects - targets. They have the same form as main - targets but do not initiate build requests. A target that lists a - template as a dependency inherits all the settings from the template, i.e. - the templates sources, requirements and default build settings will be - added to the targets settings. Paths mentioned in a template definition are - always relative to the subdirectory of the Jamfile containing the templates - definition, regardless of the subdirectory of the dependent main target. - Typically a project will have at least one template target that handles - defines, include paths and additional compiler flags common to all targets - in the project.

- -

Describing Stage - Targets

- -

Stage targets are a special kind of target that don't build a single - file but to a collection of files. The goal is to create a directory which - is composed of the various files that other targets generate, or individual - files. When built a stage target creates a directory with the same name as - the target, and copies the dependent files to it. The form of the target is - the same as that of main targets with some - differences...

- -
    -
  • target-type is stage. See libs/regex/build/Jamfile for - an example.
    -
  • - -
  • Name specifies the name of the stage and is the name of the - directory created.
    -
  • - -
  • sources is the same as main targets and one can list both - generated targets like <exe>test_exe and individual files, - but not template targets.
    -
  • - -
  • - Requirements the build properties specified are used as with - main targets. But one additional type of requirement is possible: - <tag>... A tag specifies how to "augment" the names of - the copied files. This is needed to distinguish the various files if - you're collecting different builds of the same targets. The syntax is: - -
    -
    -<tag><feature|variant>value
    -
    -

    - If the feature or variant is present - for the a target the file for that target is renamed to include the - given value between the basename and the suffix. Two - special tags, <tag><prefix> and - <tag><postfix>, let one prepend and append a value - to the "augmentation" respectively.
    -
    -
  • - -
  • default-BUILD acts in the same manner as a main - target.
  • -
- -

Example

- -

This artificially complex example shows how two executables called "foo" - and "fop" might be described in a Jamfile. All common settings are factored - out in the templates "base" and "executable". Foo is composed of the - sources ./foo.cpp and ./src/bar.cpp (specified relative - to the directory in which the Jamfile resides). Fop only has one sourcefile - ./fop.cpp. Both executables link against the built target which - results from building the target baz as described in - ../bazlib/Jamfile.

- -
-
-template base : 
-    ## Requirements ##
-    : <include>../bazlib/include 
-      <define>BUILDING_FOO=1
-      <release><define>FOO_RELEASE
-      <msvc><*><define>FOO_MSVC
-      <msvc><release><define>FOO_MSVC_RELEASE
-      <gcc><*><optimization>off
-      <gcc><release><optimization>space
-      <threading>multi
-      <sysinclude>/usr/local/foolib/include
-    
-    ## default-BUILD ##
-    : debug release
-      <debug><runtime-link>static/dynamic
-    ;
-
-template executable : <template>base <lib>../bazlib/baz ;
-
-exe foo : <template>executable foo.cpp src/bar.cpp ;
-
-exe fop : <template>executable fop.cpp ;
-
-
- -

The requirements section:

- -
    -
  • Adds ../bazlib/include to the #include path
  • - -
  • Sets the preprocessor symbol BUILDING_FOO to 1
  • - -
  • In the release builds, #defines - FOO_RELEASE.
  • - -
  • When built with MSVC, #defines FOO_MSVC.
  • - -
  • In release variants built with MSVC, #defines - FOO_MSVC_RELEASE.
  • - -
  • Most builds under GCC have optimization turned off, but...
  • - -
  • ...GCC release builds require optimization for space.
  • - -
  • Requires multithread support on compilers where it's relevant.
  • - -
  • Adds /usr/local/foolib/include to the #include - <*> path
  • -
- -

The default-BUILD section:

- -
    -
  • specifies that debug and release base variants are - built by default.
  • - -
  • on compilers where the feature is relevant, requests both statically- - and dynamically-linked subvariants of the debug variant.
  • -
- -

Using External - Projects

To use dependencies such as libraries from another project - tree, first use the project rule to declare a project id and - location for the external project. Then add the appropriate external - dependency target specification to your program's - list of sources. For example, if you are developing a program which uses - the Boost.Threads library, you might write - -
-
-project boost : /home/dave/boost-cvs ;
-
-
in your Jamrules file, and place - -
-
-<dll>@boost/libs/thread/build/boost_thread
-
-
in your target's list of sources. - -

Requirement - Rules

- -

Target requirements support the use of auxiliary rules to allow for more - complex decisions about the requirements. If specified, by using the name - of a rule in the requirements, the rule is called with the signature: ( - toolset variant : subvariant-path properties * ) and should return the - modified set of properties. There are a number of built-in rules for some - common tasks that Boost uses, and you can use:

- -
- - - - - - - - - - - - - - - - - - - - - - - - -
RuleEffects
std::locale-supportEnsures that locale support is available for the target. For - example some toolsets, like CodeWarrior, locale support is only - available on specific platforms using a static runtime.
std::facet-supportEnsures that facet support is available for the target.
common-variant-tag -

Adds a constructed prefix tag to the target to conform to the - Boost common naming conventions for libraries. The tag is - constructed as:

- -
- [-<toolset-tag>][-<thread-tag>][-<runtime-tag>][-<version-tag>] -
- -
    -
  • <toolset-tag> maps to an abbreviated name of the - toolset and when possible, and applicable, the version of the - toolset.
  • - -
  • <thread-tag> "mt" when multi-threading is enabled.
  • - -
  • <runtime-tag> adds these single letter tags:
    -   "s" when static linking to runtime
    -   "g" when linking to debug runtime
    -   "y" when building debug-python variants
    -   "d" when building debug variants
    -   "p" when building with stlport libraries
    -   "n" when building with stlport and using native - iostreams
  • - -
  • <version-tag> adds "major_minor" from a - <version> property. Defaults to using - $(BOOST_VERSION) if no version property is present.
  • -
-
-
- -

Install - Descriptions

- -

Installable files and targets are described with:

- -
-
-install name type : sources... : [options]... ;
-
-
- -

Install descriptions define files and targets that can be installed by - use of a stage target.

- -
    -
  • name specifies the name to group the given files and targets - as a collective entity. Multiple install descriptions can use - the same name, in which case they are all collected into a single - group.
    -
  • - -
  • type indicates the type of files specified by the - install. This is used to later install files from different - groups but with the same type.
    -
  • - -
  • sources can list both generated targets like - <exe>test_exe and individual files, but not template - targets.
    -
  • - -
  • options additional options, currently none defined.
  • -
- -

Install descriptions are meant to be used by stage targets to - collect the various sources of many install descriptions into one or more - destination directories. For this there are two rules that help in getting - the sources specified:

- -
    -
  • install-subinclude jamfiles... : - [options]...
    -
    - Includes the listed Jamfiles to read in the install descriptions. - Multiple <exclude>name options can be used to - exclude the named groups of install descriptions from getting - defined.
    -
  • - -
  • install-source type
    -
    - Returns the list of sources and targets specified by the install for the - given type. The returned list can be used as the sources for a - stage target which would place all the sources into that - stage.
    -
  • -
- -

Feature - Descriptions

- -

Features are described by stating the feature type (simple features are - specified with "feature"), followed by the feature name. An - optional second argument can be used to list the permissible values of the - feature. Examples can be found in features.jam.

- -

Variant - Descriptions

- -

Variants are described with the following syntax:

- -
-
-variant name [ : parent-name] : [<toolset-name>]<feature>value... ;
-
-
The variant rule specifies the list of properties - comprising a variant. Properties may be optionally qualified with a toolset - name, which specifies that the property applies only to that toolset. One - or more parent variants may be specified to inherit the properties -  from those parent(s). For inherited properties precedence is given on - a left to right order, making the immediate properties override those in - the parent(s). This can be used to great effect for describing global - properties that are shared amongst various variants, and therefore targets. - For example: - -
-
-variant my-globals : <rtti>off ;
-
-variant my-debug : my-globals debug ;
-
-variant my-release : my-globals release ;
-
-
More examples can be found in features.jam. - -

Toolset - Description Files

- -

Toolset descriptions are located in the project's root directory, or a - directory specified by BOOST_BUILD_INSTALLATION, which may be set - in a Jamfile or the project's Jamrules file. Each file is called - toolset-name-tools.jam, where toolset-name is the - name of the toolset. The toolset description file has two main jobs:

- -
    -
  1. redefine the following rules: - -
      -
    • Link-action - links an executable from objects and - libraries
    • - -
    • Archive-action - links a static library from object - files
    • - -
    • C++-action - compiles a 'C++' file into an object - file
    • - -
    • Cc-action - compiles a 'C' file into an object file
    • -
    These rules should simply invoke the action part of a rule whose - name is uniquely defined for the toolset. For example, - -
    -
    -rule C++-action
    -{
    -    msvc-C++-action $(<) : $(>) ;
    -}
    -
    -actions msvc-C++-action
    -{
    -    cl -nologo -GX -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I$(HDRS) -I$(STDHDRS) -Fo$(<) -Tp$(>)
    -}
    -
    -
    -
    Note that Link-action may require special care: - on platforms where the global variable gEXPORT_SUFFIX(DLL) is - defined (e.g. Windows), the first argument may have two elements when - linking a shared library. The first is the shared library target, and - the second is the import library target, with suffix given by - $(gEXPORT_SUFFIX(DLL)). It will always have a third argument - which is either ``EXE'' or ``DLL''. This can be used - to dispatch to different actions for linking DLLs and EXEs if - necessary, but usually it will be easier to take advantage of the - special <target-type> feature, which will have the same - value using the flags rule described below. -
  2. - -
  3. Translate build settings given in the global - gBUILD_PROPERTIES variable into something that can be used by - the toolset. The build system provides the flags rule to help - translate build properties into elements of global variables which are - later attached to targets so that they can affect the build actions. The - flags rule is used as follows: - -
    -
    -flags toolset variable condition [: value...]
    -
    -
    The parameters are: - -
      -
    • toolset - the name of the toolset
    • - -
    • variable - the name of a global variable which can be used - to carry information to a command-line
    • - -
    • - condition - one one or more elements in the following forms: - -
        -
      1. a property-set of the form: - <feature>value[/<feature> - value...]
      2. - -
      3. <feature>
      4. -
      -
    • - -
    • values - anything
    • -
    - -

    Semantics only affect targets built with the specified toolset, and - depend on the target's build configuration:

    - -
      -
    1. if any specified property-set is a subset of the target's build - properties, the values specified in $(3) will be - appended once to variable.
    2. - -
    3. The value of each specified feature that participates in the - target's build properties is appended to variable. In either - case, the variable will be set "on" the target so it may be used in - the build actions.
    4. -
    -
  4. -
- -

Example

- -

The description of the flags rule above is actually more - complicated than it sounds. For example, the following line might be used - to specify how optimization can be turned off for MSVC:

- -
-
-flags msvc CFLAGS <optimization>off : /Od ;
-
-
It says that the string /Od should be added to the - global CFLAGS variable whenever a build configuration includes the - property <optimization>off. - -

Similarly, in the following example,

- -
-
-flags msvc CFLAGS <runtime-build>release/<runtime-link>dynamic : /MD ;
-
-
we add /MD to the CFLAGS variable when both of the - specified conditions are satisfied. We could grab all of the values of the - free feature <include> in the HDRS variable as - follows: - -
-
-flags msvc HDRS <include> ;
-
-
- -

The use of these variables should be apparent from the declaration of - actions msvc-C++-action in the previous section.

- -

Internals

- -

Target Names

- -

In addition to user targets, which - correspond directly to the names the user writes in her subproject Jamfile, - several additional targets are generated, regardless of the directory from - which Jam was invoked:

- -
    -
  • A main target has all the same dependencies as a user target - (i.e. building it updates all requested subvariants). Its name is the - same except for the addition of $(SOURCE_GRIST), which - identifies the subproject. The identification looks like the names of the - path components from the project root to the subproject, separated by - exclamation points. Thus, if the project is rooted at foo, in - the subproject at foo/bar/baz the target my_target is - identified by <bar!baz>my_target.
  • - -
  • A subvariant target has additional grist identifying its main - target and subvariant. This grist is joined to $(SOURCE_GRIST) - with the platform's directory separator. Thus, on UNIX, a subvariant - target of my_target above might be identified as - <bar!baz/my_target/optimization-space/runtime-link-static>my_source.o. - Note that the part of the grist following the first slash, known as the - subvariant id, also corresponds to a fragment of the subvariant - directory path where the corresponding target is generated. Most built - targets will be identified this way.
  • -
- -

Global - Variables

- -

This section describes some of the global variables used by the build - system. Please note that some parts of the system (particularly those in - allyourbase.jam) are heavily based on the Jambase file supplied - with Jam, and as such do not follow the conventions described below.

- -

Global variables used in the build system fall into three - categories:

- -
    -
  • Global variables intended to be set by the user on the command-line - or in the environment use ALL_UPPER_CASE names.
  • - -
  • Internal global variables begin with a lower-case "g" and continue in - upper-case: gSOME_GLOBAL
  • - -
  • Global variables of the form: - gBASE_NAME(arguments), where arguments is - a comma-separated argument list, are used internally to achieve a kind of - indirection by concatenating variable values: - -
    -
    -    ECHO $(gFUBAR($(x),$(y))) ;
    -
    -
    -
  • -
- -

Please note that the build system commonly takes advantage of Jam's - Dynamic Scoping feature (see the local command in the "Flow of - Control" section below the link target) to temporarily "change" a global - variable by declaring a local of the same name.

- -

Many of the variables that are used to configure how Boost.Build works - internally are listed here with brief - descriptions.

- -

Variables Associated with SubProject Identity

- -
    -
  • SUBDIR_TOKENS - a list of the path elements relative to the - project root of the current subproject.
  • - -
  • SUBDIR - the path from the invocation directory to the - current subproject directory.
  • -
- -

Grist Variables

- -
    -
  • TARGET_GRIST takes the form - subproject!id/target/toolset/variant/subvariant-path.
  • -
- -

Design Criteria

- -

Assumptions

- -

The requirements are driven by several basic assumptions:

- -
    -
  • There is no single Boost developer or test facility with access to or - knowledge of all the platforms and compilers Boost libraries are used - with.
  • - -
  • Boost libraries are used across such a wide range of platforms and - compilers that almost no other assumptions can be made.
  • -
- -

Requirements

- -

This build system was designed to satisfy the following - requirements:

- -
    -
  • A developer adding a new library or test program must only have to - add simple entries naming the source files to a text file, and not have - to know anything about platform specific files. The developer should not - have to supply header dependency information.
  • - -
  • There should be a very high likelihood of builds succeeding on all - platforms if a build succeeds on any platform. In other words, a - developer must not be required to have access to many platforms or - compilers to ensure correct builds
  • - -
  • A user or developer adding support for a new platform or compiler - should only have to add to a single file describing how to do the build - for that platform or compiler, and shouldn't have to identify the files - that will need to be built.
  • - -
  • The build should rely only on tools native to the platform and - compiler, or supplied via the boost download.
  • - -
  • The details of how the build is done for a particular platform or - compiler should be appropriate for that platform.
  • - -
  • It should be possible to build multiple variants (e.g. debug/release) - of a single target.
  • - -
  • It should be possible to build multiple variants of multiple targets - with multiple compilers from a single build command.
  • - -
  • The build tools must be able to handle Boost growth issues such as - identified in Directory Structure proposals and discussion.
  • - -
  • Support for dynamic and static linking should be included.
  • - -
  • It should be relatively straightforward to add support for a new - compiler. In most cases, no modification of files used to describe - existing targets should be required.
  • - -
  • Support for compiler- and variant-specific configuration for each - target
  • - -
  • It should be possible to build targets into a directory unrelated to - the source directories (they may be read-only)
  • -
- -

Footnotes

[1] Boost Jam is actually descended directly from FTJam, which was - itself a variant of Jam/MR. It is hoped that crucial - features we rely on will eventually be incorporated back into the Jam/MR - release. - -

[2] Note: right now, a dependency feature of - a main target makes all resulting built targets dependent, including - intermediate targets. That means that if an executable is dependent on an - external library, and that library changes, all the sources comprising the - executable will be recompiled as well. This behavior should probably be - fixed.

-
- -

Revised $Date$

- -

Copyright © Dave Abrahams 2001.

- -

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

- - diff --git a/v1/como-4_3_3-vc7-tools.jam b/v1/como-4_3_3-vc7-tools.jam deleted file mode 100644 index 06f18b3f4..000000000 --- a/v1/como-4_3_3-vc7-tools.jam +++ /dev/null @@ -1,34 +0,0 @@ -# (C) Copyright David Abrahams 2001. -# (C) Copyright MetaCommunications, Inc. 2003-2004. - -# Distributed under the Boost Software License, Version 1.0. (See -# accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -# The following #// line will be used by the regression test table generation -# program as the column heading for HTML tables. Must not include version number. -#//Comeau
C++
- -{ - include-tools vc7 ; - C++FLAGS = ; - CFLAGS = ; - DEFINES = ; - UNDEFS = ; - HDRS = ; - STDHDRS = ; - LINKFLAGS = ; - ARFLAGS = ; - NO_WARN = ; - STDHDRS = ; - STDLIB_PATH = ; - LIBPATH = ; - NEEDLIBS = ; - FINDLIBS = ; - - COMO_BASE = $(COMO_4_3_3_BASE) ; - - extends-toolset como-win32 ; - - C++FLAGS += -DBOOST_DISABLE_WIN32 --wchar_t ; -} diff --git a/v1/como-4_3_3-vc7_1-tools.jam b/v1/como-4_3_3-vc7_1-tools.jam deleted file mode 100644 index 326258c1e..000000000 --- a/v1/como-4_3_3-vc7_1-tools.jam +++ /dev/null @@ -1,18 +0,0 @@ - -# (C) Copyright MetaCommunications, Inc. 2004. - -# Distributed under the Boost Software License, Version 1.0. (See -# accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -# The following #// line will be used by the regression test table generation -# program as the column heading for HTML tables. Must not include version number. -#//Comeau
C++
- -{ - include-tools vc-7_1 ; - local COMO_BACKEND = "vc71" ; - local COMO_BACKEND_PATH = $(VC71_ROOT) ; - - extends-toolset como-4_3_3-vc7 ; -} diff --git a/v1/como-tools.html b/v1/como-tools.html deleted file mode 100644 index 2455e276b..000000000 --- a/v1/como-tools.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - Boost.Build - como toolset - - - - - - - - - -
-

-

-
-

Boost.Build

- -

como and como-win32 toolsets

-
-
- -

Introduction

- -

Boost.Build's como and como-win32 toolsets support the Comeau Computing C/C++ Compiler.

- -

Configuration Variables

- -

The como and como-win32 toolsets respond to the following variables - which can be set in the environment or configured on the jam command-line - using -sVARIABLE_NAME=value:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Variable NameSemanticsDefaultNotes
COMO_PATHPath to installation of compiler tools.(none)If not set tools must be available in the executable path.
COMO_BASEPath to installation of compiler tools.$(COMO_PATH)This is a backward compatability alternate for COMO_PATH.
COMO_BIN_PATHPath to bin directory of compiler excutables.$(COMO_PATH)/bin/ 
COMO_INCLUDE_PATHPath to libcomo headers.$(COMO_PATH)/libcomo$(COMO_INCLUDE_PATH)/cnames is automatically - added.
COMO_STDLIB_PATHPath to built libcomo object.$(COMO_PATH)/libcomo 
COMO_BACKENDBackend abbreviation, e.g. vc7, bcc, - dig, etc.vc7como-win32 toolset only.
COMO_BACKEND_PATHPath to backend compiler.$(VC7_TOOLS)como-win32 toolset only.
-
- -

Revised - - 31 July, 2004 -

- -

Copyright © Dave Abrahams 2002.

- -

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

- - diff --git a/v1/como-tools.jam b/v1/como-tools.jam deleted file mode 100644 index 872cf7956..000000000 --- a/v1/como-tools.jam +++ /dev/null @@ -1,100 +0,0 @@ -#~ Copyright 2001-2002 David Abrahams. -#~ Copyright 2002 Rene Rivera. -#~ Copyright 2002 Beman Dawes. -#~ Copyright 2003 Joel de Guzman. -#~ Copyright 2003 Jens Maurer. -#~ Copyright 2003 Matin Wille. -#~ Distributed under the Boost Software License, Version 1.0. -#~ (See accompanying file LICENSE_1_0.txt or copy at -#~ http://www.boost.org/LICENSE_1_0.txt) - -# The following #// line will be used by the regression test table generation -# program as the column heading for HTML tables. Must not include version number. -#//Comeau
C++
- -# variables used to configure como-tools.jam -# -# COMO_PATH - path to installation -# COMO - name of como executable - -COMO_PATH ?= "" ; -COMO ?= $(COMO_PATH)/bin/como ; - -flags como C++FLAGS off : --no_exceptions ; -flags como C++FLAGS on : --exceptions ; - -flags como CFLAGS off : --no_inlining ; -flags como CFLAGS on full : --inlining ; - -flags como CFLAGS off : -O0 ; -flags como CFLAGS speed : -O3 ; -flags como CFLAGS size : -Os ; - -flags como CFLAGS on : -g ; -flags como LINKFLAGS on : -g ; - -flags como FINDLIBS : m ; -flags como FINDLIBS : rt ; - -flags como CFLAGS ; -flags como C++FLAGS ; -flags como DEFINES ; -flags como UNDEFS ; -flags como HDRS ; -flags como SYSHDRS ; -flags como LINKFLAGS ; -flags como ARFLAGS ; - -flags como LIBPATH ; -flags como NEEDLIBS ; -flags como FINDLIBS ; - -#### Link #### - -rule Link-action -{ - como-Link-action $(<) : $(>) ; -} - -# for como, we repeat all libraries so that dependencies are always resolved -actions como-Link-action bind NEEDLIBS -{ - $(COMO) $(LINKFLAGS) -o "$(<[1])" "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l"$(FINDLIBS)" -} - - -#### Cc ##### - -rule Cc-action -{ - como-Cc-action $(<) : $(>) ; -} - -actions como-Cc-action -{ - $(COMO) -c --c99 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)" -} - -#### C++ #### -rule C++-action -{ - como-C++-action $(<) : $(>) ; -} - -actions como-C++-action -{ - $(COMO) -tused -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)" -} - -#### Archive #### - -rule Archive-action -{ - como-Archive-action $(<) : $(>) ; -} - -actions como-Archive-action -{ - ar rcu $(<) $(>) -} - diff --git a/v1/como-win32-tools.jam b/v1/como-win32-tools.jam deleted file mode 100644 index 3ae74535b..000000000 --- a/v1/como-win32-tools.jam +++ /dev/null @@ -1,160 +0,0 @@ -# (C) Copyright David Abrahams 2001. -# (C) Copyright MetaCommunications, Inc. 2004. - -# Distributed under the Boost Software License, Version 1.0. (See -# accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -# The following #// line will be used by the regression test table generation -# program as the column heading for HTML tables. Must not include version number. -#//Comeau
C++
- -# Feature to allow specifying files that will compile with warnings disabled. -# This is usefull for files that use windows headers. -free-feature no-warn ; - -# variables used to configure como-tools.jam -# -# COMO_PATH - path to installation -# COMO_BIN_PATH - path to como executable, defaults to $(COMO_PATH)/bin/ -# COMO_INCLUDE_PATH - path to libcomo headers, defaults to $(COMO_PATH)/libcomo -# COMO_STDLIB_PATH - path to built libcomo object, defaults to $(COMO_PATH)/libcomo -# COMO_BACKEND - backend abbreviation, e.g. "vc71", "bcc", "dig", etc. Defaults to "vc7" -# COMO_BACKEND_PATH - path to backend compiler root directory, defaults to $(VC7_ROOT) - -# Keep using COMO_BASE for backward compatibility -set-as-singleton COMO_BASE COMO_PATH COMO_BIN_PATH COMO_INCLUDE_PATH COMO_STDLIB_PATH COMO_BACKEND COMO_BACKEND_PATH ; -COMO_BASE ?= $(COMO_PATH) ; - -# compute directories for invoking como -if ! $(COMO_PATH_SETUP) # do this once -{ - # Keep using COMO_BIN_DIRECTORY for backward compatibility. - COMO_BIN_DIRECTORY ?= $(COMO_BIN_PATH) ; - COMO_BIN_DIRECTORY ?= $(COMO_BASE)$(SLASH)bin$(SLASH) ; - COMO_BIN_DIRECTORY ?= "" ; # Don't clobber tool names if COMO_ROOT_DIRECTORY not - # set - - COMO_INCLUDE_PATH ?= $(COMO_BASE)$(SLASH)libcomo ; - COMO_INCLUDE_PATH += $(COMO_INCLUDE_PATH)$(SLASH)cnames ; - - COMO_STDLIB_PATH ?= $(COMO_BASE)$(SLASH)libcomo ; - - COMO_BACKEND_SETUP = $(COMO_BACKEND_SETUP) ; - newline = " -" ; - COMO_BACKEND ?= "vc7" ; - COMO_BACKEND_PATH ?= $(VC7_ROOT) ; - COMO_BACKEND_INCLUDE_SETUP ?= "set \"COMO_MS_INCLUDE="$(COMO_BACKEND_PATH)"/include\"" ; - COMO_BACKEND_LIB_SETUP ?= "set \"LIB="$(COMO_STDLIB_PATH)";%LIB%\"" ; - COMO_PATH_SETUP ?= "set \"PATH="$(COMO_BIN_DIRECTORY)";%PATH%\"" ; - COMO_BACKEND_SETUP ?= "call "\"$(COMO_BACKEND_PATH)\\..\\Common7\\Tools\\vsvars32"\" >nul" ; - COMO_BASE_SETUP ?= "set \"COMO_BASE=$(COMO_BASE)\"" ; - COMO_PATH_SETUP ?= "" ; - COMO_CMD = \"$(COMO_BIN_DIRECTORY)como\" --$(COMO_BACKEND) ; -} - - -flags como-win32 C++FLAGS off : --no_exceptions ; -flags como-win32 C++FLAGS on : --exceptions ; - -flags como-win32 CFLAGS off : --no_inlining ; -flags como-win32 CFLAGS on full : --inlining ; - -flags como-win32 CFLAGS on : /Zi ; -flags como-win32 CFLAGS off : /Od ; - -flags como-win32 CFLAGS ; -flags como-win32 CFLAGS : -D_WIN32 ; # make sure that we get the Boost Win32 platform config header. -flags como-win32 CFLAGS single : -DBOOST_SP_DISABLE_THREADS ; -flags como-win32 CFLAGS multi : -D_MT ; # make sure that our config knows that threading is on. -flags como-win32 C++FLAGS ; -flags como-win32 DEFINES ; -flags como-win32 UNDEFS ; -flags como-win32 HDRS ; -flags como-win32 SYSHDRS ; -flags como-win32 LINKFLAGS ; -flags como-win32 ARFLAGS ; -flags como-win32 NO_WARN ; - -flags como-win32 STDHDRS : $(COMO_INCLUDE_PATH) ; -flags como-win32 STDLIB_PATH : $(COMO_STDLIB_PATH)$(SLASH) ; - -flags como-win32 LIBPATH ; -flags como-win32 NEEDLIBS ; -flags como-win32 FINDLIBS ; - -#### Link #### - -rule Link-action -{ - with-command-file como-Link-action $(<) : $(>) ; -} - -# for como, we repeat all libraries so that dependencies are always resolved -actions como-Link-action bind NEEDLIBS -{ - $(COMO_BACKEND_SETUP) - $(COMO_BACKEND_INCLUDE_SETUP) - $(COMO_BACKEND_LIB_SETUP) - $(COMO_PATH_SETUP) - $(COMO_BASE_SETUP) - $(COMO_CMD) --no_version --no_prelink_verbose $(LINKFLAGS) -o "$(<[1]:S=)" @"$(>)" "$(NEEDLIBS)" "$(FINDLIBS:S=.lib)" -} - - -#### Cc ##### - -rule Cc-action -{ - if $(>:G=:D=) in $(NO_WARN) { WARN on $(<) = "" ; } - else { WARN on $(<) = --a -DBOOST_COMO_STRICT=1 ; } - como-Cc-action $(<) : $(>) ; -} - -actions como-Cc-action -{ - $(COMO_BACKEND_SETUP) - $(COMO_BACKEND_INCLUDE_SETUP) - $(COMO_BACKEND_LIB_SETUP) - $(COMO_PATH_SETUP) - $(COMO_BASE_SETUP) - $(COMO_CMD) -c --c99 -e5 --no_version --display_error_number --diag_suppress=9,21,161,748,940,962 -U$(UNDEFS) -D$(DEFINES) $(WARN) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<:D=)" "$(>)" -} - -#### C++ #### -rule C++-action -{ - if $(>:G=:D=) in $(NO_WARN) { WARN on $(<) = "" ; } - else { WARN on $(<) = --a -DBOOST_COMO_STRICT=1 ; } - como-C++-action $(<) : $(>) ; -} - -actions como-C++-action -{ - $(COMO_BACKEND_SETUP) - $(COMO_BACKEND_INCLUDE_SETUP) - $(COMO_BACKEND_LIB_SETUP) - $(COMO_PATH_SETUP) - $(COMO_BASE_SETUP) - $(COMO_CMD) -c -e5 --no_version --no_prelink_verbose --display_error_number --long_long --diag_suppress=9,21,161,748,940,962 -D__STL_LONG_LONG -U$(UNDEFS) -D$(DEFINES) $(WARN) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)" -} - -#### Archive #### - -rule Archive-action -{ - with-command-file como-Archive-action $(<) : $(>) ; -} - -actions updated together piecemeal como-Archive-action -{ - $(COMO_BACKEND_SETUP) - $(COMO_BACKEND_INCLUDE_SETUP) - $(COMO_BACKEND_LIB_SETUP) - $(COMO_PATH_SETUP) - $(COMO_BASE_SETUP) - $(COMO_CMD) --no_version --no_prelink_verbose --prelink_object @"$(>)" - lib $(ARFLAGS) /nologo /out:"$(<:S=.lib)" @"$(>)" -} - diff --git a/v1/cw-8_3-tools.jam b/v1/cw-8_3-tools.jam deleted file mode 100644 index d479199b4..000000000 --- a/v1/cw-8_3-tools.jam +++ /dev/null @@ -1,12 +0,0 @@ -#~ Copyright 2004 Rene Rivera. -#~ Distributed under the Boost Software License, Version 1.0. -#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# The following #// line will be used by the regression test table generation -# program as the column heading for HTML tables. Must not include version number. -#//Metrowerks
CodeWarrior
- -{ - local CW_VERSION = 8.0 ; - extends-toolset cw ; -} diff --git a/v1/cw-9_2-tools.jam b/v1/cw-9_2-tools.jam deleted file mode 100644 index 4894eb33c..000000000 --- a/v1/cw-9_2-tools.jam +++ /dev/null @@ -1,12 +0,0 @@ -#~ Copyright 2004 Rene Rivera. -#~ Distributed under the Boost Software License, Version 1.0. -#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# The following #// line will be used by the regression test table generation -# program as the column heading for HTML tables. Must not include version number. -#//Metrowerks
CodeWarrior
- -{ - local CW_VERSION = 9.0 ; - extends-toolset cw ; -} diff --git a/v1/cw-9_3-tools.jam b/v1/cw-9_3-tools.jam deleted file mode 100644 index 4894eb33c..000000000 --- a/v1/cw-9_3-tools.jam +++ /dev/null @@ -1,12 +0,0 @@ -#~ Copyright 2004 Rene Rivera. -#~ Distributed under the Boost Software License, Version 1.0. -#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# The following #// line will be used by the regression test table generation -# program as the column heading for HTML tables. Must not include version number. -#//Metrowerks
CodeWarrior
- -{ - local CW_VERSION = 9.0 ; - extends-toolset cw ; -} diff --git a/v1/cw-9_4-tools.jam b/v1/cw-9_4-tools.jam deleted file mode 100644 index 4894eb33c..000000000 --- a/v1/cw-9_4-tools.jam +++ /dev/null @@ -1,12 +0,0 @@ -#~ Copyright 2004 Rene Rivera. -#~ Distributed under the Boost Software License, Version 1.0. -#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# The following #// line will be used by the regression test table generation -# program as the column heading for HTML tables. Must not include version number. -#//Metrowerks
CodeWarrior
- -{ - local CW_VERSION = 9.0 ; - extends-toolset cw ; -} diff --git a/v1/cw-tools.html b/v1/cw-tools.html deleted file mode 100644 index 34456b62e..000000000 --- a/v1/cw-tools.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - Boost.Build - cw toolset - - - - - - - - - -
-

-

-
-

Boost.Build

- -

cw toolset

-
-
- -

Introduction

- -

Boost.Build's cw toolset supports the Metrowerks CodeWarrior Pro 6.x, 7.x, 8.x - and 9.x tools. This toolsets handles allteh variations for the CodeWarrior - command line compiler tools.

- -

Configuration Variables

The cw toolset responds to the following - variables which can be set in the environment or configured on the jam - command-line using -sVARIABLE_NAME=value: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Variable NameSemanticsDefaultNotes
CW_ROOTPath to installation of Metrowerks Codewarrior.emptyThe toolset attempts to figure out what the version and - root of the tools are by looking at the environment and at the registry - (on Windows). If nothing is given the newest available toolset is - used.
CW_VERSIONVersion to use. Valid values are: 6.0, 7.0, 8.0, 9.0.empty
-
- -

Revised - - 23 February, 2004 -

- -

Copyright Rene Rivera 2004.

- -

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

- - diff --git a/v1/cw-tools.jam b/v1/cw-tools.jam deleted file mode 100644 index 42d06ea3b..000000000 --- a/v1/cw-tools.jam +++ /dev/null @@ -1,377 +0,0 @@ -#~ Copyright 2004-2005 Rene Rivera. -#~ Distributed under the Boost Software License, Version 1.0. -#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# The following #// line will be used by the regression test table generation -# program as the column heading for HTML tables. Must not include version number. -#//Metrowerks
CodeWarrior
- -# For adding framwork libraries; like Python, Carbon, etc. -free-feature framework ; - -# singleton variables... -set-as-singleton CW_ROOT CWFOLDER CWFolder CWINSTALL ; - -flags cw cw-version : $(CW_VERSION) ; -flags cw cw-root : $(CW_ROOT) ; - -cw-root ?= $(CWFolder) ; -cw-root ?= $(CWFOLDER) ; - -if $(NT) -{ - for local v in 9.0 8.0 7.0 6.0 - { - cw-root-$(v) ?= [ W32_GETREG "HKEY_LOCAL_MACHINE\\SOFTWARE\\Metrowerks\\CodeWarrior for Windows\\$(v)" : "PATH" ] ; - cw-version ?= [ conditional $(cw-root-$(v)) : $(v) ] ; - } -} - -cw-root ?= $(cw-root-$(cw-version)) ; - -flags cw CFLAGS ; -flags cw C++FLAGS ; -flags cw DEFINES ; -flags cw UNDEFS ; -flags cw HDRS ; -flags cw SYSHDRS ; -flags cw LINKFLAGS ; -flags cw ARFLAGS ; -flags cw LIBPATH ; -flags cw NEEDLIBS ; -flags cw FINDLIBS ; -flags cw PREFIX ; -if $(OS) = MACOSX -{ - flags cw FRAMEWORKS ; -} - -flags cw cw-errors ; -flags cw cw-warnings ; - -# Debug information -flags cw CFLAGS on : -g ; -flags cw LINKFLAGS on : -g ; - -# Optimizations -flags cw CFLAGS off : -O0 ; -flags cw CFLAGS speed : -opt full ; -flags cw CFLAGS space : -O4,s "-opt intrinsics" ; - -flags cw CFLAGS off : -inline off ; -flags cw CFLAGS on : -inline on ; -flags cw CFLAGS full : -inline auto -inline level=8 ; - -# Target type -flags cw LINKFLAGS $(SHARED_TYPES) : -shared ; -if $(NT) -{ - flags cw LINKFLAGS $(SHARED_TYPES) : "-export dllexport" ; -} - -# Some language related options -flags cw CFLAGS msvc : -exc ms ; -flags cw CFLAGS directory : "-cwd proj" ; -flags cw CFLAGS source : "-cwd source" ; -flags cw CFLAGS paths : "-cwd explicit" ; -flags cw CFLAGS relative : "-cwd include" ; -flags cw C++FLAGS off : "-RTTI off" ; -flags cw C++FLAGS on : "-RTTI on" ; -# CodeWarrior on MacOS defaults to wchar_t support off, contrary -# to what it does on Windows. So "fix" this discrepancy. Don't -# bother with OS type just set this to on for all. After all it's -# standard! -flags cw CFLAGS : "-wchar_t on" ; - -# OS subsystem target -if $(NT) -{ - flags cw LINKFLAGS console : "-subsystem console" ; - flags cw LINKFLAGS gui : "-subsystem windows" ; - flags cw LINKFLAGS wince : "-subsystem wince" ; - flags cw LINKFLAGS native : "-subsystem native" ; - flags cw LINKFLAGS auto : "-subsystem auto" ; -} - -# Errors, default to maximum 5 errors -flags cw FLAGS : [ conditional $(cw-errors) : "-maxerrors $(cw-errors[1])" : "-maxerrors 5" ] ; - -# Warnings, default to maximum 20 warnings -if off in $(cw-warnings) -{ - flags cw FLAGS : "-warnings off" ; -} -else if error in $(cw-warnings) -{ - flags cw FLAGS : "-warnings error" ; -} -else -{ - flags cw FLAGS : "-warnings on" ; -} -if ! ( off in $(cw-warnings) ) -{ - if [ MATCH "^([0-9]+)" : $(cw-warnings) ] - { - local cw-maxwarnings = [ MATCH "^([0-9]+)" : $(cw-warnings) ] ; - cw-warnings = [ difference $(cw-warnings) : $(cw-maxwarnings) ] ; - flags cw FLAGS : "-maxwarnings $(cw-maxwarnings[1])" ; - } - else - { - flags cw FLAGS : "-maxwarnings 20" ; - } -} -cw-warnings = [ difference $(cw-warnings) : on off error ] ; -if $(cw-warnings) -{ - flags cw CFLAGS no-illegal-pragmas : "-warnings nopragmas" ; - flags cw CFLAGS illegal-pragmas : "-warnings pragmas" ; - flags cw CFLAGS no-empty-declarations : "-warnings noempty" ; - flags cw CFLAGS empty-declarations : "-warnings empty" ; - flags cw CFLAGS no-empty-declarations : "-warnings noempty" ; - flags cw CFLAGS empty-declarations : "-warnings empty" ; - flags cw CFLAGS no-unwanted-effect : "-warnings nounwanted" ; - flags cw CFLAGS unwanted-effect : "-warnings unwanted" ; - flags cw CFLAGS no-unused-arg : "-warnings nounusedarg" ; - flags cw CFLAGS unused-arg : "-warnings unsedarg" ; - flags cw CFLAGS no-unused-var : "-warnings nounusedvar" ; - flags cw CFLAGS unused-var : "-warnings unsedvar" ; - flags cw CFLAGS no-extra-comma : "-warnings nocomma" ; - flags cw CFLAGS extra-comma : "-warnings comma" ; - flags cw CFLAGS no-pedantic : "-warnings nopedantic" ; - flags cw CFLAGS pedantic : "-warnings pedantic" ; - flags cw CFLAGS no-hidden-virtual : "-warnings nohidden" ; - flags cw CFLAGS hidden-virtual : "-warnings hidden" ; - flags cw CFLAGS no-implicit-convert : "-warnings noimplicit" ; - flags cw CFLAGS implicit-convert : "-warnings implicit" ; - flags cw CFLAGS no-not-inlined : "-warnings nonotinlined" ; - flags cw CFLAGS not-inlined : "-warnings notinlined" ; - flags cw CFLAGS no-inconsistent-class : "-warnings nostructclass" ; - flags cw CFLAGS inconsistent-class : "-warnings structclass" ; - if $(NT) - { - flags cw CFLAGS no-unused-expresssion : "-warnings nounusedexpr" ; - flags cw CFLAGS unused-expresssion : "-warnings unsedexpr" ; - flags cw CFLAGS no-structure-pad : "-warnings nopadding" ; - flags cw CFLAGS structure-pad : "-warnings padding" ; - flags cw CFLAGS no-unused-return : "-warnings nonotused" ; - flags cw CFLAGS unused-return : "-warnings notused" ; - flags cw CFLAGS no-pointer-conversion : "-warnings noptrintconv" ; - flags cw CFLAGS pointer-conversion : "-warnings ptrintconv" ; - } -} -else -{ - if $(NT) - { - flags cw CFLAGS : "-warnings nounusedexpr,nounused" ; - } - else - { - flags cw CFLAGS : "-warnings nounused" ; - } -} - -# Search for files in search paths -flags cw LINKFLAGS : -search ; -flags cw ARFLAGS : -search ; - -# Version specific options -if $(cw-version) in 8.0 9.0 -{ - # Use latest ISO conforming templates - flags cw C++FLAGS : -iso_templates on ; - - if $(NT) - { - # The runtime libraries - flags cw CFLAGS static/single/release : -runtime ss ; - flags cw CFLAGS static/single/debug : -runtime ssd ; - - flags cw CFLAGS static/multi/release : -runtime sm ; - flags cw CFLAGS static/multi/debug : -runtime smd ; - - flags cw CFLAGS dynamic/release : -runtime dm ; - flags cw CFLAGS dynamic/debug : -runtime dmd ; - } -} -if $(NT) && $(cw-version) in 6.0 7.0 8.0 -{ - flags cw PREFIX console/dynamic : UseDLLPrefix.h ; -} -if $(NT) && $(cw-version) in 7.0 -{ - # The runtime libraries - flags cw STDLIBS static/release : - MSL_C_x86.lib MSL_Runtime_x86.lib msl_c++_x86.lib gdi32.lib user32.lib kernel32.lib ; - flags cw STDLIBS dynamic/release : - MSL_All-DLL_x86.lib gdi32.lib user32.lib kernel32.lib ; - flags cw STDLIBS static/debug : - MSL_C_x86_D.lib MSL_Runtime_x86_D.lib msl_c++_x86_D.lib gdi32.lib user32.lib kernel32.lib ; - flags cw STDLIBS dynamic/debug : - MSL_All-DLL_x86_D.lib gdi32.lib user32.lib kernel32.lib ; -} -if $(NT) && $(cw-version) in 6.0 -{ - # The runtime libraries - flags cw STDLIBS static : - ansicx86.lib mwcrtl.lib ansicppx86.lib gdi32.lib user32.lib kernel32.lib ; - flags cw STDLIBS dynamic : - mwcrtldll.lib gdi32.lib user32.lib kernel32.lib ; -} - -# The paths to system and runtime libraries -if $(NT) -{ - flags cw CW_SETUP : "call \"$(cw-root)\\Other Metrowerks Tools\\Command Line Tools\\cwenv.bat\" -quiet" ; - # This is needed after the setup because the CW-9 setup erronously sets the - # ERRORLEVEL pseudo-var directly overriding the real value. The aregument is - # quoted to prevent the value from getting set to " " because bjam insertes - # extra spaces at the end of action commands. - flags cw CW_CLEAR_ERROR : "set \"ERRORLEVEL=\"" ; - flags cw CW_LINK_SETUP : "set MWWinx86LibraryFiles=" ; - flags cw CW_IMPLIB_COMMAND : "-implib " ; - flags cw CW_RUN_PATH : - "$(cw-root)\\Win32-x86 Support\\Libraries\\Runtime" - "$(cw-root)\\Win32-x86 Support\\Libraries\\Runtime\\Libs\\MSL_All-DLLs" ; - - flags cw STDLIBPATH : "$(cw-root)\\Win32-x86 Support\\Libraries\\Win32 SDK" ; - flags cw STDLIBPATH static : "$(cw-root)\\Win32-x86 Support\\Libraries\\Runtime\\Libs" ; - flags cw STDLIBPATH dynamic : "$(cw-root)\\Win32-x86 Support\\Libraries\\Runtime\\Libs\\MSL_All-DLLs" ; -} - -# Don't wrap tool messages, they just confuse everyone :-) -flags cw FLAGS : -nowraplines ; - -flags cw CW_PREFIX : "-prefix " ; - -# CodeWarrior has it's own set of standard headers, so ignore the default. -flags cw STDHDRS : ; - -# MacOSX.. only the MSL/Carbon/Mach-O combination is working. -if $(OS) = MACOSX -{ - # We use the compiler for both compiles and link, because we may need - # to compile the console stubs source. The compiler passes all options - # down to the linker anyway. - flags cw MWCC : mwcc ; - flags cw MWLD : mwcc ; - # For Carbon we need this prefix file to tell CW that's what we are targetting. - flags cw PREFIX : MSLCarbonPrefix.h ; - # We need to add the framework, as it's not added automatically. - flags cw FRAMEWORKS : Carbon ; - # For comsole apps we need to compile in the MSL functions that will - # talk to the MacOSX console. - flags cw LINKFLAGS console : - "-prefix MSLCarbonPrefix.h" - "\"$(CWINSTALL)/MSL/MSL_C/MSL_MacOS/Src/console_OS_X.c\"" ; -} - -if $(NT) -{ - flags cw MWCC : mwcc ; - flags cw MWLD : mwld ; -} - -#~ flags cw CFLAGS : -verbose ; -#~ flags cw LINKFLAGS : -verbose ; - -#### Link #### -rule Link-action -{ - _ on $(<) = " " ; - gRUN_PATH($(<)) += $(CW_RUN_PATH) ; - if $(NT) - { - # We can't have the mixture of the same libs going in NEEDLIBS and FINDLIBS. - # So remove the extras from FINDLIBS. - local find-libs = - [ difference - [ on $(<[1]) return $(FINDLIBS) ] : - $(gTARGET_BASENAME($(gTARGET_SUBVARIANT($(NEEDLIBS))))) ] ; - FINDLIBS on $(<) = $(find-libs)$(SUFLIB) ; - - CMD on $(<) = "@" ; - with-command-file cw-Link-action $(<) : $(>) $(NEEDLIBS) $(NEEDIMPS) ; - } - else if $(OS) = MACOSX - { - local find-libs = [ on $(<[1]) return $(FINDLIBS) ] ; - FINDLIBS on $(<) = -l$(find-libs) ; - - CMD on $(<) = "" ; - cw-Link-action $(<) : $(>) $(NEEDLIBS) $(NEEDIMPS) ; - } -} - -actions cw-Link-action -{ - $(CW_SETUP) - $(CW_CLEAR_ERROR) - $(CW_LINK_SETUP)$(STDLIBS:J=;) - $(MWLD) $(FLAGS) $(LINKFLAGS) "-L$(LIBPATH)" "-L$(STDLIBPATH)" -framework$(_)"$(FRAMEWORKS)" $(CW_IMPLIB_COMMAND)"$(<[2])" -o "$(<[1])" $(CMD)"$(>)" "$(FINDLIBS)" -} - -#### Cc ##### -rule Cc-action -{ - _ on $(<) = " " ; - cw-Cc-action $(<) : $(>) ; -} - -actions cw-Cc-action -{ - $(CW_SETUP) - $(CW_CLEAR_ERROR) - $(MWCC) -c -lang c -U$(UNDEFS) -D$(DEFINES) $(FLAGS) $(CFLAGS) "-I$(HDRS)" -I-$(_)"-I$(STDHDRS)" -I-$(_)"-I$(SYSHDRS)" $(CW_PREFIX)"$(PREFIX)" -o "$(<)" "$(>)" -} - -#### C++ #### -rule C++-action -{ - _ on $(<) = " " ; - cw-C++-action $(<) : $(>) ; -} - -actions cw-C++-action -{ - $(CW_SETUP) - $(CW_CLEAR_ERROR) - $(MWCC) -c -lang c++ -U$(UNDEFS) -D$(DEFINES) $(FLAGS) $(CFLAGS) $(C++FLAGS) "-I$(HDRS)" -I-$(_)"-I$(STDHDRS)" -I-$(_)"-I$(SYSHDRS)" $(CW_PREFIX)"$(PREFIX)" -o "$(<)" "$(>)" -} - -#### Archive #### -rule Archive-action -{ - _ on $(<) = " " ; - if $(NT) - { - local find-libs = [ on $(<[1]) return $(FINDLIBS) ] ; - FINDLIBS on $(<) = $(find-libs)$(SUFLIB) ; - - CMD on $(<) = "@" ; - with-command-file cw-Archive-action $(<) : $(>) [ on $(<) return $(NEEDLIBS) ] ; - } - else if $(OS) = MACOSX - { - local find-libs = [ on $(<[1]) return $(FINDLIBS) ] ; - FINDLIBS on $(<) = -l$(find-libs) ; - - CMD on $(<) = "" ; - cw-Archive-action $(<) : $(>) [ on $(<) return $(NEEDLIBS) ] ; - } -} - -## CW in general doesn't produce archive that ranlib is intereted in. So -## don't run ranlib. -rule Ranlib-action -{ -} - -actions together cw-Archive-action -{ - $(CW_SETUP) - $(CW_CLEAR_ERROR) - $(MWLD) -library $(FLAGS) $(ARFLAGS) "-L$(LIBPATH)" "-L$(STDLIBPATH)" -o "$(<)" $(CMD)"$(>)" "$(FINDLIBS)" -} diff --git a/v1/darwin-tools.html b/v1/darwin-tools.html deleted file mode 100644 index be240c5ec..000000000 --- a/v1/darwin-tools.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - Boost.Build - darwin toolset - - - - - - - - - -
-

-

-
-

Boost.Build

- -

darwin toolset

-
-
- -

Introduction

- -

Boost.Build's darwin toolset supports the Apple modified GNU GCC command-line - tools. Although the underlying tools are GCC this toolset is specifically - tailored to account for the various "features" that Apple implemented to - work in the Darwin OS Mach kernel.

- -

Configuration - Variables

Because of the already specific nature of this toolset - there are no additional configuration variables. - -

Toolset-Specific Features

The - following darwin-specific features can be used in target build - requirements or in the BUILD variable: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureValuesDefaultSemantics
framework(free feature)N/AAdds application "Frameworks" to use for linking.
bundle-loader(free feature)N/ASpecifies the path to the application that will be loading this - "bundle". When this is specified, and building a DLL target, a "bundle" - version of the target is built instead of the regular shared library - version.
-
- -

Revised - - 16 November, 2002 -

- -

Copyright © Dave Abrahams 2002.

- -

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

- - diff --git a/v1/darwin-tools.jam b/v1/darwin-tools.jam deleted file mode 100644 index 301393fa4..000000000 --- a/v1/darwin-tools.jam +++ /dev/null @@ -1,230 +0,0 @@ -# (C) Copyright Rene Rivera, 2002-2003. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# The following #// line will be used by the regression test table generation -# program as the column heading for HTML tables. Must not include version number. -#//GNU
GCC
- -# For adding framwork libraries; like Python, Carbon, etc. -free-feature framework ; - -# Specify the loader for bundles. -free-feature bundle-loader ; - -# Controll generation of compiler warnings. -feature warnings : on off ; - -# Type of shared object to create. -free-feature link-format ; - -# compute directories for invoking GCC -# -# The gcc toolset can be user-configured using the following -# variables: -# -# GCC_ROOT_DIRECTORY -# The directory in which GCC was installed. Defaults to -# unset. Usually, there is no need to set this variable at -# all. However, if G++ is not in the path it is usually -# sufficient to configure this one variable. More fine-grained -# configuration is available by setting the following: -# -# GCC_BIN_DIRECTORY -# the directory prefix used to find the gcc executables. Defaults to -# $(GCC_ROOT_DIRECTORY)/bin/, or "" if GCC_ROOT_DIRECTORY is -# not set. -# -# GCC_INCLUDE_DIRECTORY -# the directory in which to find system includes. Defaults to -# empty. -# -# GCC_STDLIB_DIRECTORY -# the directory in which to find the standard library -# objects associated with this build of gcc. Defaults to -# $(GCC_ROOT_DIRECTORY)/lib. -# -# GXX -# The name by which g++ is invoked. You can also use this in -# lieu of setting the property to force options such -# as "-V3.0.4" into the g++ command line: "-sGXX=g++ -V3.0.4". -# -# GCC -# Similar to GXX, the name by which gcc is invoked for "C" -# language targets. - -# singleton variables... -set-as-singleton GCC_ROOT_DIRECTORY GCC_BIN_DIRECTORY GCC_INCLUDE_DIRECTORY GCC_STDLIB_DIRECTORY ; - -flags darwin GCC_BIN_DIRECTORY : $(GCC_BIN_DIRECTORY) ; -flags darwin GCC_INCLUDE_DIRECTORY : $(GCC_INCLUDE_DIRECTORY) ; -flags darwin GCC_STDLIB_DIRECTORY : $(GCC_STDLIB_DIRECTORY) ; - -if ! $(GCC_BIN_DIRECTORY) { flags darwin GCC_BIN_DIRECTORY : $(GCC_ROOT_DIRECTORY)/bin/ ; } -if ! $(GCC_BIN_DIRECTORY) { flags darwin GCC_BIN_DIRECTORY : "" ; } -if ! $(GCC_STDLIB_DIRECTORY) { flags darwin GCC_STDLIB_DIRECTORY : $(GCC_ROOT_DIRECTORY)/lib ; } - -flags darwin .GCC_BIN_DIR : $(GCC_BIN_DIRECTORY) ; -flags darwin .GXX : $(GXX) ; -flags darwin .GCC : $(GCC) ; - -if ! $(.GXX) && $(GCC_ROOT_DIRECTORY) { flags darwin .GXX : g++ ; } -if ! $(.GXX) { flags darwin .GXX : c++ ; } -if ! $(.GCC) && $(GCC_ROOT_DIRECTORY) { flags darwin .GCC : gcc ; } -if ! $(.GCC) { flags darwin .GCC : cc ; } - -flags darwin CFLAGS ; -flags darwin C++FLAGS ; -flags darwin DEFINES ; -flags darwin UNDEFS ; -flags darwin HDRS ; -flags darwin SYSHDRS ; -flags darwin LIBPATH ; -flags darwin NEEDLIBS ; -flags darwin FINDLIBS ; -flags darwin ARFLAGS ; -flags darwin TARGET_TYPE ; -flags darwin FRAMEWORKS ; -flags darwin DLLVERSION ; -flags darwin DLLVERSION : $(DLLVERSION[1]) ; -flags darwin BUNDLE_LOADER ; -flags darwin ARFLAGS ; - -if ! $(ARFLAGS) { flags darwin ARFLAGS : "" ; } -if ! $(DLLVERSION) { flags darwin DLLVERSION : $(BOOST_VERSION) ; } - -if ! [ MATCH "(gcc)" : $(.GCC) ] -{ - flags darwin CFLAGS : -Wno-long-double -no-cpp-precomp ; -} -# GCC 4.0, the default compiler in Darwin 8.0.0, does not have -# -fcoalesce-templates. GCC 3.3 needs it. -if ! [ MATCH "(g[+][+])" : $(.GXX) ] && $(JAMUNAME[3]) < "8.0.0" || - [ MATCH "(g[+][+]-3.3)" : $(.GXX) ] -{ - flags darwin C++FLAGS : -fcoalesce-templates ; -} -flags darwin LINKFLAGS static : -static-libgcc ; -flags darwin CFLAGS on : -g ; -flags darwin LINKFLAGS on : -g ; -flags darwin LINKFLAGS off : -Wl,-x ; -flags darwin CFLAGS off : -O0 ; -flags darwin CFLAGS speed : -O3 ; -flags darwin CFLAGS space : -Os ; -flags darwin CFLAGS off : -fno-inline ; -flags darwin CFLAGS on : -Wno-inline ; -flags darwin CFLAGS full : -finline-functions -Wno-inline ; -flags darwin CFLAGS on : -pg ; -flags darwin LINKFLAGS on : -pg ; -flags darwin C++FLAGS off : -fno-rtti ; -flags darwin C++FLAGS on : -fvtable-thunks ; -flags darwin C++FLAGS off : -fvtable-thunks=0 ; -flags darwin CFLAGS true : -fPIC ; -flags darwin CFLAGS on : -Wall ; -flags darwin CFLAGS off : -w ; - -flags darwin LINK_FORMAT $(SHARED_TYPES)/bundle : bundle ; -flags darwin LINK_FORMAT $(SHARED_TYPES)/dynamic : dynamic ; -if $(BUNDLE_LOADER) && ! $(LINK_FORMAT) -{ - flags darwin LINK_FORMAT $(SHARED_TYPES) : bundle ; -} - -if $(LINK_FORMAT) = bundle -{ - flags darwin LINKFLAGS $(SHARED_TYPES) : - -bundle ; -} -else -{ -# flags darwin LINKFLAGS $(SHARED_TYPES) : -# -Wl,-dynamic -nostartfiles -Wl,-dylib -Wl,-ldylib1.o ; -} - -flags darwin .LINKFLAGS ; -flags darwin DLLFLAGS : ; -if -bind_at_load in $(.LINKFLAGS) -{ - flags darwin DLLFLAGS $(SHARED_TYPES) : -bind_at_load ; - .LINKFLAGS = [ difference $(.LINKFLAGS) : -bind_at_load ] ; -} -flags darwin LINKFLAGS : $(.LINKFLAGS) ; - - -#### Link #### - -rule Link-action -{ - _ on $(<) = " " ; - DEPENDS $(<) : $(NEEDLIBS) $(NEEDIMPS) ; - if $(TARGET_TYPE) in $(SHARED_TYPES) && $(LINK_FORMAT) != bundle - { - #~ LINKFLAGS on $(<) += - #~ "-Wl,-dylib_compatibility_version,$(DLLVERSION) -W,l-dylib_current_version,$(DLLVERSION)" ; - darwin-Link-DyLib-action $(<) : $(>) ; - } - else - { - darwin-Link-action $(<) : $(>) ; - } -} - -actions darwin-Link-action bind NEEDLIBS NEEDIMPS -{ - $(SHELL_SET)$(gSHELL_LIBPATH)=$(LINK_LIBPATH) - $(SHELL_EXPORT)$(gSHELL_LIBPATH) - $(.GCC_BIN_DIR)$(.GXX) $(LINKFLAGS) -o "$(<[1])" "$(>)" \ - -F$(FRAMEWORKS:D) -framework$(_)$(FRAMEWORKS:D=) \ - -L"$(LIBPATH:T)" -L"$(STDLIBPATH:T)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) \ - -bundle_loader$(_)"$(BUNDLE_LOADER)" "$(BUNDLE_LOADER)" -} - -actions darwin-Link-DyLib-action bind NEEDLIBS NEEDIMPS -{ - $(SHELL_SET)$(gSHELL_LIBPATH)=$(LINK_LIBPATH) - $(SHELL_EXPORT)$(gSHELL_LIBPATH) - ld -dynamic -m -r -d $(DLLFLAGS) -o "$(<[1]:S=.lo)" "$(>)" \ - && \ - $(.GCC_BIN_DIR)$(.GXX) $(LINKFLAGS) -o "$(<[1])" "$(<[1]:S=.lo)" \ - -F$(FRAMEWORKS:D) -framework$(_)$(FRAMEWORKS:D=) \ - -L"$(LIBPATH:T)" -L"$(STDLIBPATH:T)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) -dynamiclib -install_name "$(<[1]:D=:S=.dylib)" \ - && \ - rm -f "$(<[1]:S=.lo)" -} - -#### Cc ##### - -rule Cc-action -{ - _ on $(<) = " " ; - darwin-Cc-action $(<) : $(>) ; -} - -actions darwin-Cc-action -{ - $(.GCC_BIN_DIR)$(.GCC) -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -F$(FRAMEWORKS:D) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)" -} - -#### C++ #### -rule C++-action -{ - _ on $(<) = " " ; - darwin-C++-action $(<) : $(>) ; -} - -actions darwin-C++-action -{ - $(.GCC_BIN_DIR)$(.GXX) -c -ftemplate-depth-256 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -F$(FRAMEWORKS:D) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)" -} - -#### Archive #### - -rule Archive-action -{ - darwin-Archive-action $(<) : $(>) ; -} - -actions updated together piecemeal darwin-Archive-action -{ - ar -r -s $(ARFLAGS) "$(<:T)" "$(>:T)" -} diff --git a/v1/distribution.jam b/v1/distribution.jam deleted file mode 100644 index 07d96c1a0..000000000 --- a/v1/distribution.jam +++ /dev/null @@ -1,178 +0,0 @@ -# Copyright 2002 Rene Rivera -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -## -## Distribution module, contains rules for management of distributions. -## Like management of version headers, packaging, etc. -## All the rules here operate on a set of global target all of which -## start with "dist", are NOTFILES, and can only be built from the -## top-level. -## - -# Add the version information for the given 'name' component, to the -# given target header. Instructions are generated to construct a C header file -# with the version information specified by 'target'. -# -# EXAMPLE: -# -# SEARCH on distribution.jam = $(BOOST_BUILD_PATH) ; -# module distribution { include distribution.jam ; } -# -# distribution.version-header boost/version.hpp -# : Boost 1.27 -# "// boost version.hpp header file -------------------------------------------//" -# "" -# "// (C) Copyright boost.org 1999. Permission to copy, use, modify, sell" -# "// and distribute this software is granted provided this copyright" -# "// notice appears in all copies. This software is provided \"as is\" without" -# "// express or implied warranty, and with no claim as to its suitability for" -# "// any purpose." -# "" -# "// See http://www.boost.org for most recent version including documentation." -# ; -# -# PRODUCES: -# -# [boost/version.hpp] -# -# // boost version.hpp header file -------------------------------------------// -# -# // (C) Copyright boost.org 1999. Permission to copy, use, modify, sell -# // and distribute this software is granted provided this copyright -# // notice appears in all copies. This software is provided "as is" without -# // express or implied warranty, and with no claim as to its suitability for -# // any purpose. -# -# // See http://www.boost.org for most recent version including documentation. -# -# #ifndef BOOST_VERSION_DEF -# #define BOOST_VERSION_DEF -# #define BOOST_VERSION_STRING "Boost 1.27" -# #define BOOST_VERSION_MAJOR 1 -# #define BOOST_VERSION_MINOR 27 -# #define BOOST_VERSION_SUBMINOR 0 -# #define BOOST_VERSION 102700 -# #endif -# -# IFF: -# -# [When at the root of the project.] -# $shell> jam dist -# -rule version-header ( target : name version comment-text * ) -{ - local target-dir = - [ tokens-to-simple-path [ top-relative-tokens [ directory-of $(target) ] ] ] ; - local target-id = - [ target-id-of $(target) ] ; - - # Translat the name & version into the various version info definitions. - # - local s = " " ; - local target-suffix = [ MATCH .(.*) : $(target:S) ] ; - local target-tag = [ join [ split-path $(target-dir) ] $(target:B) $(target-suffix) : "_" ] ; - target-tag = $(target-tag:U) ; - local name-tag = [ join [ split $(name:U) "\\." ] : "_" ] ; - local version-parts = ; - local t ; - t = [ MATCH ^(.*)\\.(.*) : $(version) ] ; - version-parts += $(t[1]) ; - t = [ MATCH ^(.*)\\.(.*)\\.* : $(version) ] ; - version-parts += $(t[2]) ; - t = [ MATCH ^(.*)\\.(.*)\\.(.*) : $(version) ] ; - version-parts += $(t[3]) ; - if ! $(version-parts[2]) { version-parts += 0 0 ; } - if ! $(version-parts[3]) { version-parts += 0 ; } - local version-id = $(version-parts[1]) ; - switch $(version-parts[2]) - { - case ? : version-id = $(version-id)00$(version-parts[2]) ; - case ?? : version-id = $(version-id)0$(version-parts[2]) ; - case ??? : version-id = $(version-id)$(version-parts[2]) ; - case * : version-id = $(version-id)000 ; - } - switch $(version-parts[3]) - { - case ? : version-id = $(version-id)0$(version-parts[3]) ; - case ?? : version-id = $(version-id)$(version-parts[3]) ; - case * : version-id = $(version-id)00 ; - } - - # Set Jam variables to the version info definitions for use in things like - # sonaming, etc. - # - $(name:U)_VERSION ?= $(version) ; - $(name:U)_VERSION_MAJOR ?= $(version-parts[1]) ; - $(name:U)_VERSION_MINOR ?= $(version-parts[2]) ; - $(name:U)_VERSION_SUBMINOR ?= $(version-parts[3]) ; - $(name:U)_VERSION_STRING ?= $(name)$(s)$(version) ; - - # Generate instructions to build the header file, but only if not in - # dependency stage. - # - if ! $(gIN_LIB_INCLUDE) - { - TARGET_TAG on $(target-id) = - $(target-tag) ; - VERSION($(name-tag)) on $(target-id) = - "$(name) $(version)" - $(version-parts[1]) $(version-parts[2]) $(version-parts[3]) - $(version-id) ; - NOCARE $(name-tag) ; - NOTFILE $(name-tag) ; - MODE on $(target-id) = $(FILEMODE) ; - ALWAYS $(target-id) ; - - MakeLocate $(target-id) : $(target-dir) ; - Clean dist-clean : $(target-id) ; - version-header-create $(target-id) ; - local comment-line-tag = COMMENT_TEXT_ ; - for local comment-line in $(comment-text) - { - comment-line-tag = $(comment-line-tag)% ; - NOCARE $(comment-line-tag) ; - NOTFILE $(comment-line-tag) ; - $(comment-line-tag) on $(target-id) = $(comment-line) ; - version-header-comment $(target-id) : $(comment-line-tag) ; - } - version-header-def $(target-id) : $(name-tag) ; - } - - # Add the header to the top-level "dist" target. - # - if $($(gTOP)) = "." - { - declare-fake-targets dist : $(target-id) ; - } -} - -# Creates initial empty version header, with correct permissions. -# -actions together version-header-create -{ - echo > $(<) - $(CHMOD) $(MODE) $(<) -} - -# Append a single comment line to the header. -# -actions version-header-comment -{ - echo '$($(>))' >> $(<) -} - -# Append the version info definitions of a single module to the header. -# -actions version-header-def -{ - echo >> $(<) - echo '#ifndef $(>)_VERSION_DEF' >> $(<) - echo '#define $(>)_VERSION_DEF' >> $(<) - echo '#define $(>)_VERSION_STRING "$(VERSION($(>))[1])"' >> $(<) - echo '#define $(>)_VERSION_MAJOR $(VERSION($(>))[2])' >> $(<) - echo '#define $(>)_VERSION_MINOR $(VERSION($(>))[3])' >> $(<) - echo '#define $(>)_VERSION_SUBMINOR $(VERSION($(>))[4])' >> $(<) - echo '#define $(>)_VERSION $(VERSION($(>))[5])' >> $(<) - echo "#endif" >> $(<) -} diff --git a/v1/dmc-stlport-tools.html b/v1/dmc-stlport-tools.html deleted file mode 100644 index f917a3c7e..000000000 --- a/v1/dmc-stlport-tools.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - Boost.Build - dmc-stlport toolset - - - - - - - - - - - -
-

C++ Boost

-
-

Boost.Build

- -

dmc-stlport toolset

-
-
- -

Introduction

- -

Boost.Build's dmc-stlport toolset - supports the Digital Mars C++ - command-line tools, using the STLport - standard library implementation. It is designed to allow you to build and - test with multiple installed versions of STLPort, so that objects build in - each configuration will be built into separate directories.

- -

In addition to what this toolset provides, configuration and extended - functionality is available through the common stlport library support.

-
- -

Revised $Date$

- -

Copyright © Dave Abrahams 2002, Aleksey Gurtovoy 2004, Rene Rivera - 2005.

- -

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

- - diff --git a/v1/dmc-stlport-tools.jam b/v1/dmc-stlport-tools.jam deleted file mode 100644 index aa8c60d54..000000000 --- a/v1/dmc-stlport-tools.jam +++ /dev/null @@ -1,21 +0,0 @@ -# Digital Mars C++/STLPort - -# (C) Copyright Aleksey Gurtovoy 2004. -# -# Distributed under the Boost Software License, Version 1.0. (See -# accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -# The following #// line will be used by the regression test table generation -# program as the column heading for HTML tables. Must not include version number. -#//Digital
Mars C++
- -extends-toolset dmc ; - -flags $(gCURRENT_TOOLSET) STLPORT_LIB_BASE_NAME ; - -STLPORT_LIB_BASE_NAME ?= stlp45dm ; - -SEARCH on stlport.jam = $(BOOST_BUILD_PATH) ; -include stlport.jam ; - diff --git a/v1/dmc-tools.html b/v1/dmc-tools.html deleted file mode 100644 index 4ebf102f8..000000000 --- a/v1/dmc-tools.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - Boost.Build - dmc toolset - - - - - - - - - -
-

-

-
-

Boost.Build

- -

dmc toolset

-
-
- -

Introduction

- -

Boost.Build's dmc toolset supports the - Digital Mars C++ command-line - tools.

- -

Configuration - Variables

- -

The dmc toolset responds to the following variables, which - can be set in the environment or configured on the jam command-line using - -sVARIABLE_NAME=value:

- - - - - - - - - - - - - - - - - - - - - -
Variable NameSemanticsDefaultNotes
DMC_ROOTThe path to the Digital Mars C++ installation directoryemptyFor example, C:\Program Files\Digital Mars
-
- -

Revised - - 31 July, 2004 -

- -

Copyright © Dave Abrahams 2002, Aleksey Gurtovoy 2004.

- -

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

- - diff --git a/v1/dmc-tools.jam b/v1/dmc-tools.jam deleted file mode 100644 index 38d5e5e35..000000000 --- a/v1/dmc-tools.jam +++ /dev/null @@ -1,106 +0,0 @@ -# Digital Mars C++ - -# (C) Copyright Christof Meerwald 2003. -# (C) Copyright Aleksey Gurtovoy 2004. -# -# Distributed under the Boost Software License, Version 1.0. (See -# accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -# The following #// line will be used by the regression test table generation -# program as the column heading for HTML tables. Must not include version number. -#//Digital
Mars C++
- -set-as-singleton DMC_ROOT DMC_BIN_DIR ; - -DMC_COMPILER = dmc ; -DMC_LINKER = link ; -DMC_ARCHIVE = lib ; - -DMC_ROOT = $(DMC_ROOT:J=" ") ; -DMC_BIN_DIR ?= "$(DMC_ROOT)"$(SLASH)bin$(SLASH) ; - -flags dmc CFLAGS on/object : -g ; -flags dmc LINKFLAGS on : -co ; - -flags dmc CFLAGS off : -S -o+none ; -flags dmc CFLAGS speed : -o+time ; -flags dmc CFLAGS space : -o+space ; -flags dmc CFLAGS on : -Ae ; -flags dmc CFLAGS on : -Ar ; - -# Note that these two options actually imply multithreading support on DMC -# because there is no single-threaded dynamic runtime library. Specifying -# multi would be a bad idea, though, because no option would be -# matched when the build uses the default settings of dynamic -# and single. -flags dmc CFLAGS release/dynamic : -ND ; -flags dmc CFLAGS debug/dynamic : -ND ; - -flags dmc CFLAGS release/static/single : ; -flags dmc CFLAGS debug/static/single : ; -flags dmc CFLAGS release/static/multi : -D_MT ; -flags dmc CFLAGS debug/static/multi : -D_MT ; - -flags dmc CFLAGS ; -flags dmc C++FLAGS ; -flags dmc DEFINES ; -flags dmc UNDEFS ; -flags dmc HDRS ; -flags dmc SYSHDRS ; -flags dmc LINKFLAGS ; -flags dmc ARFLAGS ; - -flags dmc LIBPATH ; -flags dmc NEEDLIBS ; -flags dmc FINDLIBS ; -flags dmc LINKFLAGS $(SHARED_TYPES) : ; - -flags msvc STDHDRS : $(DMC_ROOT)$(SLASH)include ; - - -#### Link #### - -rule Link-action ( target implib ? : sources + : target-type ? ) -{ - dmc-Link-action $(<) : $(sources) $(NEEDLIBS) ; -} - -actions together dmc-Link-action -{ - "$(DMC_BIN_DIR)$(DMC_LINKER)" $(LINKFLAGS) -delexecutable -noi -implib:"$(<[2])" "$(>)" , "$(<[1])" , NUL , user32.lib kernel32.lib "$(FINDLIBS:S=.lib)" , "$(<[2]:B).def" -} - -#### Cc ##### - -rule Cc-action -{ - dmc-Cc-action $(<) : $(>) ; -} - -actions dmc-Cc-action -{ - "$(DMC_BIN_DIR)$(DMC_COMPILER)" -c -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o"$(<)" "$(>)" -} - -#### C++ #### -rule C++-action -{ - dmc-C++-action $(<) : $(>) ; -} - -actions dmc-C++-action -{ - "$(DMC_BIN_DIR)$(DMC_COMPILER)" -cpp -c -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o"$(<)" "$(>)" -} - -#### Archive #### -rule Archive-action -{ - dmc-Archive-action $(<) : $(>) ; -} - -actions together piecemeal dmc-Archive-action -{ - "$(DMC_BIN_DIR)$(DMC_ARCHIVE)" $(ARFLAGS) -c -n -p128 "$(<)" "$(>)" -} diff --git a/v1/edg-tools.html b/v1/edg-tools.html deleted file mode 100644 index b7246795f..000000000 --- a/v1/edg-tools.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - Boost.Build - edg toolset - - - - - - - - - -
-

-

-
-

Boost.Build

- -

edg toolset

-
-
- -

Introduction

- -

Boost.Build's edg toolset supports the Edison Design Group C/C++ compiler front-end - (evaluation version).

- -

Configuration Variables

The edg toolset responds to the following - variables which can be set in the environment or configured on the jam - command-line using -sVARIABLE_NAME=value: - - - - - - - - - - - - - - - - - - - - - -
Variable NameSemanticsDefaultNotes
ECCPName and (optional) path of the eccp executable.(none)If not set, eccp must be available in the search - path.
-
- -

Revised - - 09 Jul, 2003

- -

Copyright 2003 Jens - Maurer.

- -

Distributed under the Boost Software License, Version 1.0. (See - accompanying file LICENSE_1_0.txt or - copy at www.boost.org/LICENSE_1_0.txt)

- - diff --git a/v1/edg-tools.jam b/v1/edg-tools.jam deleted file mode 100644 index 84bca8848..000000000 --- a/v1/edg-tools.jam +++ /dev/null @@ -1,91 +0,0 @@ -# (C) Copyright Jens Maurer 2003. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# The following #// line will be used by the regression test table generation -# program as the column heading for HTML tables. Must not include version number. -#//EDG
C++
- -# variables used to configure eccp-tools.jam -# -# ECCP - name of eccp executable - -ECCP ?= eccp ; - -flags edg C++FLAGS off : --no_exceptions ; -flags edg C++FLAGS on : --exceptions ; - -flags edg CFLAGS off : --no_inlining ; -flags edg CFLAGS on full : --inlining ; - -flags edg CFLAGS off : -O0 ; -flags edg CFLAGS speed : -O3 ; -flags edg CFLAGS size : -Os ; - -flags edg CFLAGS true : --pic ; -flags edg CFLAGS on : -g ; -flags edg LINKFLAGS on : -g ; -flags edg CFLAGS on : -pg ; -flags edg LINKFLAGS on : -pg ; - -flags edg CFLAGS ; -flags edg C++FLAGS ; -flags edg DEFINES ; -flags edg UNDEFS ; -flags edg HDRS ; -flags edg SYSHDRS ; -flags edg LINKFLAGS ; -flags edg ARFLAGS ; - -flags edg LIBPATH ; -flags edg NEEDLIBS ; -flags edg FINDLIBS ; - -#### Link #### - -rule Link-action -{ - edg-Link-action $(<) : $(>) ; -} - -actions edg-Link-action bind NEEDLIBS -{ - $(ECCP) $(LINKFLAGS) -tused -o "$(<[1])" "$(>)" "$(NEEDLIBS)" "$(FINDLIBS:S=.so)" -} - - -#### Cc ##### - -rule Cc-action -{ - edg-Cc-action $(<) : $(>) ; -} - -actions edg-Cc-action -{ - $(ECCP) -c --c99 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)" -} - -#### C++ #### -rule C++-action -{ - edg-C++-action $(<) : $(>) ; -} - -actions edg-C++-action -{ - $(ECCP) -tused -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)" -} - -#### Archive #### - -rule Archive-action -{ - edg-Archive-action $(<) : $(>) ; -} - -actions updated together piecemeal edg-Archive-action -{ - ar rc $(<) $(>) -} - diff --git a/v1/example/boost-build.jam b/v1/example/boost-build.jam deleted file mode 100644 index 1bd4e62bf..000000000 --- a/v1/example/boost-build.jam +++ /dev/null @@ -1,5 +0,0 @@ -# (C) Copyright Rene Rivera, 2003. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -boost-build .. ; diff --git a/v1/example/lib_use/Jamfile b/v1/example/lib_use/Jamfile deleted file mode 100644 index efdf49ee7..000000000 --- a/v1/example/lib_use/Jamfile +++ /dev/null @@ -1,51 +0,0 @@ -# (C) Copyright Rene Rivera, 2002, 2005. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# Example of how to define and depend on a library target. -# This is for Boost.Build-V1 - -subproject tools/build/v1/example/lib_use ; - -# Declare the library target. Composed of a single source file. -# The real name of the target will vary according to the build -# build platform. For example in Unix it will generate a file -# named "libsimple.a". -# -# In this example the default build is given so that it builds -# two default versions of the library: debug with single-threading, -# and debug with multi-threading. -# -lib simple - : - # SOURCES - simple_lib.cpp - : - # REQUIREMENTS - : - # DEFAULT BUILDS - debug single/multi - ; - -# Declare an executable target that uses the library. -# Here the executable has a single source file, but also -# depends on the above library. Therefore this executable -# has the additional source file as generated by the library -# target. -# -# This target also specifies the requirement that it be built -# as multi-threaded. This also forces which variant of the library -# is used, and in this case, regardless of the build requested on this -# target. -# -exe simple - : - # SOURCES - simple.cpp - simple - : - # REQUIREMENTS - multi - : - # DEFAULT BUILDS - ; diff --git a/v1/example/lib_use/simple.cpp b/v1/example/lib_use/simple.cpp deleted file mode 100644 index bd3595f31..000000000 --- a/v1/example/lib_use/simple.cpp +++ /dev/null @@ -1,17 +0,0 @@ -/* (C) Copyright Rene Rivera, 2002. -** Distributed under the Boost Software License, Version 1.0. -** (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -*/ - -#include - -extern int lib_call(int x); - -int main(int /* argc */, char ** /* argv */) -{ - for (int i = 0; i < 16; ++i) - { - std::printf("%d * 2 = %d\n",i,lib_call(i)); - } - return 0; -} diff --git a/v1/example/lib_use/simple_lib.cpp b/v1/example/lib_use/simple_lib.cpp deleted file mode 100644 index 842759c73..000000000 --- a/v1/example/lib_use/simple_lib.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* (C) Copyright Rene Rivera, 2002. -** Distributed under the Boost Software License, Version 1.0. -** (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -*/ - -extern int lib_call(int x); - -int lib_call(int x) -{ - return x*2; -} diff --git a/v1/example/property_rule/Jamfile b/v1/example/property_rule/Jamfile deleted file mode 100644 index 66ff0c11e..000000000 --- a/v1/example/property_rule/Jamfile +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright David Abrahams 2002. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -subproject tools/build/examples/property_rule ; - -rule add-include ( toolset variant : properties * ) -{ - return $(properties) $($(gTOP))/inc ; -} - -lib foo : foo.cpp : add-include on ; -exe bar : bar.cpp foo : add-include ; diff --git a/v1/example/property_rule/bar.cpp b/v1/example/property_rule/bar.cpp deleted file mode 100644 index 5ca5d1652..000000000 --- a/v1/example/property_rule/bar.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -#include -int main() { foo(); return 0; } diff --git a/v1/example/property_rule/foo.cpp b/v1/example/property_rule/foo.cpp deleted file mode 100644 index 622c03ff7..000000000 --- a/v1/example/property_rule/foo.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -#include -void foo() {} diff --git a/v1/example/property_rule/inc/foo.hpp b/v1/example/property_rule/inc/foo.hpp deleted file mode 100644 index b68878bd6..000000000 --- a/v1/example/property_rule/inc/foo.hpp +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -#ifndef FOO_DWA2002712_HPP -# define FOO_DWA2002712_HPP - -void foo(); - -#endif // FOO_DWA2002712_HPP diff --git a/v1/example/property_rule/project-root.jam b/v1/example/property_rule/project-root.jam deleted file mode 100644 index 0ca8cbef5..000000000 --- a/v1/example/property_rule/project-root.jam +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright David Abrahams 2002. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# empty diff --git a/v1/example/stage_source_selection/Jamfile b/v1/example/stage_source_selection/Jamfile deleted file mode 100644 index 552a40230..000000000 --- a/v1/example/stage_source_selection/Jamfile +++ /dev/null @@ -1,55 +0,0 @@ -# (C) Copyright Rene Rivera, 2002. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# Example of how to select the targets included in a stage depending -# on the variant to build. -# -# This is for Boost.Build-V1 - -subproject tools/build/examples/stage_source_selection ; - -# Simple executable. -# -exe simple0 - : - # SOURCES - simple.cpp - : - # REQUIREMENTS - : - # DEFAULT BUILDS - debug - ; - -# Another simple executable. Here it's the same program source -# as the above, but this is only to simplify the example. -# -exe simple1 - : - # SOURCES - simple.cpp - : - # REQUIREMENTS - : - # DEFAULT BUILDS - debug - ; - -# The stage that builds the two different targets into the -# single stage directory. Both debug and release builds are -# done by default. When soing a "debug" build only the -# "simple0" source is copied to the stage. And conversly -# on a "release" build only the "simple1" source is copied. -# -stage run - : - # SOURCES - simple0 - simple1 - : - # TAGS - : - # DEFAULT BUILDS - debug release - ; diff --git a/v1/example/stage_source_selection/simple.cpp b/v1/example/stage_source_selection/simple.cpp deleted file mode 100644 index c8995e0f0..000000000 --- a/v1/example/stage_source_selection/simple.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* (C) Copyright Rene Rivera, 2002. -** Distributed under the Boost Software License, Version 1.0. -** (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -*/ - -#include - -int main(int /* argc */, char ** /* argv */) -{ - for (int i = 0; i < 16; ++i) - { - std::printf("%d * 2 = %d\n",i,i*2); - } - return 0; -} diff --git a/v1/example/sublib_use/Jamfile b/v1/example/sublib_use/Jamfile deleted file mode 100644 index 731c2f044..000000000 --- a/v1/example/sublib_use/Jamfile +++ /dev/null @@ -1,10 +0,0 @@ -# (C) Copyright Rene Rivera, 2003. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# Example of how to define and depend on a library target. -# This is for Boost.Build-V1 - -project-root ; -subinclude sublib ; -subinclude subexe ; diff --git a/v1/example/sublib_use/sub/Jamfile b/v1/example/sublib_use/sub/Jamfile deleted file mode 100644 index b67cbefcc..000000000 --- a/v1/example/sublib_use/sub/Jamfile +++ /dev/null @@ -1,31 +0,0 @@ -# (C) Copyright Rene Rivera, 2003. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# Example of how to define and depend on a library target. -# This is for Boost.Build-V1 - -subproject sub ; - -# Declare an executable target that uses the library. -# Here the executable has a single source file, but also -# depends on the above library. Therefore this executable -# has the additional source file as generated by the library -# target. -# -# This target also specifies the requirement that it be built -# as multi-threaded. This also forces which variant of the library -# is used, and in this case, regardless of the build requested on this -# target. -# -exe simple - : - # SOURCES - simple.cpp - ../sublib/simple - : - # REQUIREMENTS - multi - : - # DEFAULT BUILDS - ; diff --git a/v1/example/sublib_use/sub/simple.cpp b/v1/example/sublib_use/sub/simple.cpp deleted file mode 100644 index 8e13c96e8..000000000 --- a/v1/example/sublib_use/sub/simple.cpp +++ /dev/null @@ -1,17 +0,0 @@ -/* (C) Copyright Rene Rivera, 2003. -** Distributed under the Boost Software License, Version 1.0. -** (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -*/ - -#include - -extern int lib_call(int x); - -int main(int /* argc */, char ** /* argv */) -{ - for (int i = 0; i < 16; ++i) - { - std::printf("%d * 2 = %d\n",i,lib_call(i)); - } - return 0; -} diff --git a/v1/example/sublib_use/sublib/Jamfile b/v1/example/sublib_use/sublib/Jamfile deleted file mode 100644 index 6b2931936..000000000 --- a/v1/example/sublib_use/sublib/Jamfile +++ /dev/null @@ -1,28 +0,0 @@ -# (C) Copyright Rene Rivera, 2003. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# Example of how to define and depend on a library target. -# This is for Boost.Build-V1 - -subproject sublib ; - -# Declare the library target. Composed of a single source file. -# The real name of the target will vary according to the build -# build platform. For example in Unix it will generate a file -# named "libsimple.a". -# -# In this example the default build is given so that it builds -# two default versions of the library: debug with single-threading, -# and debug with multi-threading. -# -lib simple - : - # SOURCES - simple_lib.cpp - : - # REQUIREMENTS - : - # DEFAULT BUILDS - debug single/multi - ; diff --git a/v1/example/sublib_use/sublib/simple_lib.cpp b/v1/example/sublib_use/sublib/simple_lib.cpp deleted file mode 100644 index a218c27f6..000000000 --- a/v1/example/sublib_use/sublib/simple_lib.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* (C) Copyright Rene Rivera, 2003. -** Distributed under the Boost Software License, Version 1.0. -** (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -*/ - -extern int lib_call(int x); - -int lib_call(int x) -{ - return x*2; -} diff --git a/v1/example/target_test_arg/Jamfile b/v1/example/target_test_arg/Jamfile deleted file mode 100644 index 2102f91e8..000000000 --- a/v1/example/target_test_arg/Jamfile +++ /dev/null @@ -1,29 +0,0 @@ -# (C) Copyright Rene Rivera, 2005. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -subproject tools/build/v1/example/target_test_arg ; - -import testing ; - -dll simple - : # SOURCES - simple_lib.cpp - : # REQUIREMENTS - : # DEFAULT BUILDS - debug release - ; - -run simple.cpp - : # ARGS - : # INPUT FILES - simple - simple_lib.cpp - ../lib_use/simple - : # REQUIREMENTS - : # TEST NAME - simple - : # DEFAULT BUILDS - debug - release - ; diff --git a/v1/example/target_test_arg/simple.cpp b/v1/example/target_test_arg/simple.cpp deleted file mode 100644 index ace3872f5..000000000 --- a/v1/example/target_test_arg/simple.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* (C) Copyright Rene Rivera, 2005. -** Distributed under the Boost Software License, Version 1.0. -** (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -*/ - -#include - -int main(int argc, char ** argv) -{ - for (int i = 0; i < argc; ++i) - { - std::printf("arg #%u = '%s'\n",i,argv[i]); - } - return 1; -} diff --git a/v1/example/target_test_arg/simple_lib.cpp b/v1/example/target_test_arg/simple_lib.cpp deleted file mode 100644 index 842759c73..000000000 --- a/v1/example/target_test_arg/simple_lib.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* (C) Copyright Rene Rivera, 2002. -** Distributed under the Boost Software License, Version 1.0. -** (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -*/ - -extern int lib_call(int x); - -int lib_call(int x) -{ - return x*2; -} diff --git a/v1/example/template_use/Jamfile b/v1/example/template_use/Jamfile deleted file mode 100644 index 4014dd65d..000000000 --- a/v1/example/template_use/Jamfile +++ /dev/null @@ -1,23 +0,0 @@ -# (C) Copyright Rene Rivera, 2002. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# Example of how to define a template. -# This is for Boost.Build-V1 - -subproject tools/build/examples/template_use ; - -# Declare the template as a target. The sources, requirements, and -# default builds sections are copied to the targets that depend (use) -# this template. -# -template t-common - : - # SOURCES - : - # REQUIREMENTS - $(SUBDIR)/include - SOME_DEFINE - : - # DEFAULT BUILDS - ; diff --git a/v1/example/template_use/include/simple.h b/v1/example/template_use/include/simple.h deleted file mode 100644 index 076aad0e8..000000000 --- a/v1/example/template_use/include/simple.h +++ /dev/null @@ -1,11 +0,0 @@ -/* (C) Copyright Rene Rivera, 2002. -** Distributed under the Boost Software License, Version 1.0. -** (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -*/ - -#ifndef simple_h -#define simple_h - -extern int lib_call(int x); - -#endif diff --git a/v1/example/template_use/sub/Jamfile b/v1/example/template_use/sub/Jamfile deleted file mode 100644 index e23fba86c..000000000 --- a/v1/example/template_use/sub/Jamfile +++ /dev/null @@ -1,43 +0,0 @@ -# (C) Copyright Rene Rivera, 2002. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# Example of how to use a template target declared in another project. -# This is for Boost.Build-V1 - -subproject tools/build/examples/template_use/sub ; - -# Declare a library target. This 'inherits' the attributes of -# the template which in this case adds the needed include -# directory. Because templates are "special" targets they -# appear in the source dependencies section and must be -# a relative reference to the template target in it's declared -# location. -# -lib simple - : - # SOURCES -