diff --git a/v1/darwin-tools.jam b/v1/darwin-tools.jam index 0b66eb388..59fd1ce00 100644 --- a/v1/darwin-tools.jam +++ b/v1/darwin-tools.jam @@ -16,6 +16,9 @@ free-feature bundle-loader ; # Controll generation of compiler warnings. feature warnings : on off ; +# Type of shared object to create. +feature link-format : default dynamic bundle ; + # compute directories for invoking GCC # # The gcc toolset can be user-configured using the following @@ -119,7 +122,14 @@ 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) +{ + flags darwin LINK_FORMAT $(SHARED_TYPES) : bundle ; +} + +if $(LINK_FORMAT) = bundle { flags darwin LINKFLAGS $(SHARED_TYPES) : -bundle ; @@ -137,7 +147,7 @@ rule Link-action { _ on $(<) = " " ; DEPENDS $(<) : $(NEEDLIBS) $(NEEDIMPS) ; - if $(DLLVERSION) && $(TARGET_TYPE) in $(SHARED_TYPES) && ! $(BUNDLE_LOADER) + if $(DLLVERSION) && $(TARGET_TYPE) in $(SHARED_TYPES) && $(LINK_FORMAT) != bundle { DLLFLAGS on $(<) = ; #~ DLLFLAGS on $(<) = diff --git a/v1/python.jam b/v1/python.jam index 3947838e8..f4cbb1eb3 100644 --- a/v1/python.jam +++ b/v1/python.jam @@ -94,6 +94,12 @@ else if $(UNIX) && $(OS) = MACOSX } PYTHON_ROOT = $(PYTHON_ROOT:J=" ") ; PYTHON_INCLUDES ?= $(PYTHON_ROOT)/include/python$(PYTHON_VERSION) ; + PYTHON_FRAMEWORK ?= $(PYTHON_ROOT) ; + while $(PYTHON_FRAMEWORK:D=) != Python.framework + { + PYTHON_FRAMEWORK = $(PYTHON_FRAMEWORK:D) ; + } + PYTHON_FRAMEWORK = $(PYTHON_FRAMEWORK:D)/Python ; PYTHON_PROPERTIES ?= $(PYTHON_INCLUDES) @@ -201,12 +207,9 @@ rule select-python-library ( toolset variant : properties * ) { if PYD in $(properties) { - properties += $(PYTHON_ROOT)/Python ; - } - else - { - properties += $(PYTHON_ROOT)/Python ; + properties = [ replace $(properties) : default bundle ] ; } + properties += $(PYTHON_FRAMEWORK) ; } return $(properties) ; }