Makefile revision 3958
346N/A#
346N/A# CDDL HEADER START
346N/A#
346N/A# The contents of this file are subject to the terms of the
346N/A# Common Development and Distribution License (the "License").
346N/A# You may not use this file except in compliance with the License.
346N/A#
346N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
346N/A# or http://www.opensolaris.org/os/licensing.
346N/A# See the License for the specific language governing permissions
346N/A# and limitations under the License.
346N/A#
346N/A# When distributing Covered Code, include this CDDL HEADER in each
346N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
346N/A# If applicable, add the following below this CDDL HEADER, with the
346N/A# fields enclosed by brackets "[]" replaced with your own identifying
346N/A# information: Portions Copyright [yyyy] [name of copyright owner]
346N/A#
346N/A# CDDL HEADER END
346N/A#
346N/A
346N/A#
3817N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
346N/A#
346N/A
3817N/A# Built in SFW with gcc and builds cleanly now only with gcc
3817N/ACOMPILER = gcc
3817N/A
346N/Ainclude ../../make-rules/shared-macros.mk
346N/A
783N/APATH=$(SPRO_VROOT)/bin:$(JAVA_HOME)/bin:/usr/bin
783N/A
1244N/ACOMPONENT_NAME= erlang
1357N/ACOMPONENT_VERSION_MAJOR= 15
346N/ACOMPONENT_VERSION_MINOR= B
1357N/ACOMPONENT_VERSION_MICRO= 03
346N/A# IPS_COMPONENT_VERSION needs update whenever this is changed
1357N/ACOMPONENT_VERSION= R$(COMPONENT_VERSION_MAJOR)$(COMPONENT_VERSION_MINOR)$(COMPONENT_VERSION_MICRO)
618N/ACOMPONENT_PROJECT_URL= http://www.erlang.org/
1244N/ACOMPONENT_SRC_NAME= otp_src
1244N/ACOMPONENT_SRC= $(COMPONENT_SRC_NAME)_$(COMPONENT_VERSION)
1357N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC)-1.tar.gz
844N/ACOMPONENT_ARCHIVE_HASH= \
1357N/A sha256:4bccac86dd76aec050252e44276a0283a0df9218e6470cf042a9b9f9dfc9476c
618N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE)
1258N/ACOMPONENT_BUGDB= utility/erlang
346N/A
346N/A# manpages
346N/ACOMPONENT_NAME_1= otp_doc_man
346N/ACOMPONENT_SRC_1= $(COMPONENT_NAME_1)_$(COMPONENT_VERSION)
1357N/ACOMPONENT_ARCHIVE_1= $(COMPONENT_SRC_1)-1.tar.gz
844N/ACOMPONENT_ARCHIVE_HASH_1= \
1357N/A sha256:07980d8014c7cf8194b7078c137353f5083992add4663ced3dcba2ff91f228d8
618N/ACOMPONENT_ARCHIVE_URL_1= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_1)
346N/A
346N/A# HTML documentation
346N/ACOMPONENT_NAME_2= otp_doc_html
346N/ACOMPONENT_SRC_2= $(COMPONENT_NAME_2)_$(COMPONENT_VERSION)
1357N/ACOMPONENT_ARCHIVE_2= $(COMPONENT_SRC_2)-1.tar.gz
844N/ACOMPONENT_ARCHIVE_HASH_2= \
1357N/A sha256:d06f580f11d1303217a5c1cf8d68a98d7e01c535be934dcd430ecdc254f7572e
618N/ACOMPONENT_ARCHIVE_URL_2= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_2)
346N/A
3083N/ATPNO= 18548
3083N/A
3817N/Ainclude $(WS_MAKE_RULES)/prep.mk
3817N/Ainclude $(WS_MAKE_RULES)/configure.mk
3817N/Ainclude $(WS_MAKE_RULES)/ips.mk
346N/A
346N/A# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but it is not
346N/A# enough for us. We need to include the $(COMPONENT_SUBVERSION) somehow.
1357N/A# Because the IPS_COMPONENT_VERSION cannot contain letters or leading zeroes
1357N/A# we use mapping:
1357N/A# R(major)(minor)(micro) - (major).(minor as number).(micro)
1357N/AIPS_COMPONENT_VERSION= $(COMPONENT_VERSION_MAJOR).2.3
346N/A
346N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
346N/ACONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/gd2"
346N/ACONFIGURE_OPTIONS += --enable-smp-support
346N/ACONFIGURE_OPTIONS += --enable-threads
1358N/A# The HiPE portion is a bit sensitive, and only seems to work 64-bit on
1358N/A# amd64 (thus the variant.arch tagging in erlang.p5m). erts/config.log
1358N/A# can be very interesting if issues occur.
346N/ACONFIGURE_OPTIONS += --enable-hipe
346N/ACONFIGURE_OPTIONS += --with-ssl
346N/ACONFIGURE_OPTIONS += --enable-dynamic-ssl-lib
346N/A
2497N/ACONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
2497N/A
346N/ACONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
346N/ACONFIGURE_OPTIONS.64 += LIBS="-m64"
346N/A
1357N/A# Needed for 'set name=info.source-url' action in erlang-doc.p5m
1357N/APKG_MACROS += COMPONENT_ARCHIVE_URL_2=$(COMPONENT_ARCHIVE_URL_2)
1357N/A
351N/A# Use cp(1) instead of cloney because erlang's 'install' target uses 'tar'
351N/A# to copy files and our tar doesn't handle long links by default. Between
351N/A# the use of 'tar' and 'ld', a path adjustment wasn't an option due to the
351N/A# need for /usr/bin/ld and /usr/gnu/bin/tar. Perhaps this can be looked
351N/A# at when we upgrade to a more current version.
346N/ACOMPONENT_PRE_CONFIGURE_ACTION = \
351N/A ($(CP) -rp $(SOURCE_DIR)/. $(@D))
346N/ACONFIGURE_SCRIPT = $(@D)/configure
346N/A
346N/ACOMPONENT_INSTALL_ARGS += INSTALL_PREFIX=$(PROTO_DIR)
346N/A
2497N/ACOMPONENT_TEST_ENV += ERL_TOP=$(BUILD_DIR_64)
2497N/ACOMPONENT_TEST_TARGETS = tests
2497N/A
3958N/A# Remove the two lines which contains the tester's username.
3958N/ACOMPONENT_TEST_TRANSFORMS += \
3958N/A '-e "s|/ldisk/tests|XXX_UID_XXX|g" ' \
3958N/A '-e "/XXX_UID_XXX/d" '
3958N/A
1515N/AASLR_MODE = $(ASLR_ENABLE)
1515N/A
346N/A# common targets
3477N/Aconfigure: $(CONFIGURE_64)
3477N/A
2497N/Abuild: $(BUILD_64)
346N/A
2497N/Ainstall: $(INSTALL_64)
346N/A # Undelivered useless files:
346N/A # erlang/lib/crypto-*/priv/obj
346N/A # erlang/lib/ssl-*/priv/obj
346N/A # erlang/Install
346N/A # erlang/misc
346N/A # erlang/*/*.bat
346N/A # manpages: start.1 werl.1
346N/A $(RM) -r documentation
346N/A $(MKDIR) documentation && cd documentation && \
346N/A $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1) && \
346N/A $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_2)
346N/A # remove INSTALL_PREFIX from path
2497N/A $(PERL) -pi -e "s|$(PROTO_DIR)||g" \
346N/A $(PROTO_DIR)/usr/lib/$(MACH64)/erlang/bin/erl \
346N/A $(PROTO_DIR)/usr/lib/$(MACH64)/erlang/releases/RELEASES
346N/A
346N/Aclean::
346N/A $(RM) -r documentation
346N/A
2497N/Atest: $(TEST_64)
346N/A
346N/A
3817N/AREQUIRED_PACKAGES += library/ncurses
3817N/AREQUIRED_PACKAGES += library/security/openssl
3817N/AREQUIRED_PACKAGES += shell/ksh93
3817N/AREQUIRED_PACKAGES += system/core-os
3817N/AREQUIRED_PACKAGES += system/library
3817N/AREQUIRED_PACKAGES += system/library/math
3817N/AREQUIRED_PACKAGES += system/linker