make-rules/setup.py.mk
changeset 59 7500d63edb42
parent 58 d8024c042a00
child 62 519e6e3788ce
equal deleted inserted replaced
58:d8024c042a00 59:7500d63edb42
    19 # CDDL HEADER END
    19 # CDDL HEADER END
    20 #
    20 #
    21 # Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
    21 # Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
    22 #
    22 #
    23 
    23 
    24 $(COMPONENT_SRC)/build-%-2.6/.built:		PYTHON_VERSION=2.6
    24 $(BUILD_DIR)/%-2.6/.built:		PYTHON_VERSION=2.6
    25 $(COMPONENT_SRC)/build-$(MACH32)-%/.built:	BITS=32
    25 $(BUILD_DIR)/$(MACH32)-%/.built:	BITS=32
    26 $(COMPONENT_SRC)/build-$(MACH64)-%/.built:	BITS=64
    26 $(BUILD_DIR)/$(MACH64)-%/.built:	BITS=64
    27 
    27 
    28 $(COMPONENT_SRC)/build-%-2.6/.installed:	PYTHON_VERSION=2.6
    28 $(BUILD_DIR)/%-2.6/.installed:	PYTHON_VERSION=2.6
    29 $(COMPONENT_SRC)/build-$(MACH32)-%/.installed:	BITS=32
    29 $(BUILD_DIR)/$(MACH32)-%/.installed:	BITS=32
    30 $(COMPONENT_SRC)/build-$(MACH64)-%/.installed:	BITS=64
    30 $(BUILD_DIR)/$(MACH64)-%/.installed:	BITS=64
    31 
    31 
    32 BUILD_32 = $(PYTHON_VERSIONS:%=$(COMPONENT_SRC)/build-$(MACH32)-%/.built)
    32 BUILD_32 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH32)-%/.built)
    33 BUILD_64 = $(PYTHON_VERSIONS:%=$(COMPONENT_SRC)/build-$(MACH64)-%/.built)
    33 BUILD_64 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.built)
    34 
    34 
    35 INSTALL_32 = $(PYTHON_VERSIONS:%=$(COMPONENT_SRC)/build-$(MACH32)-%/.installed)
    35 INSTALL_32 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH32)-%/.installed)
    36 INSTALL_64 = $(PYTHON_VERSIONS:%=$(COMPONENT_SRC)/build-$(MACH64)-%/.installed)
    36 INSTALL_64 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.installed)
    37 
    37 
    38 # build the configured source
    38 # build the configured source
    39 $(COMPONENT_SRC)/build-%/.built:	$(COMPONENT_SRC)/.prep
    39 $(BUILD_DIR)/%/.built:	$(SOURCE_DIR)/.prep
    40 	$(RM) -r $(@D) ; $(MKDIR) $(@D)
    40 	$(RM) -r $(@D) ; $(MKDIR) $(@D)
    41 	$(COMPONENT_PRE_BUILD_ACTION)
    41 	$(COMPONENT_PRE_BUILD_ACTION)
    42 	(cd $(COMPONENT_SRC) ; $(ENV) $(PYTHON_ENV) \
    42 	(cd $(SOURCE_DIR) ; $(ENV) $(PYTHON_ENV) \
    43 		$(PYTHON.$(BITS)) ./setup.py build --build-temp $(@D:$(COMPONENT_SRC)/%=%))
    43 		$(PYTHON.$(BITS)) ./setup.py build \
       
    44 			--build-temp $(@D:$(BUILD_DIR)/%=%))
    44 	$(COMPONENT_POST_BUILD_ACTION)
    45 	$(COMPONENT_POST_BUILD_ACTION)
    45 	$(TOUCH) [email protected]
    46 	$(TOUCH) [email protected]
    46 
    47 
    47 # The default is site-packages, but that directory belongs to the end-user.
    48 # The default is site-packages, but that directory belongs to the end-user.
    48 # Modules which are shipped by the OS but not with the core Python distribution
    49 # Modules which are shipped by the OS but not with the core Python distribution
    49 # belong in vendor-packages.
    50 # belong in vendor-packages.
    50 PYTHON_LIB= /usr/lib/python$(PYTHON_VERSION)/vendor-packages
    51 PYTHON_LIB= /usr/lib/python$(PYTHON_VERSION)/vendor-packages
    51 
    52 
    52 # install the built source into a prototype area
    53 # install the built source into a prototype area
    53 $(COMPONENT_SRC)/build-%/.installed:	$(COMPONENT_SRC)/build-%/.built
    54 $(BUILD_DIR)/%/.installed:	$(BUILD_DIR)/%/.built
    54 	$(COMPONENT_PRE_INSTALL_ACTION)
    55 	$(COMPONENT_PRE_INSTALL_ACTION)
    55 	(cd $(COMPONENT_SRC) ; $(ENV) $(PYTHON_ENV) \
    56 	(cd $(SOURCE_DIR) ; $(ENV) $(PYTHON_ENV) \
    56 		$(PYTHON.$(BITS)) ./setup.py install --root $(PROTO_DIR) \
    57 		$(PYTHON.$(BITS)) ./setup.py install --root $(PROTO_DIR) \
    57 			--install-lib=$(PYTHON_LIB))
    58 			--install-lib=$(PYTHON_LIB))
    58 	$(COMPONENT_POST_INSTALL_ACTION)
    59 	$(COMPONENT_POST_INSTALL_ACTION)
    59 	$(TOUCH) [email protected]
    60 	$(TOUCH) [email protected]