Makefile revision 4337
230N/A#
230N/A# CDDL HEADER START
230N/A#
230N/A# The contents of this file are subject to the terms of the
230N/A# Common Development and Distribution License (the "License").
230N/A# You may not use this file except in compliance with the License.
230N/A#
230N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
230N/A# or http://www.opensolaris.org/os/licensing.
230N/A# See the License for the specific language governing permissions
230N/A# and limitations under the License.
230N/A#
230N/A# When distributing Covered Code, include this CDDL HEADER in each
230N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
230N/A# If applicable, add the following below this CDDL HEADER, with the
230N/A# fields enclosed by brackets "[]" replaced with your own identifying
230N/A# information: Portions Copyright [yyyy] [name of copyright owner]
230N/A#
230N/A# CDDL HEADER END
230N/A#
230N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
230N/A#
230N/Ainclude ../../make-rules/shared-macros.mk
230N/A
230N/ACOMPONENT_NAME= lua
230N/ACOMPONENT_VERSION= 5.2.1
230N/ACOMPONENT_PROJECT_URL= http://www.lua.org/
230N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
230N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
230N/ACOMPONENT_ARCHIVE_HASH= \
230N/A sha256:64304da87976133196f9e4c15250b70f444467b6ed80d7cfd7b3b982b5177be5
230N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)ftp/$(COMPONENT_ARCHIVE)
230N/ACOMPONENT_BUGDB= utility/lua
230N/A
439N/ALUA_TESTS= lua-5.2.1-tests
439N/ACOMPONENT_ARCHIVE_1= $(LUA_TESTS).tar.gz
230N/ACOMPONENT_ARCHIVE_HASH_1= \
230N/A sha256:2346d635ee392c8d8024b07beaa10b7b66a3f861c41d575753d03155751cf114
368N/ACOMPONENT_ARCHIVE_URL_1= $(COMPONENT_PROJECT_URL)/tests/5.2/$(COMPONENT_ARCHIVE_1)
368N/A
340N/ATPNO= 5814
230N/A
230N/Ainclude $(WS_MAKE_RULES)/prep.mk
230N/Ainclude $(WS_MAKE_RULES)/justmake.mk
230N/Ainclude $(WS_MAKE_RULES)/ips.mk
230N/A
230N/APATCH_LEVEL= 0
340N/A
340N/A# This is because lua uses $(CC) to build it's shared libraries.
230N/ACC += $(CC_BITS)
230N/A
230N/ACFLAGS += $(CC_PIC) $(CPP_LARGEFILES)
230N/A
230N/ACOMPONENT_BUILD_ARGS += CC="$(CC)"
230N/ACOMPONENT_BUILD_ARGS += USRCFLAGS="$(CFLAGS)"
340N/ACOMPONENT_INSTALL_ARGS += INSTALL=$(INSTALL)
340N/ACOMPONENT_INSTALL_ARGS += INSTALL_TOP=$(PROTOUSRDIR)
340N/A$(INSTALL_64): COMPONENT_INSTALL_ARGS += INSTALL_LIB=$(PROTOUSRLIBDIR64)
340N/A$(INSTALL_64): COMPONENT_INSTALL_ARGS += INSTALL_BIN=$(PROTOUSRBINDIR64)
340N/A
230N/A$(BUILD_DIR)/lua-64.pc: files/lua-64.pc
230N/A /bin/sed -e "s#MACH64#$(MACH64)#g" < $< > $@
230N/A
340N/AASLR_MODE = $(ASLR_ENABLE)
230N/A
230N/ACLEAN_PATHS += $(LUA_TESTS)
230N/A
230N/ALUA_EXE_32 = $(BUILD_DIR)/$(MACH32)/src/$(COMPONENT_NAME)
230N/ALUA_EXE_64 = $(BUILD_DIR)/$(MACH64)/src/$(COMPONENT_NAME)
LUA_EXE = $(LUA_EXE_$(BITS))
# Unpack and patch the tests once, and work around CR #19661394, which is
# causing the lua self-tests to fail.
COMPONENT_PRE_TEST_ACTION = \
(if ! test -d $(LUA_TESTS) ; then \
$(UNPACK) $(UNPACK_ARGS) $(LUA_TESTS).tar.gz ; \
(cd $(LUA_TESTS); $(GPATCH) $(GPATCH_FLAGS) \
<$(COMPONENT_DIR)/files/fix-tests.patch) ; \
fi)
COMPONENT_TEST_DIR = $(LUA_TESTS)
COMPONENT_TEST_CMD = $(LUA_EXE)
COMPONENT_TEST_ARGS = -e"_U=true"
COMPONENT_TEST_TARGETS = all.lua
# Master test results are the same for both 32-bit and 64-bit, so override
# here, rather than create multiple identical master files.
COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
# The additional lua specific set of transforms to be applied to the
# test results to try to normalize them.
COMPONENT_TEST_TRANSFORMS += \
'-e "/---- total memory:/d" ' \
'-e "s|elements in .\... sec|elements in x.xx sec|g" ' \
'-e "s|\(total time:\).*|\1|" ' \
'-e "s|\(test done on\).*|\1|" '
# common targets
build: $(BUILD_32_and_64)
install: $(INSTALL_32_and_64) $(BUILD_DIR)/lua-64.pc
test: $(TEST_32_and_64)
system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/math