Makefile revision 844
203N/A#
203N/A# CDDL HEADER START
203N/A#
203N/A# The contents of this file are subject to the terms of the
203N/A# Common Development and Distribution License (the "License").
203N/A# You may not use this file except in compliance with the License.
203N/A#
203N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
203N/A# or http://www.opensolaris.org/os/licensing.
203N/A# See the License for the specific language governing permissions
203N/A# and limitations under the License.
203N/A#
203N/A# When distributing Covered Code, include this CDDL HEADER in each
203N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
203N/A# If applicable, add the following below this CDDL HEADER, with the
203N/A# fields enclosed by brackets "[]" replaced with your own identifying
203N/A# information: Portions Copyright [yyyy] [name of copyright owner]
203N/A#
203N/A# CDDL HEADER END
203N/A#
813N/A
203N/A#
203N/A# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
203N/A#
203N/A
203N/Ainclude ../../make-rules/shared-macros.mk
618N/A
203N/APATH=$(SPRO_VROOT)/bin:$(JAVA_HOME)/bin:/usr/bin
203N/A
844N/ACOMPONENT_NAME= otp_src
844N/ACOMPONENT_VERSION_MAJOR= 12
203N/ACOMPONENT_VERSION_MINOR= B
1273N/ACOMPONENT_VERSION_MICRO= 5
203N/A# IPS_COMPONENT_VERSION needs update whenever this is changed
278N/ACOMPONENT_VERSION= R$(COMPONENT_VERSION_MAJOR)$(COMPONENT_VERSION_MINOR)-$(COMPONENT_VERSION_MICRO)
278N/ACOMPONENT_PROJECT_URL= http://www.erlang.org/
203N/ACOMPONENT_SRC= $(COMPONENT_NAME)_$(COMPONENT_VERSION)
203N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
203N/ACOMPONENT_ARCHIVE_HASH= \
203N/A sha256:6ec3f344dd626bd83494fcad66db98a03f930a039b2a1499313d1a5a57aadda7
203N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE)
203N/A
206N/A# manpages
203N/ACOMPONENT_NAME_1= otp_doc_man
203N/ACOMPONENT_SRC_1= $(COMPONENT_NAME_1)_$(COMPONENT_VERSION)
203N/ACOMPONENT_ARCHIVE_1= $(COMPONENT_SRC_1).tar.gz
203N/ACOMPONENT_ARCHIVE_HASH_1= \
1701N/A sha256:f7acb458b72ffa8f9b1f45501bed85d3d9fb691c601f3f6997856c501e2f0659
1701N/ACOMPONENT_ARCHIVE_URL_1= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_1)
203N/A
203N/A# HTML documentation
203N/ACOMPONENT_NAME_2= otp_doc_html
203N/ACOMPONENT_SRC_2= $(COMPONENT_NAME_2)_$(COMPONENT_VERSION)
203N/ACOMPONENT_ARCHIVE_2= $(COMPONENT_SRC_2).tar.gz
203N/ACOMPONENT_ARCHIVE_HASH_2= \
203N/A sha256:db131a347217ab434ca4c483abb61dc01989e0db43e1fe6982c3067f60cf91d7
203N/ACOMPONENT_ARCHIVE_URL_2= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_2)
203N/A
203N/Ainclude ../../make-rules/prep.mk
203N/Ainclude ../../make-rules/configure.mk
203N/Ainclude ../../make-rules/ips.mk
203N/A
203N/A# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but it is not
203N/A# enough for us. We need to include the $(COMPONENT_SUBVERSION) somehow.
203N/A# Because the IPS_COMPONENT_VERSION cannot contain letters we use mapping:
203N/A# R(major)(minor)-(micro) - (major).(minor as number).(micro)
203N/AIPS_COMPONENT_VERSION= $(COMPONENT_VERSION_MAJOR).2.$(COMPONENT_VERSION_MICRO)
203N/A
203N/A# Built in SFW with gcc and builds cleanly now only with gcc
203N/ACOMPILER = gcc
813N/A
206N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
203N/ACONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/gd2"
203N/ACONFIGURE_OPTIONS += --enable-smp-support
203N/ACONFIGURE_OPTIONS += --enable-threads
203N/ACONFIGURE_OPTIONS += --enable-hipe
203N/ACONFIGURE_OPTIONS += --with-ssl
203N/ACONFIGURE_OPTIONS += --enable-dynamic-ssl-lib
203N/A
203N/ACONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
203N/ACONFIGURE_OPTIONS.64 += LIBS="-m64"
203N/A
203N/A# Use cp(1) instead of cloney because erlang's 'install' target uses 'tar'
203N/A# 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. Perhaps this can be looked
# at when we upgrade to a more current version.
COMPONENT_PRE_CONFIGURE_ACTION = \
($(CP) -rp $(SOURCE_DIR)/. $(@D))
CONFIGURE_SCRIPT = $(@D)/configure
COMPONENT_INSTALL_ARGS += INSTALL_PREFIX=$(PROTO_DIR)
# common targets
build: $(BUILD_32_and_64)
install: $(INSTALL_32_and_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/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