61 $(BUILD_DIR)/lua-64.pc: files/lua-64.pc |
61 $(BUILD_DIR)/lua-64.pc: files/lua-64.pc |
62 /bin/sed -e "s#MACH64#$(MACH64)#g" < $< > $@ |
62 /bin/sed -e "s#MACH64#$(MACH64)#g" < $< > $@ |
63 |
63 |
64 ASLR_MODE = $(ASLR_ENABLE) |
64 ASLR_MODE = $(ASLR_ENABLE) |
65 |
65 |
|
66 CLEAN_PATHS += $(LUA_TESTS) |
|
67 |
|
68 LUA_EXE_32 = $(BUILD_DIR)/$(MACH32)/src/$(COMPONENT_NAME) |
|
69 LUA_EXE_64 = $(BUILD_DIR)/$(MACH64)/src/$(COMPONENT_NAME) |
|
70 LUA_EXE = $(LUA_EXE_$(BITS)) |
|
71 |
|
72 # Unpack and patch the tests once, and work around CR #19661394, which is |
|
73 # causing the lua self-tests to fail. |
|
74 COMPONENT_PRE_TEST_ACTION = \ |
|
75 (if ! test -d $(LUA_TESTS) ; then \ |
|
76 $(UNPACK) $(UNPACK_ARGS) $(LUA_TESTS).tar.gz ; \ |
|
77 (cd $(LUA_TESTS); $(GPATCH) $(GPATCH_FLAGS) \ |
|
78 <$(COMPONENT_DIR)/files/fix-tests.patch) ; \ |
|
79 fi) |
|
80 |
|
81 COMPONENT_TEST_DIR = $(LUA_TESTS) |
|
82 COMPONENT_TEST_CMD = $(LUA_EXE) |
|
83 COMPONENT_TEST_ARGS = -e"_U=true" |
|
84 COMPONENT_TEST_TARGETS = all.lua |
|
85 |
66 # common targets |
86 # common targets |
67 build: $(BUILD_32_and_64) |
87 build: $(BUILD_32_and_64) |
68 |
88 |
69 install: $(INSTALL_32_and_64) $(BUILD_DIR)/lua-64.pc |
89 install: $(INSTALL_32_and_64) $(BUILD_DIR)/lua-64.pc |
70 |
90 |
71 test: install |
91 test: $(TEST_32_and_64) |
72 (gzip -dc $(LUA_TESTS).tar.gz | tar xopf -; \ |
|
73 cd $(LUA_TESTS); $(ENV) LD_LIBRARY_PATH=$(PROTOUSRLIBDIR) \ |
|
74 $(PROTOUSRBINDIR)/$(COMPONENT_NAME) -e"_U=true" all.lua; \ |
|
75 $(ENV) LD_LIBRARY_PATH=$(PROTOUSRLIBDIR64) \ |
|
76 $(PROTOUSRBINDIR64)/$(COMPONENT_NAME) -e"_U=true" all.lua) |
|
77 |
92 |
78 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) |
93 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) |
79 |
94 |
80 include ../../make-rules/depend.mk |
95 include ../../make-rules/depend.mk |