mirror of
https://github.com/boostorg/build.git
synced 2026-02-15 13:02:11 +00:00
Minor changes to attempt getting Python build working on MacOS-X with Python 2.3 framework.
- darwin-tools.jam; added GCC* env setup variables to allow for using something other than the built in gcc. - darwin-tools.jam; tweaked the bundle-loader feature to also add the bundle as a link object. - python.jam; wire in the framework path for python. - python.jam; remove the <framework> feature from built PYDs. [SVN r18522]
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# (C) Copyright Rene Rivera 2002. Permission to copy, use,
|
||||
# (C) Copyright Rene Rivera 2002-2003. 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.
|
||||
|
||||
|
||||
# singleton variables...
|
||||
#> set-as-singleton _XX_ ;
|
||||
# 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 ;
|
||||
@@ -14,6 +14,61 @@ free-feature framework ;
|
||||
# Specify the loader for bundles.
|
||||
free-feature bundle-loader ;
|
||||
|
||||
# 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> ;
|
||||
@@ -28,11 +83,12 @@ 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 ;
|
||||
|
||||
ARFLAGS ?= "" ;
|
||||
DLLVERSION = $(DLLVERSION[1]) ;
|
||||
DLLVERSION ?= $(BOOST_VERSION) ;
|
||||
if ! $(ARFLAGS) { flags darwin ARFLAGS : "" ; }
|
||||
if ! $(DLLVERSION) { flags darwin DLLVERSION : $(BOOST_VERSION) ; }
|
||||
|
||||
flags darwin CFLAGS : -Wno-long-double -no-cpp-precomp ;
|
||||
flags darwin C++FLAGS : -fcoalesce-templates ;
|
||||
@@ -52,6 +108,7 @@ 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 ;
|
||||
|
||||
if $(BUNDLE_LOADER)
|
||||
{
|
||||
flags darwin LINKFLAGS <target-type>$(SHARED_TYPES) :
|
||||
@@ -87,9 +144,9 @@ actions darwin-Link-action bind NEEDLIBS NEEDIMPS
|
||||
{
|
||||
$(SHELL_SET)$(gSHELL_LIBPATH)=$(RUN_LD_LIBRARY_PATH)
|
||||
$(SHELL_EXPORT)$(gSHELL_LIBPATH)
|
||||
c++ $(LINKFLAGS) -o "$(<[1])" "$(>)" \
|
||||
$(.GCC_BIN_DIR)$(.GXX) $(LINKFLAGS) -o "$(<[1])" "$(>)" \
|
||||
-L"$(LIBPATH:T)" -L"$(STDLIBPATH:T)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) \
|
||||
-framework$(_)$(FRAMEWORKS) -bundle_loader$(_)"$(BUNDLE_LOADER)"
|
||||
-framework$(_)$(FRAMEWORKS) -bundle_loader$(_)"$(BUNDLE_LOADER)" "$(BUNDLE_LOADER)"
|
||||
}
|
||||
|
||||
actions darwin-Link-DyLib-action bind NEEDLIBS NEEDIMPS
|
||||
@@ -98,7 +155,7 @@ actions darwin-Link-DyLib-action bind NEEDLIBS NEEDIMPS
|
||||
$(SHELL_EXPORT)$(gSHELL_LIBPATH)
|
||||
ld -dynamic -m -r -d -o "$(<[1]:S=.lo)" "$(>)" \
|
||||
&& \
|
||||
c++ $(LINKFLAGS) $(DLLFLAGS) -o "$(<[1])" "$(<[1]:S=.lo)" \
|
||||
$(.GCC_BIN_DIR)$(.GXX) $(LINKFLAGS) $(DLLFLAGS) -o "$(<[1])" "$(<[1]:S=.lo)" \
|
||||
-L"$(LIBPATH:T)" -L"$(STDLIBPATH:T)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) \
|
||||
-framework$(_)$(FRAMEWORKS) \
|
||||
&& \
|
||||
@@ -115,7 +172,7 @@ rule Cc-action
|
||||
|
||||
actions darwin-Cc-action
|
||||
{
|
||||
cc -c -Wall -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
|
||||
$(.GCC_BIN_DIR)$(.GCC) -c -Wall -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
|
||||
}
|
||||
|
||||
#### C++ ####
|
||||
@@ -127,7 +184,7 @@ rule C++-action
|
||||
|
||||
actions darwin-C++-action
|
||||
{
|
||||
c++ -c -Wall -ftemplate-depth-100 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
|
||||
$(.GCC_BIN_DIR)$(.GXX) -c -Wall -ftemplate-depth-100 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
|
||||
}
|
||||
|
||||
#### Archive ####
|
||||
|
||||
21
python.jam
21
python.jam
@@ -76,6 +76,18 @@ if $(NT)
|
||||
|
||||
PYTHON_INCLUDES ?= $(PYTHON_ROOT)/include ;
|
||||
}
|
||||
else if $(UNIX) && $(OS) = MACOSX
|
||||
{
|
||||
PYTHON_ROOT ?= /Library/Frameworks/Python.framework/Versions/$(PYTHON_VERSION) ;
|
||||
PYTHON_ROOT = $(PYTHON_ROOT:J=" ") ;
|
||||
PYTHON_INCLUDES ?= $(PYTHON_ROOT)/include/python$(PYTHON_VERSION) ;
|
||||
PYTHON_LIB_PATH ?= $(PYTHON_ROOT)/lib/python$(PYTHON_VERSION)/config ;
|
||||
|
||||
PYTHON_PROPERTIES ?=
|
||||
<sysinclude>$(PYTHON_INCLUDES)
|
||||
<library-path>$(PYTHON_LIB_PATH)
|
||||
;
|
||||
}
|
||||
else if $(UNIX)
|
||||
{
|
||||
PYTHON_ROOT ?= /usr/local ;
|
||||
@@ -178,11 +190,12 @@ rule select-python-library ( toolset variant : properties * )
|
||||
{
|
||||
if <target-type>PYD in $(properties)
|
||||
{
|
||||
properties +=
|
||||
<bundle-loader>$(PYTHON_ROOT)/bin/python$(PYTHON_VERSION)
|
||||
;
|
||||
properties += <bundle-loader>$(PYTHON_ROOT)/Python ;
|
||||
}
|
||||
else
|
||||
{
|
||||
properties += <framework>$(PYTHON_ROOT)/Python ;
|
||||
}
|
||||
properties += <framework>Python ;
|
||||
}
|
||||
return $(properties) ;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# (C) Copyright Rene Rivera 2002. Permission to copy, use,
|
||||
# (C) Copyright Rene Rivera 2002-2003. 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.
|
||||
|
||||
|
||||
# singleton variables...
|
||||
#> set-as-singleton _XX_ ;
|
||||
# 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 ;
|
||||
@@ -14,6 +14,61 @@ free-feature framework ;
|
||||
# Specify the loader for bundles.
|
||||
free-feature bundle-loader ;
|
||||
|
||||
# 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> ;
|
||||
@@ -28,11 +83,12 @@ 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 ;
|
||||
|
||||
ARFLAGS ?= "" ;
|
||||
DLLVERSION = $(DLLVERSION[1]) ;
|
||||
DLLVERSION ?= $(BOOST_VERSION) ;
|
||||
if ! $(ARFLAGS) { flags darwin ARFLAGS : "" ; }
|
||||
if ! $(DLLVERSION) { flags darwin DLLVERSION : $(BOOST_VERSION) ; }
|
||||
|
||||
flags darwin CFLAGS : -Wno-long-double -no-cpp-precomp ;
|
||||
flags darwin C++FLAGS : -fcoalesce-templates ;
|
||||
@@ -52,6 +108,7 @@ 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 ;
|
||||
|
||||
if $(BUNDLE_LOADER)
|
||||
{
|
||||
flags darwin LINKFLAGS <target-type>$(SHARED_TYPES) :
|
||||
@@ -87,9 +144,9 @@ actions darwin-Link-action bind NEEDLIBS NEEDIMPS
|
||||
{
|
||||
$(SHELL_SET)$(gSHELL_LIBPATH)=$(RUN_LD_LIBRARY_PATH)
|
||||
$(SHELL_EXPORT)$(gSHELL_LIBPATH)
|
||||
c++ $(LINKFLAGS) -o "$(<[1])" "$(>)" \
|
||||
$(.GCC_BIN_DIR)$(.GXX) $(LINKFLAGS) -o "$(<[1])" "$(>)" \
|
||||
-L"$(LIBPATH:T)" -L"$(STDLIBPATH:T)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) \
|
||||
-framework$(_)$(FRAMEWORKS) -bundle_loader$(_)"$(BUNDLE_LOADER)"
|
||||
-framework$(_)$(FRAMEWORKS) -bundle_loader$(_)"$(BUNDLE_LOADER)" "$(BUNDLE_LOADER)"
|
||||
}
|
||||
|
||||
actions darwin-Link-DyLib-action bind NEEDLIBS NEEDIMPS
|
||||
@@ -98,7 +155,7 @@ actions darwin-Link-DyLib-action bind NEEDLIBS NEEDIMPS
|
||||
$(SHELL_EXPORT)$(gSHELL_LIBPATH)
|
||||
ld -dynamic -m -r -d -o "$(<[1]:S=.lo)" "$(>)" \
|
||||
&& \
|
||||
c++ $(LINKFLAGS) $(DLLFLAGS) -o "$(<[1])" "$(<[1]:S=.lo)" \
|
||||
$(.GCC_BIN_DIR)$(.GXX) $(LINKFLAGS) $(DLLFLAGS) -o "$(<[1])" "$(<[1]:S=.lo)" \
|
||||
-L"$(LIBPATH:T)" -L"$(STDLIBPATH:T)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) \
|
||||
-framework$(_)$(FRAMEWORKS) \
|
||||
&& \
|
||||
@@ -115,7 +172,7 @@ rule Cc-action
|
||||
|
||||
actions darwin-Cc-action
|
||||
{
|
||||
cc -c -Wall -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
|
||||
$(.GCC_BIN_DIR)$(.GCC) -c -Wall -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
|
||||
}
|
||||
|
||||
#### C++ ####
|
||||
@@ -127,7 +184,7 @@ rule C++-action
|
||||
|
||||
actions darwin-C++-action
|
||||
{
|
||||
c++ -c -Wall -ftemplate-depth-100 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
|
||||
$(.GCC_BIN_DIR)$(.GXX) -c -Wall -ftemplate-depth-100 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
|
||||
}
|
||||
|
||||
#### Archive ####
|
||||
|
||||
@@ -76,6 +76,18 @@ if $(NT)
|
||||
|
||||
PYTHON_INCLUDES ?= $(PYTHON_ROOT)/include ;
|
||||
}
|
||||
else if $(UNIX) && $(OS) = MACOSX
|
||||
{
|
||||
PYTHON_ROOT ?= /Library/Frameworks/Python.framework/Versions/$(PYTHON_VERSION) ;
|
||||
PYTHON_ROOT = $(PYTHON_ROOT:J=" ") ;
|
||||
PYTHON_INCLUDES ?= $(PYTHON_ROOT)/include/python$(PYTHON_VERSION) ;
|
||||
PYTHON_LIB_PATH ?= $(PYTHON_ROOT)/lib/python$(PYTHON_VERSION)/config ;
|
||||
|
||||
PYTHON_PROPERTIES ?=
|
||||
<sysinclude>$(PYTHON_INCLUDES)
|
||||
<library-path>$(PYTHON_LIB_PATH)
|
||||
;
|
||||
}
|
||||
else if $(UNIX)
|
||||
{
|
||||
PYTHON_ROOT ?= /usr/local ;
|
||||
@@ -178,11 +190,12 @@ rule select-python-library ( toolset variant : properties * )
|
||||
{
|
||||
if <target-type>PYD in $(properties)
|
||||
{
|
||||
properties +=
|
||||
<bundle-loader>$(PYTHON_ROOT)/bin/python$(PYTHON_VERSION)
|
||||
;
|
||||
properties += <bundle-loader>$(PYTHON_ROOT)/Python ;
|
||||
}
|
||||
else
|
||||
{
|
||||
properties += <framework>$(PYTHON_ROOT)/Python ;
|
||||
}
|
||||
properties += <framework>Python ;
|
||||
}
|
||||
return $(properties) ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user