Rich Burridge
2012-11-13 e2402825ebc21ad002f3baa031cb0e7efcfe970c
commit | author | age
07f84b 1 #
MJ 2 # CDDL HEADER START
3 #
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
7 #
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
12 #
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 #
19 # CDDL HEADER END
20 #
21
22 #
7d22b7 23 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
07f84b 24 #
MJ 25
26 include ../../make-rules/shared-macros.mk
27
7d22b7 28 PATH=$(SPRO_VROOT)/bin:$(JAVA_HOME)/bin:/usr/bin
NJ 29
e24028 30 COMPONENT_NAME=            erlang
07f84b 31 COMPONENT_VERSION_MAJOR=    12
MJ 32 COMPONENT_VERSION_MINOR=    B
33 COMPONENT_VERSION_MICRO=    5
34 # IPS_COMPONENT_VERSION needs update whenever this is changed
35 COMPONENT_VERSION=    R$(COMPONENT_VERSION_MAJOR)$(COMPONENT_VERSION_MINOR)-$(COMPONENT_VERSION_MICRO)
60e6e0 36 COMPONENT_PROJECT_URL=    http://www.erlang.org/
e24028 37 COMPONENT_SRC_NAME=    otp_src
RB 38 COMPONENT_SRC=        $(COMPONENT_SRC_NAME)_$(COMPONENT_VERSION)
07f84b 39 COMPONENT_ARCHIVE=    $(COMPONENT_SRC).tar.gz
35e110 40 COMPONENT_ARCHIVE_HASH=    \
MS 41     sha256:6ec3f344dd626bd83494fcad66db98a03f930a039b2a1499313d1a5a57aadda7
60e6e0 42 COMPONENT_ARCHIVE_URL=    $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE)
07f84b 43
MJ 44 # manpages
45 COMPONENT_NAME_1=    otp_doc_man
46 COMPONENT_SRC_1=    $(COMPONENT_NAME_1)_$(COMPONENT_VERSION)
47 COMPONENT_ARCHIVE_1=    $(COMPONENT_SRC_1).tar.gz
35e110 48 COMPONENT_ARCHIVE_HASH_1=    \
MS 49     sha256:f7acb458b72ffa8f9b1f45501bed85d3d9fb691c601f3f6997856c501e2f0659
60e6e0 50 COMPONENT_ARCHIVE_URL_1=    $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_1)
07f84b 51
MJ 52 # HTML documentation
53 COMPONENT_NAME_2=    otp_doc_html
54 COMPONENT_SRC_2=    $(COMPONENT_NAME_2)_$(COMPONENT_VERSION)
55 COMPONENT_ARCHIVE_2=    $(COMPONENT_SRC_2).tar.gz
35e110 56 COMPONENT_ARCHIVE_HASH_2=    \
MS 57     sha256:db131a347217ab434ca4c483abb61dc01989e0db43e1fe6982c3067f60cf91d7
60e6e0 58 COMPONENT_ARCHIVE_URL_2=    $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_2)
07f84b 59
MJ 60 include ../../make-rules/prep.mk
61 include ../../make-rules/configure.mk
62 include ../../make-rules/ips.mk
63
64 # IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but it is not
65 # enough for us. We need to include the $(COMPONENT_SUBVERSION) somehow.
66 # Because the IPS_COMPONENT_VERSION cannot contain letters we use mapping:
67 # R(major)(minor)-(micro) - (major).(minor as number).(micro)
68 IPS_COMPONENT_VERSION=  $(COMPONENT_VERSION_MAJOR).2.$(COMPONENT_VERSION_MICRO)
69
70 # Built in SFW with gcc and builds cleanly now only with gcc
71 COMPILER = gcc
72
73 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
74 CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/gd2"
75 CONFIGURE_OPTIONS += --enable-smp-support
76 CONFIGURE_OPTIONS += --enable-threads
77 CONFIGURE_OPTIONS += --enable-hipe
78 CONFIGURE_OPTIONS += --with-ssl
79 CONFIGURE_OPTIONS += --enable-dynamic-ssl-lib
80
81 CONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
82 CONFIGURE_OPTIONS.64 += LIBS="-m64"
83
2ec072 84 # Use cp(1) instead of cloney because erlang's 'install' target uses 'tar'
NJ 85 # to copy files and our tar doesn't handle long links by default.  Between
86 # the use of 'tar' and 'ld', a path adjustment wasn't an option due to the
87 # need for /usr/bin/ld and /usr/gnu/bin/tar.  Perhaps this can be looked
88 # at when we upgrade to a more current version.
07f84b 89 COMPONENT_PRE_CONFIGURE_ACTION = \
2ec072 90     ($(CP) -rp $(SOURCE_DIR)/. $(@D))
07f84b 91 CONFIGURE_SCRIPT =    $(@D)/configure
MJ 92
93 COMPONENT_INSTALL_ARGS += INSTALL_PREFIX=$(PROTO_DIR)
94
95 # common targets
96 build:    $(BUILD_32_and_64)
97
98 install:    $(INSTALL_32_and_64)
99     # Undelivered useless files:
100     #    erlang/lib/crypto-*/priv/obj
101     #    erlang/lib/ssl-*/priv/obj
102     #    erlang/Install
103     #    erlang/misc
104     #    erlang/*/*.bat
105     #    manpages: start.1 werl.1
106     $(RM) -r documentation
107     $(MKDIR) documentation && cd documentation && \
108     $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1) && \
109     $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_2)
110     # remove INSTALL_PREFIX from path
111     $(PERL) -pi -e "s|$(PROTO_DIR)||g" $(PROTO_DIR)/usr/lib/erlang/bin/erl \
112         $(PROTO_DIR)/usr/lib/$(MACH64)/erlang/bin/erl \
113         $(PROTO_DIR)/usr/lib/erlang/releases/RELEASES \
114         $(PROTO_DIR)/usr/lib/$(MACH64)/erlang/releases/RELEASES
115
116 clean::
117     $(RM) -r documentation
118
119 test:    $(NO_TESTS)
120
121 BUILD_PKG_DEPENDENCIES =    $(BUILD_TOOLS)
122
123 include ../../make-rules/depend.mk