components/lua/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Tue, 23 Sep 2014 14:48:32 -0700
changeset 2106 adb848b3a7d4
parent 1948 2d1537e7942d
child 3643 1a4ba329c762
permissions -rw-r--r--
19535379 lua's self tests are a bit of a mess 19667856 Add COMPONENT_TEST_CMD to all relevant Userland .mk files
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
97
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     1
#
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     3
#
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     7
#
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    12
#
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    18
#
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    20
#
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1485
diff changeset
    21
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
97
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    22
#
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    23
include ../../make-rules/shared-macros.mk
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    24
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    25
COMPONENT_NAME=		lua
990
6bfca1239ccb 7197062 Upgrade lua to 5.2.1
Srinivasa Sarva <Srinivasa.Sarva@oracle.com>
parents: 800
diff changeset
    26
COMPONENT_VERSION=	5.2.1
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 181
diff changeset
    27
COMPONENT_PROJECT_URL=	http://www.lua.org/
97
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    28
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    29
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 609
diff changeset
    30
COMPONENT_ARCHIVE_HASH=	\
990
6bfca1239ccb 7197062 Upgrade lua to 5.2.1
Srinivasa Sarva <Srinivasa.Sarva@oracle.com>
parents: 800
diff changeset
    31
    sha256:64304da87976133196f9e4c15250b70f444467b6ed80d7cfd7b3b982b5177be5
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 181
diff changeset
    32
COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)ftp/$(COMPONENT_ARCHIVE)
1058
34d7aaa03423 15886624 Auto-generation of Userland gate list - Phase 3
Rich Burridge <rich.burridge@oracle.com>
parents: 1021
diff changeset
    33
COMPONENT_BUGDB=	utility/lua
990
6bfca1239ccb 7197062 Upgrade lua to 5.2.1
Srinivasa Sarva <Srinivasa.Sarva@oracle.com>
parents: 800
diff changeset
    34
6bfca1239ccb 7197062 Upgrade lua to 5.2.1
Srinivasa Sarva <Srinivasa.Sarva@oracle.com>
parents: 800
diff changeset
    35
LUA_TESTS=		lua-5.2.1-tests
6bfca1239ccb 7197062 Upgrade lua to 5.2.1
Srinivasa Sarva <Srinivasa.Sarva@oracle.com>
parents: 800
diff changeset
    36
COMPONENT_ARCHIVE_1=	$(LUA_TESTS).tar.gz
6bfca1239ccb 7197062 Upgrade lua to 5.2.1
Srinivasa Sarva <Srinivasa.Sarva@oracle.com>
parents: 800
diff changeset
    37
COMPONENT_ARCHIVE_HASH_1= \
6bfca1239ccb 7197062 Upgrade lua to 5.2.1
Srinivasa Sarva <Srinivasa.Sarva@oracle.com>
parents: 800
diff changeset
    38
    sha256:2346d635ee392c8d8024b07beaa10b7b66a3f861c41d575753d03155751cf114
6bfca1239ccb 7197062 Upgrade lua to 5.2.1
Srinivasa Sarva <Srinivasa.Sarva@oracle.com>
parents: 800
diff changeset
    39
COMPONENT_ARCHIVE_URL_1= $(COMPONENT_PROJECT_URL)/tests/5.2/$(COMPONENT_ARCHIVE_1)
6bfca1239ccb 7197062 Upgrade lua to 5.2.1
Srinivasa Sarva <Srinivasa.Sarva@oracle.com>
parents: 800
diff changeset
    40
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1485
diff changeset
    41
TPNO=			5814
990
6bfca1239ccb 7197062 Upgrade lua to 5.2.1
Srinivasa Sarva <Srinivasa.Sarva@oracle.com>
parents: 800
diff changeset
    42
97
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    43
include ../../make-rules/prep.mk
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    44
include ../../make-rules/justmake.mk
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    45
include ../../make-rules/ips.mk
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    46
990
6bfca1239ccb 7197062 Upgrade lua to 5.2.1
Srinivasa Sarva <Srinivasa.Sarva@oracle.com>
parents: 800
diff changeset
    47
PATCH_LEVEL= 0
6bfca1239ccb 7197062 Upgrade lua to 5.2.1
Srinivasa Sarva <Srinivasa.Sarva@oracle.com>
parents: 800
diff changeset
    48
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 97
diff changeset
    49
# This is because lua uses $(CC) to build it's shared libraries.
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 97
diff changeset
    50
CC +=		$(CC_BITS)
97
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    51
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 97
diff changeset
    52
CFLAGS +=	$(CC_PIC) $(CPP_LARGEFILES)
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 97
diff changeset
    53
151
f9e42a3f7095 7030982 hgk is delivered 444, breaks 'hg view'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    54
COMPONENT_BUILD_ARGS += CC="$(CC)"
1021
93e0813581a0 7204561 Lua header (lauxlib.h) is broken
Srinivasa Sarva <Srinivasa.Sarva@oracle.com>
parents: 990
diff changeset
    55
COMPONENT_BUILD_ARGS += USRCFLAGS="$(CFLAGS)"
151
f9e42a3f7095 7030982 hgk is delivered 444, breaks 'hg view'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    56
COMPONENT_INSTALL_ARGS += INSTALL=$(INSTALL)
f9e42a3f7095 7030982 hgk is delivered 444, breaks 'hg view'
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    57
COMPONENT_INSTALL_ARGS += INSTALL_TOP=$(PROTOUSRDIR)
181
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 151
diff changeset
    58
$(INSTALL_64):	COMPONENT_INSTALL_ARGS += INSTALL_LIB=$(PROTOUSRLIBDIR64)
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 151
diff changeset
    59
$(INSTALL_64):	COMPONENT_INSTALL_ARGS += INSTALL_BIN=$(PROTOUSRBINDIR64)
97
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    60
1265
d6a57c34a9a2 15824627 SUNBT7206171 Still problems with lua 5.2.1 integration
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    61
$(BUILD_DIR)/lua-64.pc:		files/lua-64.pc
d6a57c34a9a2 15824627 SUNBT7206171 Still problems with lua 5.2.1 integration
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    62
	/bin/sed -e "s#MACH64#$(MACH64)#g" < $< > $@
d6a57c34a9a2 15824627 SUNBT7206171 Still problems with lua 5.2.1 integration
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    63
1485
808df10bcc09 17483555 groff, guile and lua should be ASLR enabled
Rich Burridge <rich.burridge@oracle.com>
parents: 1265
diff changeset
    64
ASLR_MODE = $(ASLR_ENABLE)
808df10bcc09 17483555 groff, guile and lua should be ASLR enabled
Rich Burridge <rich.burridge@oracle.com>
parents: 1265
diff changeset
    65
2106
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    66
CLEAN_PATHS +=	$(LUA_TESTS)
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    67
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    68
LUA_EXE_32 =	$(BUILD_DIR)/$(MACH32)/src/$(COMPONENT_NAME)
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    69
LUA_EXE_64 =	$(BUILD_DIR)/$(MACH64)/src/$(COMPONENT_NAME)
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    70
LUA_EXE =	$(LUA_EXE_$(BITS))
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    71
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    72
# Unpack and patch the tests once, and work around CR #19661394, which is
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    73
# causing the lua self-tests to fail.
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    74
COMPONENT_PRE_TEST_ACTION = \
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    75
	(if ! test -d $(LUA_TESTS) ; then \
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    76
		$(UNPACK) $(UNPACK_ARGS) $(LUA_TESTS).tar.gz ; \
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    77
		(cd $(LUA_TESTS); $(GPATCH) $(GPATCH_FLAGS) \
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    78
			<$(COMPONENT_DIR)/files/fix-tests.patch) ; \
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    79
	fi)
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    80
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    81
COMPONENT_TEST_DIR =		$(LUA_TESTS)
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    82
COMPONENT_TEST_CMD =		$(LUA_EXE)
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    83
COMPONENT_TEST_ARGS =		-e"_U=true"
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    84
COMPONENT_TEST_TARGETS =	all.lua
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    85
97
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    86
# common targets
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    87
build:		$(BUILD_32_and_64)
2106
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    88
1265
d6a57c34a9a2 15824627 SUNBT7206171 Still problems with lua 5.2.1 integration
Rich Burridge <rich.burridge@oracle.com>
parents: 1058
diff changeset
    89
install:	$(INSTALL_32_and_64) $(BUILD_DIR)/lua-64.pc
2106
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    90
adb848b3a7d4 19535379 lua's self tests are a bit of a mess
Rich Burridge <rich.burridge@oracle.com>
parents: 1948
diff changeset
    91
test: 		$(TEST_32_and_64)
990
6bfca1239ccb 7197062 Upgrade lua to 5.2.1
Srinivasa Sarva <Srinivasa.Sarva@oracle.com>
parents: 800
diff changeset
    92
97
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    93
BUILD_PKG_DEPENDENCIES =        $(BUILD_TOOLS)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    94
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    95
include ../../make-rules/depend.mk