mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
* Modified Python testing code to use the facilities of testing.jam,
so that it can be processed with process_jam_log
* Updated Python library tests to use a test suite
* Added Python test suite to status/Jamfile
* Added --run-all-tests option to force tests to run even when up-to-date.
Also,
boost-base.jam:
Added some missing rule signatures
RUN_LD_LIBRARY_PATH became LINK_LIBPATH because it was only really
used during linking.
Reformed the movement of path variables up the dependency graph
Removed the defunct Run rule
Set up generalized constants for path manipulation
darwin-tools.jam, gcc-tools.jam:
use LINK_LIBPATH
python.jam:
Reformed the choice of Python executable
testing.jam:
Refactored testing code so it could be used for Python
Now building all environment variable setup code ahead of time
RUN_TEST became TEST_EXE
[SVN r20815]
229 lines
7.2 KiB
Plaintext
229 lines
7.2 KiB
Plaintext
# (C) Copyright Rene Rivera, 2002-2003.
|
|
#
|
|
# See accompanying license for terms and conditions of use.
|
|
#
|
|
|
|
# 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.
|
|
#//<a href="http://gcc.gnu.org/">GNU<br>GCC</a>
|
|
|
|
# For adding framwork libraries; like <framework>Python, <framework>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 <cxxflags> 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 <cflags> ;
|
|
flags darwin C++FLAGS <cxxflags> ;
|
|
flags darwin DEFINES <define> ;
|
|
flags darwin UNDEFS <undef> ;
|
|
flags darwin HDRS <include> ;
|
|
flags darwin STDHDRS <sysinclude> ;
|
|
flags darwin LIBPATH <library-path> ;
|
|
flags darwin NEEDLIBS <library-file> ;
|
|
flags darwin FINDLIBS <find-library> ;
|
|
flags darwin ARFLAGS <arflags> ;
|
|
flags darwin TARGET_TYPE <target-type> ;
|
|
flags darwin FRAMEWORKS <framework> ;
|
|
flags darwin DLLVERSION <dllversion> ;
|
|
flags darwin DLLVERSION : $(DLLVERSION[1]) ;
|
|
flags darwin BUNDLE_LOADER <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 ;
|
|
}
|
|
if ! [ MATCH "(g[+][+])" : $(.GXX) ]
|
|
{
|
|
flags darwin C++FLAGS : -fcoalesce-templates ;
|
|
}
|
|
flags darwin LINKFLAGS <runtime-link>static : -static-libgcc ;
|
|
flags darwin CFLAGS <debug-symbols>on : -g ;
|
|
flags darwin LINKFLAGS <debug-symbols>on : -g ;
|
|
flags darwin LINKFLAGS <debug-symbols>off : -Wl,-x ;
|
|
flags darwin CFLAGS <optimization>off : -O0 ;
|
|
flags darwin CFLAGS <optimization>speed : -O3 ;
|
|
flags darwin CFLAGS <optimization>space : -Os ;
|
|
flags darwin CFLAGS <inlining>off : -fno-inline ;
|
|
flags darwin CFLAGS <inlining>on : -Wno-inline ;
|
|
flags darwin CFLAGS <inlining>full : -finline-functions -Wno-inline ;
|
|
flags darwin CFLAGS <profiling>on : -pg ;
|
|
flags darwin LINKFLAGS <profiling>on : -pg ;
|
|
flags darwin C++FLAGS <rtti>off : -fno-rtti ;
|
|
flags darwin C++FLAGS <vtable-thunks>on : -fvtable-thunks ;
|
|
flags darwin C++FLAGS <vtable-thunks>off : -fvtable-thunks=0 ;
|
|
flags darwin CFLAGS <shared-linkable>true : -fPIC ;
|
|
flags darwin CFLAGS <warnings>on : -Wall ;
|
|
flags darwin CFLAGS <warnings>off : -w ;
|
|
|
|
flags darwin LINK_FORMAT <target-type>$(SHARED_TYPES)/<link-format>bundle : bundle ;
|
|
flags darwin LINK_FORMAT <target-type>$(SHARED_TYPES)/<link-format>dynamic : dynamic ;
|
|
if $(BUNDLE_LOADER) && ! $(LINK_FORMAT)
|
|
{
|
|
flags darwin LINK_FORMAT <target-type>$(SHARED_TYPES) : bundle ;
|
|
}
|
|
|
|
if $(LINK_FORMAT) = bundle
|
|
{
|
|
flags darwin LINKFLAGS <target-type>$(SHARED_TYPES) :
|
|
-bundle ;
|
|
}
|
|
else
|
|
{
|
|
flags darwin LINKFLAGS <target-type>$(SHARED_TYPES) :
|
|
-Wl,-dynamic -nostartfiles -Wl,-dylib -Wl,-ldylib1.o ;
|
|
}
|
|
|
|
flags darwin .LINKFLAGS <linkflags> ;
|
|
flags darwin DLLFLAGS : ;
|
|
if -bind_at_load in $(.LINKFLAGS)
|
|
{
|
|
flags darwin DLLFLAGS <target-type>$(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) \
|
|
&& \
|
|
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)" -o "$(<)" "$(>)"
|
|
}
|
|
|
|
#### C++ ####
|
|
rule C++-action
|
|
{
|
|
_ on $(<) = " " ;
|
|
darwin-C++-action $(<) : $(>) ;
|
|
}
|
|
|
|
actions darwin-C++-action
|
|
{
|
|
$(.GCC_BIN_DIR)$(.GXX) -c -ftemplate-depth-120 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -F$(FRAMEWORKS:D) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
|
|
}
|
|
|
|
#### Archive ####
|
|
|
|
rule Archive-action
|
|
{
|
|
darwin-Archive-action $(<) : $(>) ;
|
|
}
|
|
|
|
actions updated together piecemeal darwin-Archive-action
|
|
{
|
|
ar -r -s $(ARFLAGS) "$(<:T)" "$(>:T)"
|
|
}
|