components/python/cffi/Makefile
changeset 3998 5bd484384122
parent 3817 30b42c38bbc4
child 4339 6501cf9c29f9
child 7085 cad8ee01213d
equal deleted inserted replaced
3997:0ca3f3d6c919 3998:5bd484384122
    41 include $(WS_MAKE_RULES)/setup.py.mk
    41 include $(WS_MAKE_RULES)/setup.py.mk
    42 include $(WS_MAKE_RULES)/ips.mk
    42 include $(WS_MAKE_RULES)/ips.mk
    43 
    43 
    44 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
    44 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
    45 
    45 
    46 # We need to go look at pycparser in the workspace until it's available in the
       
    47 # build environment.
       
    48 PYCPARSER = $(WS_COMPONENTS)/python/pycparser/build/prototype/$(MACH)/$(PYTHON_LIB)
       
    49 
       
    50 $(PYCPARSER):
       
    51 	(cd ../pycparser; $(MAKE) install)
       
    52 
       
    53 COMPONENT_TEST_DIR =	$(@D)/tests
    46 COMPONENT_TEST_DIR =	$(@D)/tests
    54 COMPONENT_TEST_ENV =	$(PYTHON_ENV)
    47 COMPONENT_TEST_ENV =	$(PYTHON_ENV)
    55 COMPONENT_TEST_ENV +=	PYTHONPATH=$(PROTO_DIR)/$(PYTHON_LIB):$(PYCPARSER)
    48 COMPONENT_TEST_ENV +=	PYTHONPATH=$(PROTO_DIR)/$(PYTHON_LIB)
    56 COMPONENT_TEST_ENV +=	TESTOWNLIB_CC="$(CC) %s $(CC_BITS) -G -KPIC -o %s"
    49 COMPONENT_TEST_ENV +=	TESTOWNLIB_CC="$(CC) %s $(CC_BITS) -G -KPIC -o %s"
    57 COMPONENT_TEST_CMD =	$(PYTHON.$(BITS)) /usr/bin/py.test-$(PYTHON_VERSION)
    50 COMPONENT_TEST_CMD =	$(PYTHON.$(BITS)) /usr/bin/py.test-$(PYTHON_VERSION)
    58 COMPONENT_TEST_ARGS =	--resultlog $(@D)/testresults
    51 COMPONENT_TEST_ARGS =	--resultlog $(@D)/testresults
    59 COMPONENT_TEST_ARGS +=	-p no:codechecker
    52 COMPONENT_TEST_ARGS +=	-p no:codechecker
    60 COMPONENT_TEST_ARGS +=	$(TEST_SKIPS)
    53 COMPONENT_TEST_ARGS +=	$(TEST_SKIPS)
    70 # directory so running the tests don't leave turds in the source directory.
    63 # directory so running the tests don't leave turds in the source directory.
    71 COMPONENT_PRE_TEST_ACTION = \
    64 COMPONENT_PRE_TEST_ACTION = \
    72 	$(MKDIR) $(@D)/tests/doc/source; \
    65 	$(MKDIR) $(@D)/tests/doc/source; \
    73 	$(CP) -r $(SOURCE_DIR)/c $(SOURCE_DIR)/testing $(@D)/tests; \
    66 	$(CP) -r $(SOURCE_DIR)/c $(SOURCE_DIR)/testing $(@D)/tests; \
    74 	$(CP) $(SOURCE_DIR)/setup.py $(@D)/tests; \
    67 	$(CP) $(SOURCE_DIR)/setup.py $(@D)/tests; \
    75 	$(CP) $(SOURCE_DIR)/doc/source/conf.py $(SOURCE_DIR)/doc/source/index.rst $(@D)/tests/doc/source
    68 	$(CP) \
    76 
    69 	    $(SOURCE_DIR)/doc/source/conf.py \
    77 $(BUILD_32_and_64): $(PYCPARSER)
    70 	    $(SOURCE_DIR)/doc/source/index.rst \
       
    71 	    $(@D)/tests/doc/source
    78 
    72 
    79 # common targets
    73 # common targets
    80 build:		$(BUILD_32_and_64)
    74 build:		$(BUILD_32_and_64)
    81 
    75 
    82 install:	$(INSTALL_32_and_64)
    76 install:	$(INSTALL_32_and_64)