make-rules/setup.py.mk
changeset 99 c15c9099bb44
parent 62 519e6e3788ce
child 146 8e22ba234817
equal deleted inserted replaced
98:7eea11439375 99:c15c9099bb44
    33 BUILD_64 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.built)
    33 BUILD_64 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.built)
    34 
    34 
    35 INSTALL_32 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH32)-%/.installed)
    35 INSTALL_32 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH32)-%/.installed)
    36 INSTALL_64 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.installed)
    36 INSTALL_64 = $(PYTHON_VERSIONS:%=$(BUILD_DIR)/$(MACH64)-%/.installed)
    37 
    37 
       
    38 PYTHON_ENV =	CC="$(CC)"
       
    39 PYTHON_ENV +=	CFLAGS="$(CFLAGS)"
       
    40 
    38 # build the configured source
    41 # build the configured source
    39 $(BUILD_DIR)/%/.built:	$(SOURCE_DIR)/.prep
    42 $(BUILD_DIR)/%/.built:	$(SOURCE_DIR)/.prep
    40 	$(RM) -r $(@D) ; $(MKDIR) $(@D)
    43 	$(RM) -r $(@D) ; $(MKDIR) $(@D)
    41 	$(COMPONENT_PRE_BUILD_ACTION)
    44 	$(COMPONENT_PRE_BUILD_ACTION)
    42 	(cd $(SOURCE_DIR) ; $(ENV) $(PYTHON_ENV) \
    45 	(cd $(SOURCE_DIR) ; $(ENV) $(PYTHON_ENV) \
    43 		$(PYTHON.$(BITS)) ./setup.py build \
    46 		$(PYTHON.$(BITS)) ./setup.py build \
    44 			--build-temp $(@D:$(BUILD_DIR)/%=%) \
    47 			--build-temp $(@D:$(BUILD_DIR)/%=%))
    45 			$(COMPONENT_INSTALL_ARGS))
       
    46 	$(COMPONENT_POST_BUILD_ACTION)
    48 	$(COMPONENT_POST_BUILD_ACTION)
    47 	$(TOUCH) [email protected]
    49 	$(TOUCH) [email protected]
    48 
    50 
    49 # The default is site-packages, but that directory belongs to the end-user.
    51 # The default is site-packages, but that directory belongs to the end-user.
    50 # Modules which are shipped by the OS but not with the core Python distribution
    52 # Modules which are shipped by the OS but not with the core Python distribution
    60 	(cd $(SOURCE_DIR) ; $(ENV) $(COMPONENT_INSTALL_ENV) \
    62 	(cd $(SOURCE_DIR) ; $(ENV) $(COMPONENT_INSTALL_ENV) \
    61 		$(PYTHON.$(BITS)) ./setup.py install $(COMPONENT_INSTALL_ARGS))
    63 		$(PYTHON.$(BITS)) ./setup.py install $(COMPONENT_INSTALL_ARGS))
    62 	$(COMPONENT_POST_INSTALL_ACTION)
    64 	$(COMPONENT_POST_INSTALL_ACTION)
    63 	$(TOUCH) [email protected]
    65 	$(TOUCH) [email protected]
    64 
    66 
       
    67 clean::
       
    68 	$(RM) -r $(SOURCE_DIR) $(BUILD_DIR)