diff --git a/darwin-tools.jam b/darwin-tools.jam
index b1d9f5419..bc51434f1 100644
--- a/darwin-tools.jam
+++ b/darwin-tools.jam
@@ -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.
+#//GNU
GCC
# For adding framwork libraries; like Python, 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 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 ;
@@ -28,11 +83,12 @@ 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 ;
-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 off : -fno-rtti ;
flags darwin C++FLAGS on : -fvtable-thunks ;
flags darwin C++FLAGS off : -fvtable-thunks=0 ;
flags darwin CFLAGS true : -fPIC ;
+
if $(BUNDLE_LOADER)
{
flags darwin LINKFLAGS $(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 ####
diff --git a/python.jam b/python.jam
index d3803299f..d0948ad3e 100644
--- a/python.jam
+++ b/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 ?=
+ $(PYTHON_INCLUDES)
+ $(PYTHON_LIB_PATH)
+ ;
+}
else if $(UNIX)
{
PYTHON_ROOT ?= /usr/local ;
@@ -178,11 +190,12 @@ rule select-python-library ( toolset variant : properties * )
{
if PYD in $(properties)
{
- properties +=
- $(PYTHON_ROOT)/bin/python$(PYTHON_VERSION)
- ;
+ properties += $(PYTHON_ROOT)/Python ;
+ }
+ else
+ {
+ properties += $(PYTHON_ROOT)/Python ;
}
- properties += Python ;
}
return $(properties) ;
}
diff --git a/v1/darwin-tools.jam b/v1/darwin-tools.jam
index b1d9f5419..bc51434f1 100644
--- a/v1/darwin-tools.jam
+++ b/v1/darwin-tools.jam
@@ -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.
+#//GNU
GCC
# For adding framwork libraries; like Python, 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 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 ;
@@ -28,11 +83,12 @@ 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 ;
-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 off : -fno-rtti ;
flags darwin C++FLAGS on : -fvtable-thunks ;
flags darwin C++FLAGS off : -fvtable-thunks=0 ;
flags darwin CFLAGS true : -fPIC ;
+
if $(BUNDLE_LOADER)
{
flags darwin LINKFLAGS $(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 ####
diff --git a/v1/python.jam b/v1/python.jam
index d3803299f..d0948ad3e 100644
--- a/v1/python.jam
+++ b/v1/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 ?=
+ $(PYTHON_INCLUDES)
+ $(PYTHON_LIB_PATH)
+ ;
+}
else if $(UNIX)
{
PYTHON_ROOT ?= /usr/local ;
@@ -178,11 +190,12 @@ rule select-python-library ( toolset variant : properties * )
{
if PYD in $(properties)
{
- properties +=
- $(PYTHON_ROOT)/bin/python$(PYTHON_VERSION)
- ;
+ properties += $(PYTHON_ROOT)/Python ;
+ }
+ else
+ {
+ properties += $(PYTHON_ROOT)/Python ;
}
- properties += Python ;
}
return $(properties) ;
}