VirtualBox

Changeset 28537 in vbox


Ignore:
Timestamp:
Apr 20, 2010 10:09:02 PM (15 years ago)
Author:
vboxsync
Message:

python/Makefile.kmk++: Massage, hope it still works.

Location:
trunk/src/libs/xpcom18a4/python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/python/Makefile.kmk

    r28370 r28537  
    55
    66#
    7 # Copyright (C) 2009 Sun Microsystems, Inc.
     7# Copyright (C) 2009-2010 Sun Microsystems, Inc.
    88#
    99# This file is part of VirtualBox Open Source Edition (OSE), as
     
    2424
    2525ifdef VBOX_WITH_MULTIVERSION_PYTHON
    26 VBOX_MULTIPYTHON = 1
     26 VBOX_MULTIPYTHON = 1
    2727else
    28 VBOX_MULTIPYTHON = 0
     28 VBOX_MULTIPYTHON = 0
    2929endif
    3030
    31 # list of supported Python versions
    32 $(eval $(patsubst %|,%$(NL),$(shell $(VBOX_BLD_PYTHON) $(PATH_SUB_CURRENT)/gen_python_deps.py $(KBUILD_TARGET) $(KBUILD_TARGET_ARCH) $(VBOX_MULTIPYTHON))))
     31#
     32# List of supported Python versions, defining a number of
     33# VBOX_PYTHON[25|26|27|28|DEF]_[INC|LIB] variables which get picked up below.
     34#
     35#$(eval $(patsubst %|,%$(NL),$(shell $(VBOX_BLD_PYTHON) $(PATH_SUB_CURRENT)/gen_python_deps.py $(KBUILD_TARGET) $(KBUILD_TARGET_ARCH) $(VBOX_MULTIPYTHON))))
     36$(eval $(subst |,$(NL),$(shell $(VBOX_BLD_PYTHON) $(PATH_SUB_CURRENT)/gen_python_deps.py $(KBUILD_TARGET) $(KBUILD_TARGET_ARCH) $(VBOX_MULTIPYTHON))))
    3337
    34 # Python Client Module - the C++/XPCOM bits.
     38ifndef VBOX_ONLY_SDK
     39
     40#
     41# Base Python Client Module - the C++/XPCOM bits (not actually built).
     42#
    3543VBoxPythonBase_TEMPLATE = XPCOM
     44VBoxPythonBase_CXXFLAGS = -Wno-write-strings
     45VBoxPythonBase_DLLSUFF.darwin = .so
    3646VBoxPythonBase_DEFS     = \
    3747        _IMPL_NS_COM \
     
    4050        EXPORT_XPT_API \
    4151        VBOX_PYXPCOM \
    42         VBOX_WITH_XPCOM
     52        VBOX_WITH_XPCOM \
     53        VBOX_PYXPCOM_VERSIONED
    4354VBoxPythonBase_INCS     = \
    4455        src
    45 VBoxPythonBase_CXXFLAGS = -Wno-write-strings
    46 
    4756VBoxPythonBase_SOURCES  = \
    4857        src/module/_xpcom.cpp \
     
    6877        src/TypeObject.cpp \
    6978        src/VariantUtils.cpp
    70 
    71 VBoxPythonBase_LIBS = \
     79VBoxPythonBase_LIBS     = \
    7280        $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
    7381        $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
    7482
    75 ifeq ($(KBUILD_TARGET),darwin)
    76  ## @todo kBuild - this ain't working: VBoxPython_DLLSUFF.darwin = .so
    77  VBoxPythonBase_DLLSUFF = .so
     83
     84if defined(VBOX_PYTHON23_INC) \
     85  && ("$(KBUILD_TARGET)" != "darwin" || ("$(KBUILD_TARGET_ARCH)" == "x86" && defined(VBOX_WITH_MAC_OS_X_10_4_SUPPORT) ))
     86#
     87# Python 2.3 version
     88#
     89DLLS += VBoxPython2_3
     90VBoxPython2_3_EXTENDS    = VBoxPythonBase
     91VBoxPython2_3_EXTENDS_BY = appending
     92VBoxPython2_3_TEMPLATE   = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX104,)
     93VBoxPython2_3_INCS       = $(VBOX_PYTHON23_INC)
     94VBoxPython2_3_LIBS       = $(VBOX_PYTHON23_LIB)
    7895endif
    7996
    80 # Python 2.3 version
    81 VBoxPython23_EXTENDS    = VBoxPythonBase
    82 VBoxPython23_EXTENDS_BY = appending
    83 VBoxPython23_NAME       = VBoxPython2_3
    84 VBoxPython23_TEMPLATE   = XPCOM
    85 
    86 VBoxPython23_DEFS       = VBOX_PYXPCOM_VERSIONED
    87 VBoxPython23_INCS       = $(VBOX_PYTHON23_INC)
    88 VBoxPython23_LIBS       = $(VBOX_PYTHON23_LIB)
    89 
    90 ifdef VBOX_PYTHON23_INC
    91   KNOWN_GLUE += VBoxPython23
     97if defined(VBOX_PYTHON24_INC) && "$(KBUILD_TARGET)" != "darwin"
     98#
     99# Python 2.4 version
     100#
     101DLLS += VBoxPython2_4
     102VBoxPython2_4_EXTENDS    = VBoxPythonBase
     103VBoxPython2_4_EXTENDS_BY = appending
     104VBoxPython2_4_INCS       = $(VBOX_PYTHON24_INC)
     105VBoxPython2_4_LIBS       = $(VBOX_PYTHON24_LIB)
    92106endif
    93107
    94 # Python 2.4 version
    95 VBoxPython24_EXTENDS    = VBoxPythonBase
    96 VBoxPython24_EXTENDS_BY = appending
    97 VBoxPython24_NAME       = VBoxPython2_4
    98 VBoxPython24_TEMPLATE   = XPCOM
    99 
    100 VBoxPython24_DEFS       = VBOX_PYXPCOM_VERSIONED
    101 VBoxPython24_INCS       = $(VBOX_PYTHON24_INC)
    102 VBoxPython24_LIBS       = $(VBOX_PYTHON24_LIB)
    103 
    104 ifdef VBOX_PYTHON24_INC
    105  KNOWN_GLUE += VBoxPython24
     108if defined(VBOX_PYTHON25_INC) && "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" != "darwin.amd64"
     109#
     110# Python 2.5 version
     111#
     112DLLS += VBoxPython2_5
     113VBoxPython2_5_EXTENDS    = VBoxPythonBase
     114VBoxPython2_5_EXTENDS_BY = appending
     115VBoxPython2_5_TEMPLATE   = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX105,)
     116VBoxPython2_5_INCS       = $(VBOX_PYTHON25_INC)
     117VBoxPython2_5_LIBS       = $(VBOX_PYTHON25_LIB)
    106118endif
    107119
    108 # Python 2.5 version
    109 VBoxPython25_EXTENDS    = VBoxPythonBase
    110 VBoxPython25_EXTENDS_BY = appending
    111 VBoxPython25_NAME       = VBoxPython2_5
    112 if "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "darwin.x86"
    113  VBoxPython25_TEMPLATE   = XPCOMOSX105
    114 else
    115  VBoxPython25_TEMPLATE   = XPCOM
     120if defined(VBOX_PYTHON26_INC) && "$(KBUILD_TARGET)" != "darwin"
     121#
     122# Python 2.6 version
     123#
     124DLLS += VBoxPython2_6
     125VBoxPython2_6_EXTENDS    = VBoxPythonBase
     126VBoxPython2_6_EXTENDS_BY = appending
     127VBoxPython2_6_TEMPLATE   = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX106,)
     128VBoxPython2_6_INCS       = $(VBOX_PYTHON26_INC)
     129VBoxPython2_6_LIBS       = $(VBOX_PYTHON26_LIB)
    116130endif
    117131
    118 VBoxPython25_DEFS       = VBOX_PYXPCOM_VERSIONED
    119 VBoxPython25_INCS       = $(VBOX_PYTHON25_INC)
    120 VBoxPython25_LIBS       = $(VBOX_PYTHON25_LIB)
    121 
    122 ifdef VBOX_PYTHON25_INC
    123  KNOWN_GLUE += VBoxPython25
     132if defined(VBOX_PYTHON27_INC) && "$(KBUILD_TARGET)" != "darwin"
     133#
     134# Python 2.7 version
     135#
     136DLLS += VBoxPython2_7
     137VBoxPython2_7_EXTENDS    = VBoxPythonBase
     138VBoxPython2_7_EXTENDS_BY = appending
     139VBoxPython2_7_INCS       = $(VBOX_PYTHON27_INC)
     140VBoxPython2_7_LIBS       = $(VBOX_PYTHON27_LIB)
    124141endif
    125142
    126 # Python 2.6 version
    127 VBoxPython26_EXTENDS    = VBoxPythonBase
    128 VBoxPython26_EXTENDS_BY = appending
    129 VBoxPython26_NAME       = VBoxPython2_6
    130 if "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "darwin.x86"
    131  VBoxPython26_TEMPLATE   = XPCOMOSX105
    132 else
    133  VBoxPython26_TEMPLATE   = XPCOM
     143if defined(VBOX_PYTHON28_INC) && "$(KBUILD_TARGET)" != "darwin"
     144#
     145# Python 2.8 version
     146#
     147DLLS += VBoxPython2_8
     148VBoxPython2_8_EXTENDS    = VBoxPythonBase
     149VBoxPython2_8_EXTENDS_BY = appending
     150VBoxPython2_8_INCS       = $(VBOX_PYTHON28_INC)
     151VBoxPython2_8_LIBS       = $(VBOX_PYTHON28_LIB)
    134152endif
    135153
    136 VBoxPython26_DEFS       = VBOX_PYXPCOM_VERSIONED
    137 VBoxPython26_INCS       = $(VBOX_PYTHON26_INC)
    138 VBoxPython26_LIBS       = $(VBOX_PYTHON26_LIB)
    139 
    140 ifdef VBOX_PYTHON26_INC
    141  KNOWN_GLUE += VBoxPython26
     154if defined(VBOX_PYTHONDEF_INC) && "$(KBUILD_TARGET)" != "darwin"
     155#
     156# Python without versioning
     157#
     158DLLS += VBoxPython
     159VBoxPython_EXTENDS      = VBoxPythonBase
     160VBoxPython_DEFS         = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_DEFS))
     161VBoxPython_INCS         = $(VBoxPythonBase_INCS) $(VBOX_PYTHONDEF_INC)
     162if "$(KBUILD_TARGET)" == "linux"
     163 VBoxPython_LIBS        = $(VBoxPythonBase_LIBS)
     164else
     165 VBoxPython_LIBS        = $(VBoxPythonBase_LIBS) $(VBOX_PYTHONDEF_LIB)
     166endif
    142167endif
    143168
    144 # Python 2.7 version
    145 VBoxPython27_EXTENDS    = VBoxPythonBase
    146 VBoxPython27_EXTENDS_BY = appending
    147 VBoxPython27_NAME       = VBoxPython2_7
    148 VBoxPython27_TEMPLATE   = XPCOM
     169endif # VBOX_ONLY_SDK
    149170
    150 VBoxPython27_DEFS       = VBOX_PYXPCOM_VERSIONED
    151 VBoxPython27_INCS       = $(VBOX_PYTHON27_INC)
    152 VBoxPython27_LIBS       = $(VBOX_PYTHON27_LIB)
    153 
    154 ifdef VBOX_PYTHON27_INC
    155  KNOWN_GLUE += VBoxPython27
    156 endif
    157 
    158 # Python 2.8 version
    159 VBoxPython28_EXTENDS    = VBoxPythonBase
    160 VBoxPython28_EXTENDS_BY = appending
    161 VBoxPython28_NAME       = VBoxPython2_8
    162 VBoxPython28_TEMPLATE   = XPCOM
    163 
    164 VBoxPython28_DEFS       = VBOX_PYXPCOM_VERSIONED
    165 VBoxPython28_INCS       = $(VBOX_PYTHON28_INC)
    166 VBoxPython28_LIBS       = $(VBOX_PYTHON28_LIB)
    167 
    168 ifdef VBOX_PYTHON28_INC
    169  KNOWN_GLUE += VBoxPython28
    170 endif
    171 
    172 # Python without versioning
    173 VBoxPython_EXTENDS      = VBoxPythonBase
    174 VBoxPython_EXTENDS_BY   = appending
    175 VBoxPython_TEMPLATE     = XPCOM
    176 
    177 VBoxPython_INCS       =  $(VBOX_PYTHONDEF_INC)
    178 if "$(KBUILD_TARGET)" == "linux"
    179   VBoxPython_LIBS       =
    180 else
    181   VBoxPython_LIBS       = $(VBOX_PYTHONDEF_LIB)
    182 endif
    183 
    184 ifdef VBOX_PYTHONDEF_INC
    185  KNOWN_GLUE += VBoxPython
    186 endif
    187 
     171#
     172# Install the python modules.
     173#
     174INSTALLS += VBoxPython-inst-py-xpcom
    188175VBoxPython-inst-py-xpcom_INST = $(INST_SDK)bindings/xpcom/python/xpcom/
    189176VBoxPython-inst-py-xpcom_SOURCES = \
     
    205192
    206193
    207 ifndef VBOX_ONLY_SDK
    208  DLLS += $(KNOWN_GLUE)
    209 endif
     194include $(KBUILD_PATH)/subfooter.kmk
    210195
    211 INSTALLS += VBoxPython-inst-py-xpcom
    212 
    213 include $(KBUILD_PATH)/subfooter.kmk
  • trunk/src/libs/xpcom18a4/python/gen_python_deps.py

    r28512 r28537  
    7878
    7979    if target == 'darwin':
     80        ## @todo Pick up the locations from VBOX_PATH_MACOSX_SDK_10_*.
    8081        prefixes = ['/Developer/SDKs/MacOSX10.4u.sdk/usr', '/Developer/SDKs/MacOSX10.5.sdk/usr', '/Developer/SDKs/MacOSX10.6.sdk/usr']
    81         # Python 2.3 on Darwin buildbox is bad
    82         # /Developer/SDKs/MacOSX10.4u.sdk/usr/include/python2.3/pyport.h:554:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?).
    83         versions.remove("2.3")
    8482        dllsuff = '.dylib'
    8583
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette