Makefile revision 3817
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# CDDL HEADER START
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# The contents of this file are subject to the terms of the
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# Common Development and Distribution License (the "License").
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# You may not use this file except in compliance with the License.
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# See the License for the specific language governing permissions
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# and limitations under the License.
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# When distributing Covered Code, include this CDDL HEADER in each
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# If applicable, add the following below this CDDL HEADER, with the
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# fields enclosed by brackets "[]" replaced with your own identifying
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# information: Portions Copyright [yyyy] [name of copyright owner]
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# CDDL HEADER END
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# Built in SFW with gcc and builds cleanly now only with gcc
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien RoyPATH=$(SPRO_VROOT)/bin:$(JAVA_HOME)/bin:/usr/bin
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# IPS_COMPONENT_VERSION needs update whenever this is changed
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien RoyCOMPONENT_VERSION= R$(COMPONENT_VERSION_MAJOR)$(COMPONENT_VERSION_MINOR)$(COMPONENT_VERSION_MICRO)
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien RoyCOMPONENT_SRC= $(COMPONENT_SRC_NAME)_$(COMPONENT_VERSION)
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy sha256:4bccac86dd76aec050252e44276a0283a0df9218e6470cf042a9b9f9dfc9476c
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien RoyCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE)
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien RoyCOMPONENT_SRC_1= $(COMPONENT_NAME_1)_$(COMPONENT_VERSION)
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien RoyCOMPONENT_ARCHIVE_1= $(COMPONENT_SRC_1)-1.tar.gz
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy sha256:07980d8014c7cf8194b7078c137353f5083992add4663ced3dcba2ff91f228d8
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien RoyCOMPONENT_ARCHIVE_URL_1= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_1)
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# HTML documentation
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien RoyCOMPONENT_SRC_2= $(COMPONENT_NAME_2)_$(COMPONENT_VERSION)
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien RoyCOMPONENT_ARCHIVE_2= $(COMPONENT_SRC_2)-1.tar.gz
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy sha256:d06f580f11d1303217a5c1cf8d68a98d7e01c535be934dcd430ecdc254f7572e
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien RoyCOMPONENT_ARCHIVE_URL_2= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_2)
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but it is not
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# enough for us. We need to include the $(COMPONENT_SUBVERSION) somehow.
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# Because the IPS_COMPONENT_VERSION cannot contain letters or leading zeroes
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# we use mapping:
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# R(major)(minor)(micro) - (major).(minor as number).(micro)
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien RoyIPS_COMPONENT_VERSION= $(COMPONENT_VERSION_MAJOR).2.3
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien RoyCONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/gd2"
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# The HiPE portion is a bit sensitive, and only seems to work 64-bit on
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# amd64 (thus the variant.arch tagging in erlang.p5m). erts/config.log
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# can be very interesting if issues occur.
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien RoyCONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# Needed for 'set name=info.source-url' action in erlang-doc.p5m
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien RoyPKG_MACROS += COMPONENT_ARCHIVE_URL_2=$(COMPONENT_ARCHIVE_URL_2)
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# Use cp(1) instead of cloney because erlang's 'install' target uses 'tar'
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# to copy files and our tar doesn't handle long links by default. Between
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# the use of 'tar' and 'ld', a path adjustment wasn't an option due to the
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# need for /usr/bin/ld and /usr/gnu/bin/tar. Perhaps this can be looked
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# at when we upgrade to a more current version.
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien RoyCOMPONENT_INSTALL_ARGS += INSTALL_PREFIX=$(PROTO_DIR)
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy# common targets
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy # Undelivered useless files:
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy # erlang/*/*.bat
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy # manpages: start.1 werl.1
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy $(MKDIR) documentation && cd documentation && \
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1) && \
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_2)
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy # remove INSTALL_PREFIX from path
2b24ab6b3865caeede9eeb9db6b83e1d89dcd1eaSebastien Roy $(PROTO_DIR)/usr/lib/$(MACH64)/erlang/bin/erl \