Makefile revision 3090
48c0c81cd6fabac9d3386406d97633780365b839coar#
ee7189b4bbce2f62ff79e8261cb28379ea84d3b9jerenkrantz# CDDL HEADER START
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj#
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# The contents of this file are subject to the terms of the
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# Common Development and Distribution License (the "License").
45740d5cd30d22f067c05b95f04f866abd7ebed8jwoolley# You may not use this file except in compliance with the License.
45740d5cd30d22f067c05b95f04f866abd7ebed8jwoolley#
0bd0176ce9f4321eeb506aa372d0bcc84befbf4cstriker# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d8028365066fca602bf35d014530a1802114378crbb# or http://www.opensolaris.org/os/licensing.
c25203fdca093d4504c51b4cd974ff60d5aa4fb1wrowe# See the License for the specific language governing permissions
c25203fdca093d4504c51b4cd974ff60d5aa4fb1wrowe# and limitations under the License.
c25203fdca093d4504c51b4cd974ff60d5aa4fb1wrowe#
d89c116f82699294ca744125723651c554bc5925wrowe# When distributing Covered Code, include this CDDL HEADER in each
4214e98fc9045e5010e66f9a967bd6d68f40d342aaron# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8721697e2aece27b0e738519329f7976c72b27bfjerenkrantz# If applicable, add the following below this CDDL HEADER, with the
c25203fdca093d4504c51b4cd974ff60d5aa4fb1wrowe# fields enclosed by brackets "[]" replaced with your own identifying
91cacb801f6c0215b38322f6d2fc58cbfedfecfbjerenkrantz# information: Portions Copyright [yyyy] [name of copyright owner]
91cacb801f6c0215b38322f6d2fc58cbfedfecfbjerenkrantz#
df14f0d3a5191cdd7c4bb5b03acd135d43a6f51brbb# CDDL HEADER END
df14f0d3a5191cdd7c4bb5b03acd135d43a6f51brbb#
ab71b233b3a36489e44a7b061c48293be0b17788jwoolley
571760de5e60c0b459cb11be45507b923cd023eejwoolley#
571760de5e60c0b459cb11be45507b923cd023eejwoolley# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
9180a5933673ffb1af633c255ceee029340f3b1erbb#
bcb6e1be6041dfeb549c8ea8d37f97ad4e90a0c3rbb
9bd71e35f5d26d26d23fe3a677401828e842ed72wroweinclude ../../make-rules/shared-macros.mk
2900ab946a2d76b73a14cebfe2985d253f01c967stoddard
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbbPATH=$(SPRO_VROOT)/bin:$(JAVA_HOME)/bin:/usr/bin
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbb
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbbCOMPONENT_NAME= erlang
b876b7bcf0ce3d232da723246d709e8dbbfe8762rbbCOMPONENT_VERSION_MAJOR= 15
cf6bf6c34c936e6a6fe731dbce4a5c3c8bf8e9a3gsteinCOMPONENT_VERSION_MINOR= B
35330e0d79ceb8027223bbb8330a381b1f989d6etrawickCOMPONENT_VERSION_MICRO= 03
6f6f4a4bca281779d196acbdd5c017bb90858305trawick# IPS_COMPONENT_VERSION needs update whenever this is changed
8dd4618c4709236b4ea297d7250d282e463ce2d8rbbCOMPONENT_VERSION= R$(COMPONENT_VERSION_MAJOR)$(COMPONENT_VERSION_MINOR)$(COMPONENT_VERSION_MICRO)
09bd86d0db1114ee23eda0a6eb76ca055877a1cftrawickCOMPONENT_PROJECT_URL= http://www.erlang.org/
2deb319e6b3de239f45c16a3e9e836d44f1f7108rbbCOMPONENT_SRC_NAME= otp_src
bd929c73ef04789b7183b840d8db6e01d03a4d86rbbCOMPONENT_SRC= $(COMPONENT_SRC_NAME)_$(COMPONENT_VERSION)
70f6f32765cfaadd6da8de6f0fea97ddd72d8fadmanojCOMPONENT_ARCHIVE= $(COMPONENT_SRC)-1.tar.gz
2a6c49cfaef5979a5a06098f3ce987cd76769409manojCOMPONENT_ARCHIVE_HASH= \
af4c982a7cf4515f124935f99a329744035fc699slive sha256:4bccac86dd76aec050252e44276a0283a0df9218e6470cf042a9b9f9dfc9476c
af4c982a7cf4515f124935f99a329744035fc699sliveCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE)
af4c982a7cf4515f124935f99a329744035fc699sliveCOMPONENT_BUGDB= utility/erlang
af4c982a7cf4515f124935f99a329744035fc699slive
af4c982a7cf4515f124935f99a329744035fc699slive# manpages
af4c982a7cf4515f124935f99a329744035fc699sliveCOMPONENT_NAME_1= otp_doc_man
af4c982a7cf4515f124935f99a329744035fc699sliveCOMPONENT_SRC_1= $(COMPONENT_NAME_1)_$(COMPONENT_VERSION)
10270f6f94b2069d0d357805c140a9897449b9ccianhCOMPONENT_ARCHIVE_1= $(COMPONENT_SRC_1)-1.tar.gz
4b62424416882687387923b3130b96241503cbe0jerenkrantzCOMPONENT_ARCHIVE_HASH_1= \
5ca8e11fadb6f7a8d9d0367c1800205c99d4bcd6jerenkrantz sha256:07980d8014c7cf8194b7078c137353f5083992add4663ced3dcba2ff91f228d8
5ca8e11fadb6f7a8d9d0367c1800205c99d4bcd6jerenkrantzCOMPONENT_ARCHIVE_URL_1= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_1)
45b0e1c775c1cfed6473c9e5304179ccb9609f53stoddard
dbec4658981e4f9127e8676457c28d42932be7cdtrawick# HTML documentation
1b7e9aeb9867a1c94e24e8ae491d2dfcd0d225e3jerenkrantzCOMPONENT_NAME_2= otp_doc_html
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantzCOMPONENT_SRC_2= $(COMPONENT_NAME_2)_$(COMPONENT_VERSION)
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantzCOMPONENT_ARCHIVE_2= $(COMPONENT_SRC_2)-1.tar.gz
f17588e04d2412bf1345783ed1d173322d728d6ftrawickCOMPONENT_ARCHIVE_HASH_2= \
f17588e04d2412bf1345783ed1d173322d728d6ftrawick sha256:d06f580f11d1303217a5c1cf8d68a98d7e01c535be934dcd430ecdc254f7572e
f17588e04d2412bf1345783ed1d173322d728d6ftrawickCOMPONENT_ARCHIVE_URL_2= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_2)
f17588e04d2412bf1345783ed1d173322d728d6ftrawick
f17588e04d2412bf1345783ed1d173322d728d6ftrawickTPNO= 18548
f17588e04d2412bf1345783ed1d173322d728d6ftrawick
2fb49a1d25f38421a68d31b4cbb5d9293fdeafbewroweinclude ../../make-rules/prep.mk
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantzinclude ../../make-rules/configure.mk
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantzinclude ../../make-rules/ips.mk
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz
2fb49a1d25f38421a68d31b4cbb5d9293fdeafbewrowe# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but it is not
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# enough for us. We need to include the $(COMPONENT_SUBVERSION) somehow.
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# Because the IPS_COMPONENT_VERSION cannot contain letters or leading zeroes
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# we use mapping:
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# R(major)(minor)(micro) - (major).(minor as number).(micro)
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantzIPS_COMPONENT_VERSION= $(COMPONENT_VERSION_MAJOR).2.3
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# Built in SFW with gcc and builds cleanly now only with gcc
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantzCOMPILER = gcc
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantzCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantzCONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/gd2"
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantzCONFIGURE_OPTIONS += --enable-smp-support
2fb49a1d25f38421a68d31b4cbb5d9293fdeafbewroweCONFIGURE_OPTIONS += --enable-threads
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# The HiPE portion is a bit sensitive, and only seems to work 64-bit on
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# amd64 (thus the variant.arch tagging in erlang.p5m). erts/config.log
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# can be very interesting if issues occur.
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantzCONFIGURE_OPTIONS += --enable-hipe
ddd44b06b04507cae083c52451e28f54f0bdb5afstoddardCONFIGURE_OPTIONS += --with-ssl
1af5c0e25a649bb298e25ddfa5418fa18bdcb107aaronCONFIGURE_OPTIONS += --enable-dynamic-ssl-lib
82455c2e3b6991846fbcbf0c9e41f57dbc681217brianp
82455c2e3b6991846fbcbf0c9e41f57dbc681217brianpCONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz
1b3f48fd6b1ccb8745f908e40156c5a85ca3c347jerenkrantzCONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
b05930e6008f69bd323abe0c10f81f40ffd27983brianpCONFIGURE_OPTIONS.64 += LIBS="-m64"
ee7189b4bbce2f62ff79e8261cb28379ea84d3b9jerenkrantz
ee7189b4bbce2f62ff79e8261cb28379ea84d3b9jerenkrantz# Needed for 'set name=info.source-url' action in erlang-doc.p5m
ee7189b4bbce2f62ff79e8261cb28379ea84d3b9jerenkrantzPKG_MACROS += COMPONENT_ARCHIVE_URL_2=$(COMPONENT_ARCHIVE_URL_2)
ee7189b4bbce2f62ff79e8261cb28379ea84d3b9jerenkrantz
ee7189b4bbce2f62ff79e8261cb28379ea84d3b9jerenkrantz# Use cp(1) instead of cloney because erlang's 'install' target uses 'tar'
ee7189b4bbce2f62ff79e8261cb28379ea84d3b9jerenkrantz# to copy files and our tar doesn't handle long links by default. Between
ee7189b4bbce2f62ff79e8261cb28379ea84d3b9jerenkrantz# the use of 'tar' and 'ld', a path adjustment wasn't an option due to the
45740d5cd30d22f067c05b95f04f866abd7ebed8jwoolley# need for /usr/bin/ld and /usr/gnu/bin/tar. Perhaps this can be looked
45740d5cd30d22f067c05b95f04f866abd7ebed8jwoolley# at when we upgrade to a more current version.
ee7189b4bbce2f62ff79e8261cb28379ea84d3b9jerenkrantzCOMPONENT_PRE_CONFIGURE_ACTION = \
ee7189b4bbce2f62ff79e8261cb28379ea84d3b9jerenkrantz ($(CP) -rp $(SOURCE_DIR)/. $(@D))
ee7189b4bbce2f62ff79e8261cb28379ea84d3b9jerenkrantzCONFIGURE_SCRIPT = $(@D)/configure
45740d5cd30d22f067c05b95f04f866abd7ebed8jwoolley
45740d5cd30d22f067c05b95f04f866abd7ebed8jwoolleyCOMPONENT_INSTALL_ARGS += INSTALL_PREFIX=$(PROTO_DIR)
45740d5cd30d22f067c05b95f04f866abd7ebed8jwoolley
ee7189b4bbce2f62ff79e8261cb28379ea84d3b9jerenkrantzCOMPONENT_TEST_ENV += ERL_TOP=$(BUILD_DIR_64)
ee7189b4bbce2f62ff79e8261cb28379ea84d3b9jerenkrantzCOMPONENT_TEST_TARGETS = tests
ee7189b4bbce2f62ff79e8261cb28379ea84d3b9jerenkrantz
ee7189b4bbce2f62ff79e8261cb28379ea84d3b9jerenkrantzASLR_MODE = $(ASLR_ENABLE)
ee7189b4bbce2f62ff79e8261cb28379ea84d3b9jerenkrantz
45740d5cd30d22f067c05b95f04f866abd7ebed8jwoolley# common targets
630f5fc1277582643fe0f831a4830e15127bd047jwoolleybuild: $(BUILD_64)
630f5fc1277582643fe0f831a4830e15127bd047jwoolley
630f5fc1277582643fe0f831a4830e15127bd047jwoolleyinstall: $(INSTALL_64)
630f5fc1277582643fe0f831a4830e15127bd047jwoolley # Undelivered useless files:
56b2562cb4041a21bc313fde3204beabdb758800jwoolley # erlang/lib/crypto-*/priv/obj
56b2562cb4041a21bc313fde3204beabdb758800jwoolley # erlang/lib/ssl-*/priv/obj
56b2562cb4041a21bc313fde3204beabdb758800jwoolley # erlang/Install
56b2562cb4041a21bc313fde3204beabdb758800jwoolley # erlang/misc
56b2562cb4041a21bc313fde3204beabdb758800jwoolley # erlang/*/*.bat
56b2562cb4041a21bc313fde3204beabdb758800jwoolley # manpages: start.1 werl.1
56b2562cb4041a21bc313fde3204beabdb758800jwoolley $(RM) -r documentation
56b2562cb4041a21bc313fde3204beabdb758800jwoolley $(MKDIR) documentation && cd documentation && \
b05930e6008f69bd323abe0c10f81f40ffd27983brianp $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1) && \
b05930e6008f69bd323abe0c10f81f40ffd27983brianp $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_2)
b05930e6008f69bd323abe0c10f81f40ffd27983brianp # remove INSTALL_PREFIX from path
b05930e6008f69bd323abe0c10f81f40ffd27983brianp $(PERL) -pi -e "s|$(PROTO_DIR)||g" \
b05930e6008f69bd323abe0c10f81f40ffd27983brianp $(PROTO_DIR)/usr/lib/$(MACH64)/erlang/bin/erl \
15304e476fb32988bf988864ddacc5375b9a6080stoddard $(PROTO_DIR)/usr/lib/$(MACH64)/erlang/releases/RELEASES
15304e476fb32988bf988864ddacc5375b9a6080stoddard
8c8fbb8546af54582539898be704411a60058d85trawickclean::
4c7dab038d90d7feb67ef8ddbfacc77be8c9dbf0jwoolley $(RM) -r documentation
4c7dab038d90d7feb67ef8ddbfacc77be8c9dbf0jwoolley
4c7dab038d90d7feb67ef8ddbfacc77be8c9dbf0jwoolleytest: $(TEST_64)
4c7dab038d90d7feb67ef8ddbfacc77be8c9dbf0jwoolley
bb2a72a6e2327ae4f177c9d26e9d433033cfc27eaaronBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
8c8fbb8546af54582539898be704411a60058d85trawick
8c8fbb8546af54582539898be704411a60058d85trawickinclude ../../make-rules/depend.mk
8c8fbb8546af54582539898be704411a60058d85trawick