Makefile revision 1244
f808c858fa61e7769218966759510a8b1190dfcfraf#
f808c858fa61e7769218966759510a8b1190dfcfraf# CDDL HEADER START
f808c858fa61e7769218966759510a8b1190dfcfraf#
f808c858fa61e7769218966759510a8b1190dfcfraf# The contents of this file are subject to the terms of the
f808c858fa61e7769218966759510a8b1190dfcfraf# Common Development and Distribution License (the "License").
f808c858fa61e7769218966759510a8b1190dfcfraf# You may not use this file except in compliance with the License.
f808c858fa61e7769218966759510a8b1190dfcfraf#
f808c858fa61e7769218966759510a8b1190dfcfraf# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f808c858fa61e7769218966759510a8b1190dfcfraf# or http://www.opensolaris.org/os/licensing.
f808c858fa61e7769218966759510a8b1190dfcfraf# See the License for the specific language governing permissions
f808c858fa61e7769218966759510a8b1190dfcfraf# and limitations under the License.
f808c858fa61e7769218966759510a8b1190dfcfraf#
f808c858fa61e7769218966759510a8b1190dfcfraf# When distributing Covered Code, include this CDDL HEADER in each
f808c858fa61e7769218966759510a8b1190dfcfraf# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f808c858fa61e7769218966759510a8b1190dfcfraf# If applicable, add the following below this CDDL HEADER, with the
f808c858fa61e7769218966759510a8b1190dfcfraf# fields enclosed by brackets "[]" replaced with your own identifying
f808c858fa61e7769218966759510a8b1190dfcfraf# information: Portions Copyright [yyyy] [name of copyright owner]
f808c858fa61e7769218966759510a8b1190dfcfraf#
f808c858fa61e7769218966759510a8b1190dfcfraf# CDDL HEADER END
f808c858fa61e7769218966759510a8b1190dfcfraf#
f808c858fa61e7769218966759510a8b1190dfcfraf
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami#
f808c858fa61e7769218966759510a8b1190dfcfraf# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami#
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahramiinclude ../../make-rules/shared-macros.mk
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali BahramiPATH=$(SPRO_VROOT)/bin:$(JAVA_HOME)/bin:/usr/bin
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali BahramiCOMPONENT_NAME= erlang
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali BahramiCOMPONENT_VERSION_MAJOR= 12
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali BahramiCOMPONENT_VERSION_MINOR= B
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali BahramiCOMPONENT_VERSION_MICRO= 5
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami# IPS_COMPONENT_VERSION needs update whenever this is changed
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali BahramiCOMPONENT_VERSION= R$(COMPONENT_VERSION_MAJOR)$(COMPONENT_VERSION_MINOR)-$(COMPONENT_VERSION_MICRO)
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali BahramiCOMPONENT_PROJECT_URL= http://www.erlang.org/
f808c858fa61e7769218966759510a8b1190dfcfrafCOMPONENT_SRC_NAME= otp_src
f808c858fa61e7769218966759510a8b1190dfcfrafCOMPONENT_SRC= $(COMPONENT_SRC_NAME)_$(COMPONENT_VERSION)
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali BahramiCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali BahramiCOMPONENT_ARCHIVE_HASH= \
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami sha256:6ec3f344dd626bd83494fcad66db98a03f930a039b2a1499313d1a5a57aadda7
f808c858fa61e7769218966759510a8b1190dfcfrafCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE)
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami
f808c858fa61e7769218966759510a8b1190dfcfraf# manpages
f808c858fa61e7769218966759510a8b1190dfcfrafCOMPONENT_NAME_1= otp_doc_man
f808c858fa61e7769218966759510a8b1190dfcfrafCOMPONENT_SRC_1= $(COMPONENT_NAME_1)_$(COMPONENT_VERSION)
f808c858fa61e7769218966759510a8b1190dfcfrafCOMPONENT_ARCHIVE_1= $(COMPONENT_SRC_1).tar.gz
f808c858fa61e7769218966759510a8b1190dfcfrafCOMPONENT_ARCHIVE_HASH_1= \
f808c858fa61e7769218966759510a8b1190dfcfraf sha256:f7acb458b72ffa8f9b1f45501bed85d3d9fb691c601f3f6997856c501e2f0659
f808c858fa61e7769218966759510a8b1190dfcfrafCOMPONENT_ARCHIVE_URL_1= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_1)
f808c858fa61e7769218966759510a8b1190dfcfraf
f808c858fa61e7769218966759510a8b1190dfcfraf# HTML documentation
f808c858fa61e7769218966759510a8b1190dfcfrafCOMPONENT_NAME_2= otp_doc_html
f808c858fa61e7769218966759510a8b1190dfcfrafCOMPONENT_SRC_2= $(COMPONENT_NAME_2)_$(COMPONENT_VERSION)
f808c858fa61e7769218966759510a8b1190dfcfrafCOMPONENT_ARCHIVE_2= $(COMPONENT_SRC_2).tar.gz
f808c858fa61e7769218966759510a8b1190dfcfrafCOMPONENT_ARCHIVE_HASH_2= \
f808c858fa61e7769218966759510a8b1190dfcfraf sha256:db131a347217ab434ca4c483abb61dc01989e0db43e1fe6982c3067f60cf91d7
f808c858fa61e7769218966759510a8b1190dfcfrafCOMPONENT_ARCHIVE_URL_2= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_2)
f808c858fa61e7769218966759510a8b1190dfcfraf
f808c858fa61e7769218966759510a8b1190dfcfrafinclude ../../make-rules/prep.mk
f808c858fa61e7769218966759510a8b1190dfcfrafinclude ../../make-rules/configure.mk
f808c858fa61e7769218966759510a8b1190dfcfrafinclude ../../make-rules/ips.mk
f808c858fa61e7769218966759510a8b1190dfcfraf
f808c858fa61e7769218966759510a8b1190dfcfraf# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but it is not
f808c858fa61e7769218966759510a8b1190dfcfraf# enough for us. We need to include the $(COMPONENT_SUBVERSION) somehow.
f808c858fa61e7769218966759510a8b1190dfcfraf# Because the IPS_COMPONENT_VERSION cannot contain letters we use mapping:
f808c858fa61e7769218966759510a8b1190dfcfraf# R(major)(minor)-(micro) - (major).(minor as number).(micro)
f808c858fa61e7769218966759510a8b1190dfcfrafIPS_COMPONENT_VERSION= $(COMPONENT_VERSION_MAJOR).2.$(COMPONENT_VERSION_MICRO)
f808c858fa61e7769218966759510a8b1190dfcfraf
f808c858fa61e7769218966759510a8b1190dfcfraf# Built in SFW with gcc and builds cleanly now only with gcc
f808c858fa61e7769218966759510a8b1190dfcfrafCOMPILER = gcc
f808c858fa61e7769218966759510a8b1190dfcfraf
f808c858fa61e7769218966759510a8b1190dfcfrafCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
f808c858fa61e7769218966759510a8b1190dfcfrafCONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/gd2"
f808c858fa61e7769218966759510a8b1190dfcfrafCONFIGURE_OPTIONS += --enable-smp-support
f808c858fa61e7769218966759510a8b1190dfcfrafCONFIGURE_OPTIONS += --enable-threads
f808c858fa61e7769218966759510a8b1190dfcfrafCONFIGURE_OPTIONS += --enable-hipe
f808c858fa61e7769218966759510a8b1190dfcfrafCONFIGURE_OPTIONS += --with-ssl
f808c858fa61e7769218966759510a8b1190dfcfrafCONFIGURE_OPTIONS += --enable-dynamic-ssl-lib
f808c858fa61e7769218966759510a8b1190dfcfraf
f808c858fa61e7769218966759510a8b1190dfcfrafCONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
f808c858fa61e7769218966759510a8b1190dfcfrafCONFIGURE_OPTIONS.64 += LIBS="-m64"
f808c858fa61e7769218966759510a8b1190dfcfraf
f808c858fa61e7769218966759510a8b1190dfcfraf# Use cp(1) instead of cloney because erlang's 'install' target uses 'tar'
f808c858fa61e7769218966759510a8b1190dfcfraf# to copy files and our tar doesn't handle long links by default. Between
f808c858fa61e7769218966759510a8b1190dfcfraf# the use of 'tar' and 'ld', a path adjustment wasn't an option due to the
f808c858fa61e7769218966759510a8b1190dfcfraf# need for /usr/bin/ld and /usr/gnu/bin/tar. Perhaps this can be looked
f808c858fa61e7769218966759510a8b1190dfcfraf# at when we upgrade to a more current version.
f808c858fa61e7769218966759510a8b1190dfcfrafCOMPONENT_PRE_CONFIGURE_ACTION = \
f808c858fa61e7769218966759510a8b1190dfcfraf ($(CP) -rp $(SOURCE_DIR)/. $(@D))
f808c858fa61e7769218966759510a8b1190dfcfrafCONFIGURE_SCRIPT = $(@D)/configure
f808c858fa61e7769218966759510a8b1190dfcfraf
f808c858fa61e7769218966759510a8b1190dfcfrafCOMPONENT_INSTALL_ARGS += INSTALL_PREFIX=$(PROTO_DIR)
f808c858fa61e7769218966759510a8b1190dfcfraf
f808c858fa61e7769218966759510a8b1190dfcfraf# common targets
f808c858fa61e7769218966759510a8b1190dfcfrafbuild: $(BUILD_32_and_64)
f808c858fa61e7769218966759510a8b1190dfcfraf
f808c858fa61e7769218966759510a8b1190dfcfrafinstall: $(INSTALL_32_and_64)
f808c858fa61e7769218966759510a8b1190dfcfraf # Undelivered useless files:
f808c858fa61e7769218966759510a8b1190dfcfraf # erlang/lib/crypto-*/priv/obj
f808c858fa61e7769218966759510a8b1190dfcfraf # erlang/lib/ssl-*/priv/obj
f808c858fa61e7769218966759510a8b1190dfcfraf # erlang/Install
f808c858fa61e7769218966759510a8b1190dfcfraf # erlang/misc
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami # erlang/*/*.bat
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami # manpages: start.1 werl.1
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami $(RM) -r documentation
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami $(MKDIR) documentation && cd documentation && \
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1) && \
f808c858fa61e7769218966759510a8b1190dfcfraf $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_2)
f808c858fa61e7769218966759510a8b1190dfcfraf # remove INSTALL_PREFIX from path
f808c858fa61e7769218966759510a8b1190dfcfraf $(PERL) -pi -e "s|$(PROTO_DIR)||g" $(PROTO_DIR)/usr/lib/erlang/bin/erl \
$(PROTO_DIR)/usr/lib/$(MACH64)/erlang/bin/erl \
$(PROTO_DIR)/usr/lib/erlang/releases/RELEASES \
$(PROTO_DIR)/usr/lib/$(MACH64)/erlang/releases/RELEASES
clean::
$(RM) -r documentation
test: $(NO_TESTS)
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
include ../../make-rules/depend.mk