components/erlang/Makefile
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Fri, 27 Apr 2012 13:23:29 -0700
changeset 800 2ad056ed89ec
parent 751 32bfb3fa9b60
child 1048 e82fa02a4d16
child 2434 6c9bb5cf5610
child 3082 087fefd1546e
permissions -rw-r--r--
7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile 7164671 BUILD_TOOLS should point to on11update-tools now
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
#
751
32bfb3fa9b60 7155746 Userland python bits should use mediated links
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 667
diff changeset
    23
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
346
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
751
32bfb3fa9b60 7155746 Userland python bits should use mediated links
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 667
diff changeset
    28
PATH=$(SPRO_VROOT)/bin:$(JAVA_HOME)/bin:/usr/bin
32bfb3fa9b60 7155746 Userland python bits should use mediated links
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 667
diff changeset
    29
346
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    30
COMPONENT_NAME=		otp_src
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    31
COMPONENT_VERSION_MAJOR=	12
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    32
COMPONENT_VERSION_MINOR=	B
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    33
COMPONENT_VERSION_MICRO=	5
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    34
# IPS_COMPONENT_VERSION needs update whenever this is changed
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    35
COMPONENT_VERSION=	R$(COMPONENT_VERSION_MAJOR)$(COMPONENT_VERSION_MINOR)-$(COMPONENT_VERSION_MICRO)
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 351
diff changeset
    36
COMPONENT_PROJECT_URL=	http://www.erlang.org/
346
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    37
COMPONENT_SRC=		$(COMPONENT_NAME)_$(COMPONENT_VERSION)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    38
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 751
diff changeset
    39
COMPONENT_ARCHIVE_HASH=	\
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 751
diff changeset
    40
    sha256:6ec3f344dd626bd83494fcad66db98a03f930a039b2a1499313d1a5a57aadda7
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 351
diff changeset
    41
COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE)
346
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    42
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    43
# manpages
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    44
COMPONENT_NAME_1=	otp_doc_man
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    45
COMPONENT_SRC_1=	$(COMPONENT_NAME_1)_$(COMPONENT_VERSION)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    46
COMPONENT_ARCHIVE_1=	$(COMPONENT_SRC_1).tar.gz
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 751
diff changeset
    47
COMPONENT_ARCHIVE_HASH_1=	\
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 751
diff changeset
    48
    sha256:f7acb458b72ffa8f9b1f45501bed85d3d9fb691c601f3f6997856c501e2f0659
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 351
diff changeset
    49
COMPONENT_ARCHIVE_URL_1=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_1)
346
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    50
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    51
# HTML documentation
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    52
COMPONENT_NAME_2=	otp_doc_html
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    53
COMPONENT_SRC_2=	$(COMPONENT_NAME_2)_$(COMPONENT_VERSION)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    54
COMPONENT_ARCHIVE_2=	$(COMPONENT_SRC_2).tar.gz
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 751
diff changeset
    55
COMPONENT_ARCHIVE_HASH_2=	\
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 751
diff changeset
    56
    sha256:db131a347217ab434ca4c483abb61dc01989e0db43e1fe6982c3067f60cf91d7
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 351
diff changeset
    57
COMPONENT_ARCHIVE_URL_2=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_2)
346
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    58
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    59
include ../../make-rules/prep.mk
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    60
include ../../make-rules/configure.mk
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    61
include ../../make-rules/ips.mk
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
# 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
    64
# 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
    65
# 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
    66
# R(major)(minor)-(micro) - (major).(minor as number).(micro)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    67
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
    68
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    69
# 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
    70
COMPILER = gcc
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    71
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    72
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    73
CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/gd2"
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    74
CONFIGURE_OPTIONS += --enable-smp-support
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    75
CONFIGURE_OPTIONS += --enable-threads
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    76
CONFIGURE_OPTIONS += --enable-hipe
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    77
CONFIGURE_OPTIONS += --with-ssl
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    78
CONFIGURE_OPTIONS += --enable-dynamic-ssl-lib
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    79
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    80
CONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    81
CONFIGURE_OPTIONS.64 += LIBS="-m64"
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    82
351
4f0c1acc260d 7056876 move erlang to userland (fix install)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 346
diff changeset
    83
# Use cp(1) instead of cloney because erlang's 'install' target uses 'tar'
4f0c1acc260d 7056876 move erlang to userland (fix install)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 346
diff changeset
    84
# to copy files and our tar doesn't handle long links by default.  Between
4f0c1acc260d 7056876 move erlang to userland (fix install)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 346
diff changeset
    85
# the use of 'tar' and 'ld', a path adjustment wasn't an option due to the
4f0c1acc260d 7056876 move erlang to userland (fix install)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 346
diff changeset
    86
# need for /usr/bin/ld and /usr/gnu/bin/tar.  Perhaps this can be looked
4f0c1acc260d 7056876 move erlang to userland (fix install)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 346
diff changeset
    87
# at when we upgrade to a more current version.
346
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    88
COMPONENT_PRE_CONFIGURE_ACTION = \
351
4f0c1acc260d 7056876 move erlang to userland (fix install)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 346
diff changeset
    89
	($(CP) -rp $(SOURCE_DIR)/. $(@D))
346
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    90
CONFIGURE_SCRIPT =	$(@D)/configure
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    91
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    92
COMPONENT_INSTALL_ARGS += INSTALL_PREFIX=$(PROTO_DIR)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    93
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    94
# common targets
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    95
build:	$(BUILD_32_and_64)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    96
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    97
install:	$(INSTALL_32_and_64)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    98
	# Undelivered useless files:
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
    99
	#    erlang/lib/crypto-*/priv/obj
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   100
	#    erlang/lib/ssl-*/priv/obj
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   101
	#    erlang/Install
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   102
	#    erlang/misc
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   103
	#    erlang/*/*.bat
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   104
	#    manpages: start.1 werl.1
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   105
	$(RM) -r documentation
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   106
	$(MKDIR) documentation && cd documentation && \
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   107
	$(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1) && \
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   108
	$(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_2)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   109
	# remove INSTALL_PREFIX from path
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   110
	$(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
   111
		$(PROTO_DIR)/usr/lib/$(MACH64)/erlang/bin/erl \
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   112
		$(PROTO_DIR)/usr/lib/erlang/releases/RELEASES \
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   113
		$(PROTO_DIR)/usr/lib/$(MACH64)/erlang/releases/RELEASES
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   114
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   115
clean::
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   116
	$(RM) -r documentation
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   117
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   118
test:	$(NO_TESTS)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   119
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   120
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   121
d28be18217b8 7056876 move erlang to userland
Milan Jurik <Milan.Jurik@oracle.com>
parents:
diff changeset
   122
include ../../make-rules/depend.mk