components/erlang/Makefile
author Milan Jurik <Milan.Jurik@oracle.com>
Mon, 27 Jun 2011 02:58:43 -0700
changeset 346 d28be18217b8
child 351 4f0c1acc260d
permissions -rw-r--r--
7056876 move erlang to userland 7056938 bump erlang version to R12B-5 7058883 Problem with utility/erlang
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
346
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
     1
#
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
     3
#
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
     7
#
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    12
#
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    18
#
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    20
#
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    21
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    22
#
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    23
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    24
#
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    25
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    26
include ../../make-rules/shared-macros.mk
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    27
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    28
COMPONENT_NAME=		otp_src
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    29
COMPONENT_VERSION_MAJOR=	12
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    30
COMPONENT_VERSION_MINOR=	B
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    31
COMPONENT_VERSION_MICRO=	5
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    32
# IPS_COMPONENT_VERSION needs update whenever this is changed
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    33
COMPONENT_VERSION=	R$(COMPONENT_VERSION_MAJOR)$(COMPONENT_VERSION_MINOR)-$(COMPONENT_VERSION_MICRO)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    34
COMPONENT_SRC=		$(COMPONENT_NAME)_$(COMPONENT_VERSION)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    35
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    36
COMPONENT_ARCHIVE_HASH=	sha1:6c45509acf70d35d5def2cbefd86ada093c1ac3a
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    37
COMPONENT_ARCHIVE_URL=	http://www.erlang.org/download/$(COMPONENT_ARCHIVE)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    38
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    39
# manpages
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    40
COMPONENT_NAME_1=	otp_doc_man
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    41
COMPONENT_SRC_1=	$(COMPONENT_NAME_1)_$(COMPONENT_VERSION)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    42
COMPONENT_ARCHIVE_1=	$(COMPONENT_SRC_1).tar.gz
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    43
COMPONENT_ARCHIVE_HASH_1=	sha1:ae7036bd2afc9d1fca97f0de2eca84f56656def8
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    44
COMPONENT_ARCHIVE_URL_1=	http://www.erlang.org/download/$(COMPONENT_ARCHIVE_1)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    45
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    46
# HTML documentation
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    47
COMPONENT_NAME_2=	otp_doc_html
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    48
COMPONENT_SRC_2=	$(COMPONENT_NAME_2)_$(COMPONENT_VERSION)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    49
COMPONENT_ARCHIVE_2=	$(COMPONENT_SRC_2).tar.gz
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    50
COMPONENT_ARCHIVE_HASH_2=	sha1:0bd369d02051e01bac58c9b8665bd3538e116f51
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    51
COMPONENT_ARCHIVE_URL_2=	http://www.erlang.org/download/$(COMPONENT_ARCHIVE_2)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    52
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    53
include ../../make-rules/prep.mk
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    54
include ../../make-rules/configure.mk
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    55
include ../../make-rules/ips.mk
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    56
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    57
# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but it is not
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    58
# enough for us. We need to include the $(COMPONENT_SUBVERSION) somehow.
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    59
# Because the IPS_COMPONENT_VERSION cannot contain letters we use mapping:
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    60
# R(major)(minor)-(micro) - (major).(minor as number).(micro)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    61
IPS_COMPONENT_VERSION=  $(COMPONENT_VERSION_MAJOR).2.$(COMPONENT_VERSION_MICRO)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    62
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    63
# Built in SFW with gcc and builds cleanly now only with gcc
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    64
COMPILER = gcc
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    65
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    66
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    67
CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/gd2"
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    68
CONFIGURE_OPTIONS += INSTALL="/usr/ucb/install -c"
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    69
CONFIGURE_OPTIONS += --enable-smp-support
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    70
CONFIGURE_OPTIONS += --enable-threads
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    71
CONFIGURE_OPTIONS += --enable-hipe
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    72
CONFIGURE_OPTIONS += --with-ssl
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    73
CONFIGURE_OPTIONS += --enable-dynamic-ssl-lib
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    74
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    75
CONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    76
CONFIGURE_OPTIONS.64 += LIBS="-m64"
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    77
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    78
COMPONENT_PRE_CONFIGURE_ACTION = \
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    79
	($(CLONEY) $(SOURCE_DIR) $(@D))
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    80
CONFIGURE_SCRIPT =	$(@D)/configure
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    81
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    82
COMPONENT_INSTALL_ARGS += INSTALL_PREFIX=$(PROTO_DIR)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    83
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    84
# common targets
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    85
build:	$(BUILD_32_and_64)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    86
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    87
install:	$(INSTALL_32_and_64)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    88
	# Undelivered useless files:
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    89
	#    erlang/lib/crypto-*/priv/obj
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    90
	#    erlang/lib/ssl-*/priv/obj
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    91
	#    erlang/Install
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    92
	#    erlang/misc
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    93
	#    erlang/*/*.bat
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    94
	#    manpages: start.1 werl.1
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    95
	$(RM) -r documentation
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    96
	$(MKDIR) documentation && cd documentation && \
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    97
	$(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1) && \
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    98
	$(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_2)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    99
	# remove INSTALL_PREFIX from path
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   100
	$(PERL) -pi -e "s|$(PROTO_DIR)||g" $(PROTO_DIR)/usr/lib/erlang/bin/erl \
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   101
		$(PROTO_DIR)/usr/lib/$(MACH64)/erlang/bin/erl \
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   102
		$(PROTO_DIR)/usr/lib/erlang/releases/RELEASES \
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   103
		$(PROTO_DIR)/usr/lib/$(MACH64)/erlang/releases/RELEASES
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   104
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   105
clean::
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   106
	$(RM) -r documentation
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   107
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   108
test:	$(NO_TESTS)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   109
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   110
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   111
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   112
include ../../make-rules/depend.mk