Makefile revision 3083
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainen# CDDL HEADER START
d9076f5939edf5d20a261494b1a861dcbb0d32e2Timo Sirainen# The contents of this file are subject to the terms of the
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainen# Common Development and Distribution License (the "License").
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainen# You may not use this file except in compliance with the License.
379175cfba8150d481d9898b78330b719d128d84Timo Sirainen# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1701b354e81ff1dfd0b6c7bb4412b8d9c2b9f986Timo Sirainen# See the License for the specific language governing permissions
379175cfba8150d481d9898b78330b719d128d84Timo Sirainen# and limitations under the License.
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainen# When distributing Covered Code, include this CDDL HEADER in each
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainen# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
379175cfba8150d481d9898b78330b719d128d84Timo Sirainen# If applicable, add the following below this CDDL HEADER, with the
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainen# fields enclosed by brackets "[]" replaced with your own identifying
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainen# information: Portions Copyright [yyyy] [name of copyright owner]
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainen# CDDL HEADER END
645d76bbb742c74795a0b35fe159451c4afad8d8Timo Sirainen# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
645d76bbb742c74795a0b35fe159451c4afad8d8Timo SirainenPATH=$(SPRO_VROOT)/bin:$(JAVA_HOME)/bin:/usr/bin
a2150da2dc906c26a26219cbefbe28a119aafee2Timo Sirainen# IPS_COMPONENT_VERSION needs update whenever this is changed
a64adf62fa33f2463a86f990217b0c9078531a40Timo SirainenCOMPONENT_VERSION= R$(COMPONENT_VERSION_MAJOR)$(COMPONENT_VERSION_MINOR)$(COMPONENT_VERSION_MICRO)
2f90189c6ee66a17f7bf838a8eb8a69868630fb8Timo SirainenCOMPONENT_SRC= $(COMPONENT_SRC_NAME)_$(COMPONENT_VERSION)
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen sha256:4bccac86dd76aec050252e44276a0283a0df9218e6470cf042a9b9f9dfc9476c
a26b7e87b4157cfa800f9bcd8c4c044462d21268Timo SirainenCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE)
a64adf62fa33f2463a86f990217b0c9078531a40Timo SirainenCOMPONENT_SRC_1= $(COMPONENT_NAME_1)_$(COMPONENT_VERSION)
a64adf62fa33f2463a86f990217b0c9078531a40Timo SirainenCOMPONENT_ARCHIVE_1= $(COMPONENT_SRC_1)-1.tar.gz
563273bdac80393af63b9520cbf4d24cc0efd028Timo Sirainen sha256:07980d8014c7cf8194b7078c137353f5083992add4663ced3dcba2ff91f228d8
4ee00532a265bdfb38539d811fcd12d51210ac35Timo SirainenCOMPONENT_ARCHIVE_URL_1= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_1)
d9076f5939edf5d20a261494b1a861dcbb0d32e2Timo Sirainen# HTML documentation
9fd2181788a61500641c66aec0f8c746b19bf830Timo SirainenCOMPONENT_SRC_2= $(COMPONENT_NAME_2)_$(COMPONENT_VERSION)
318ef3683d67683173f1b552cf5f9af4375b3017Timo SirainenCOMPONENT_ARCHIVE_2= $(COMPONENT_SRC_2)-1.tar.gz
4ee00532a265bdfb38539d811fcd12d51210ac35Timo Sirainen sha256:d06f580f11d1303217a5c1cf8d68a98d7e01c535be934dcd430ecdc254f7572e
67c47dbb3fde79218320fd38a45c33f61bbf3012Timo SirainenCOMPONENT_ARCHIVE_URL_2= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_2)
f534c0d42f1470fca8e4ff3493c94927bf600260Timo Sirainen# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but it is not
f534c0d42f1470fca8e4ff3493c94927bf600260Timo Sirainen# enough for us. We need to include the $(COMPONENT_SUBVERSION) somehow.
f534c0d42f1470fca8e4ff3493c94927bf600260Timo Sirainen# Because the IPS_COMPONENT_VERSION cannot contain letters or leading zeroes
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# we use mapping:
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen# R(major)(minor)(micro) - (major).(minor as number).(micro)
326c86b1cdb555957b236958e17142e82e34074eTimo SirainenIPS_COMPONENT_VERSION= $(COMPONENT_VERSION_MAJOR).2.3
326c86b1cdb555957b236958e17142e82e34074eTimo Sirainen# Built in SFW with gcc and builds cleanly now only with gcc
c7819f72f3f9cbfa976830dc6f3190873469b901Timo SirainenCONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/gd2"
e51bfe0db17f1a2e44932d0d6d3958ae409a8bcfTimo Sirainen# The HiPE portion is a bit sensitive, and only seems to work 64-bit on
447e086422f1ab7cc16833583ed70a4af7a84bc5Timo Sirainen# amd64 (thus the variant.arch tagging in erlang.p5m). erts/config.log
447e086422f1ab7cc16833583ed70a4af7a84bc5Timo Sirainen# can be very interesting if issues occur.
c981098a515c62fdfb3261e532b5d6163a0f8946Timo SirainenCONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainen# Needed for 'set name=info.source-url' action in erlang-doc.p5m
d80f37f025593d959bdfa9c378915e4322f4f504Timo SirainenPKG_MACROS += COMPONENT_ARCHIVE_URL_2=$(COMPONENT_ARCHIVE_URL_2)
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainen# Use cp(1) instead of cloney because erlang's 'install' target uses 'tar'
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainen# to copy files and our tar doesn't handle long links by default. Between
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainen# the use of 'tar' and 'ld', a path adjustment wasn't an option due to the
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainen# need for /usr/bin/ld and /usr/gnu/bin/tar. Perhaps this can be looked
d80f37f025593d959bdfa9c378915e4322f4f504Timo Sirainen# at when we upgrade to a more current version.
d80f37f025593d959bdfa9c378915e4322f4f504Timo SirainenCOMPONENT_INSTALL_ARGS += INSTALL_PREFIX=$(PROTO_DIR)
67c47dbb3fde79218320fd38a45c33f61bbf3012Timo Sirainen# common targets
1e40531c1de45bc87e72a9d5866ff2af79b63cebTimo Sirainen # Undelivered useless files:
a443e5aaf632257bfd1e7aa9b3c42c09512bbe43Timo Sirainen # erlang/*/*.bat
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen # manpages: start.1 werl.1
13b063ba3ea51256fd97d7fa883f14cb08842b0dTimo Sirainen $(MKDIR) documentation && cd documentation && \
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1) && \
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_2)
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen # remove INSTALL_PREFIX from path
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen $(PROTO_DIR)/usr/lib/$(MACH64)/erlang/bin/erl \