Makefile revision 4256
883N/A#
883N/A# CDDL HEADER START
883N/A#
883N/A# The contents of this file are subject to the terms of the
883N/A# Common Development and Distribution License (the "License").
883N/A# You may not use this file except in compliance with the License.
883N/A#
883N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
883N/A# or http://www.opensolaris.org/os/licensing.
883N/A# See the License for the specific language governing permissions
883N/A# and limitations under the License.
883N/A#
883N/A# When distributing Covered Code, include this CDDL HEADER in each
883N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
883N/A# If applicable, add the following below this CDDL HEADER, with the
883N/A# fields enclosed by brackets "[]" replaced with your own identifying
883N/A# information: Portions Copyright [yyyy] [name of copyright owner]
883N/A#
883N/A# CDDL HEADER END
883N/A#
883N/A
883N/A#
3996N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
883N/A#
883N/A
883N/A# Built in SFW with gcc and builds cleanly now only with gcc
883N/ACOMPILER = gcc
883N/A
883N/Ainclude ../../make-rules/shared-macros.mk
883N/A
883N/APATH=$(JAVA_HOME)/bin:/usr/bin
883N/A
1273N/ACOMPONENT_NAME= erlang
883N/ACOMPONENT_VERSION= 17.5
4561N/ACOMPONENT_PROJECT_URL= http://www.erlang.org/
4561N/ACOMPONENT_SRC_NAME= otp_src
4561N/ACOMPONENT_SRC= $(COMPONENT_SRC_NAME)_$(COMPONENT_VERSION)
4561N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
4561N/ACOMPONENT_ARCHIVE_HASH= \
4561N/A sha256:3c28820c981b30c50df8ac2a4a238e5813454fa3ed2ad530bc7948a282846474
4561N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE)
883N/ACOMPONENT_BUGDB= utility/erlang
883N/A
883N/A# manpages
883N/ACOMPONENT_NAME_1= otp_doc_man
883N/ACOMPONENT_SRC_1= $(COMPONENT_NAME_1)_$(COMPONENT_VERSION)
883N/ACOMPONENT_ARCHIVE_1= $(COMPONENT_SRC_1).tar.gz
883N/ACOMPONENT_ARCHIVE_HASH_1= \
1653N/A sha256:85b1b2a1011fc01af550f1fe9e5a599a4c5f2a35d264d2804af1d05590a857c3
883N/ACOMPONENT_ARCHIVE_URL_1= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_1)
883N/A
883N/A# HTML documentation
883N/ACOMPONENT_NAME_2= otp_doc_html
883N/ACOMPONENT_SRC_2= $(COMPONENT_NAME_2)_$(COMPONENT_VERSION)
883N/ACOMPONENT_ARCHIVE_2= $(COMPONENT_SRC_2).tar.gz
883N/ACOMPONENT_ARCHIVE_HASH_2= \
883N/A sha256:baba1d373c1faacf4a1a6ec1220d57d0cb2b977edb74f32cd58dc786361c6cf5
883N/ACOMPONENT_ARCHIVE_URL_2= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_2)
1574N/A
1574N/ATPNO= 18548
1574N/A
883N/Ainclude $(WS_MAKE_RULES)/prep.mk
883N/Ainclude $(WS_MAKE_RULES)/configure.mk
883N/Ainclude $(WS_MAKE_RULES)/ips.mk
883N/A
883N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
883N/ACONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/gd2"
883N/ACONFIGURE_OPTIONS += --enable-smp-support
883N/ACONFIGURE_OPTIONS += --enable-threads
883N/A# The HiPE portion is a bit sensitive, and only seems to work 64-bit on
883N/A# amd64 (thus the variant.arch tagging in erlang.p5m). erts/config.log
887N/A# can be very interesting if issues occur.
887N/ACONFIGURE_OPTIONS += --enable-hipe
887N/ACONFIGURE_OPTIONS += --with-ssl
913N/ACONFIGURE_OPTIONS += --enable-dynamic-ssl-lib
913N/A
913N/ACONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
913N/A
883N/ACONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
3996N/ACONFIGURE_OPTIONS.64 += LIBS="-m64"
# Needed for 'set name=info.source-url' action in erlang-doc.p5m
PKG_MACROS += COMPONENT_ARCHIVE_URL_2=$(COMPONENT_ARCHIVE_URL_2)
# Use cp(1) instead of cloney because erlang's 'install' target uses 'tar'
# to copy files and our tar doesn't handle long links by default. Between
# the use of 'tar' and 'ld', a path adjustment wasn't an option due to the
# need for /usr/bin/ld and /usr/gnu/bin/tar. This is still the case with
# erlang version 17.5.
COMPONENT_PRE_CONFIGURE_ACTION = \
($(CP) -rp $(SOURCE_DIR)/. $(@D))
CONFIGURE_SCRIPT = $(@D)/configure
# Always show the build and link lines for easier debugging.
COMPONENT_BUILD_ARGS += V=1
COMPONENT_INSTALL_ARGS += INSTALL_PREFIX=$(PROTO_DIR)
COMPONENT_TEST_ENV += ERL_TOP=$(BUILD_DIR_64)
COMPONENT_TEST_TARGETS = tests
# Remove the two lines which contains the tester's username.
COMPONENT_TEST_TRANSFORMS += \
'-e "s|/ldisk/tests|XXX_UID_XXX|g" ' \
'-e "/XXX_UID_XXX/d" '
ASLR_MODE = $(ASLR_ENABLE)
configure: $(CONFIGURE_64)
build: $(BUILD_64)
install: $(INSTALL_64)
# Undelivered useless files:
# erlang/lib/crypto-*/priv/obj
# erlang/lib/ssl-*/priv/obj
# erlang/Install
# erlang/misc
# erlang/*/*.bat
# manpages: start.1 werl.1
$(RM) -r documentation
$(MKDIR) documentation && cd documentation && \
$(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1) && \
$(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_2)
# remove INSTALL_PREFIX from path
$(PERL) -pi -e "s|$(PROTO_DIR)||g" \
$(PROTO_DIR)/usr/lib/$(MACH64)/erlang/bin/erl \
$(PROTO_DIR)/usr/lib/$(MACH64)/erlang/releases/RELEASES
clean::
$(RM) -r documentation
test: $(TEST_64)
REQUIRED_PACKAGES += library/ncurses
REQUIRED_PACKAGES += library/security/openssl
REQUIRED_PACKAGES += library/security/openssl/openssl-fips-140
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/core-os
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/math
REQUIRED_PACKAGES += system/linker