components/erlang/Makefile
branchs11-update
changeset 3064 4363008a4219
parent 2855 576d5a7857b7
child 3266 e00ca9ce4b5f
equal deleted inserted replaced
3059:f2901bab71e6 3064:4363008a4219
    18 #
    18 #
    19 # CDDL HEADER END
    19 # CDDL HEADER END
    20 #
    20 #
    21 
    21 
    22 #
    22 #
    23 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
    23 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
    24 #
    24 #
    25 
    25 
    26 include ../../make-rules/shared-macros.mk
    26 include ../../make-rules/shared-macros.mk
    27 
    27 
    28 PATH=$(SPRO_VROOT)/bin:$(JAVA_HOME)/bin:/usr/bin
    28 PATH=$(SPRO_VROOT)/bin:$(JAVA_HOME)/bin:/usr/bin
    29 
    29 
    30 COMPONENT_NAME=			erlang
    30 COMPONENT_NAME=			erlang
    31 COMPONENT_VERSION_MAJOR=	12
    31 COMPONENT_VERSION_MAJOR=	15
    32 COMPONENT_VERSION_MINOR=	B
    32 COMPONENT_VERSION_MINOR=	B
    33 COMPONENT_VERSION_MICRO=	5
    33 COMPONENT_VERSION_MICRO=	03
    34 # IPS_COMPONENT_VERSION needs update whenever this is changed
    34 # IPS_COMPONENT_VERSION needs update whenever this is changed
    35 COMPONENT_VERSION=	R$(COMPONENT_VERSION_MAJOR)$(COMPONENT_VERSION_MINOR)-$(COMPONENT_VERSION_MICRO)
    35 COMPONENT_VERSION=	R$(COMPONENT_VERSION_MAJOR)$(COMPONENT_VERSION_MINOR)$(COMPONENT_VERSION_MICRO)
    36 COMPONENT_PROJECT_URL=	http://www.erlang.org/
    36 COMPONENT_PROJECT_URL=	http://www.erlang.org/
    37 COMPONENT_SRC_NAME=	otp_src
    37 COMPONENT_SRC_NAME=	otp_src
    38 COMPONENT_SRC=		$(COMPONENT_SRC_NAME)_$(COMPONENT_VERSION)
    38 COMPONENT_SRC=		$(COMPONENT_SRC_NAME)_$(COMPONENT_VERSION)
    39 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
    39 COMPONENT_ARCHIVE=	$(COMPONENT_SRC)-1.tar.gz
    40 COMPONENT_ARCHIVE_HASH=	\
    40 COMPONENT_ARCHIVE_HASH=	\
    41     sha256:6ec3f344dd626bd83494fcad66db98a03f930a039b2a1499313d1a5a57aadda7
    41     sha256:4bccac86dd76aec050252e44276a0283a0df9218e6470cf042a9b9f9dfc9476c
    42 COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE)
    42 COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE)
    43 COMPONENT_BUGDB=	utility/erlang
    43 COMPONENT_BUGDB=	utility/erlang
    44 
    44 
    45 # manpages
    45 # manpages
    46 COMPONENT_NAME_1=	otp_doc_man
    46 COMPONENT_NAME_1=	otp_doc_man
    47 COMPONENT_SRC_1=	$(COMPONENT_NAME_1)_$(COMPONENT_VERSION)
    47 COMPONENT_SRC_1=	$(COMPONENT_NAME_1)_$(COMPONENT_VERSION)
    48 COMPONENT_ARCHIVE_1=	$(COMPONENT_SRC_1).tar.gz
    48 COMPONENT_ARCHIVE_1=	$(COMPONENT_SRC_1)-1.tar.gz
    49 COMPONENT_ARCHIVE_HASH_1=	\
    49 COMPONENT_ARCHIVE_HASH_1=	\
    50     sha256:f7acb458b72ffa8f9b1f45501bed85d3d9fb691c601f3f6997856c501e2f0659
    50     sha256:07980d8014c7cf8194b7078c137353f5083992add4663ced3dcba2ff91f228d8
    51 COMPONENT_ARCHIVE_URL_1=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_1)
    51 COMPONENT_ARCHIVE_URL_1=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_1)
    52 
    52 
    53 # HTML documentation
    53 # HTML documentation
    54 COMPONENT_NAME_2=	otp_doc_html
    54 COMPONENT_NAME_2=	otp_doc_html
    55 COMPONENT_SRC_2=	$(COMPONENT_NAME_2)_$(COMPONENT_VERSION)
    55 COMPONENT_SRC_2=	$(COMPONENT_NAME_2)_$(COMPONENT_VERSION)
    56 COMPONENT_ARCHIVE_2=	$(COMPONENT_SRC_2).tar.gz
    56 COMPONENT_ARCHIVE_2=	$(COMPONENT_SRC_2)-1.tar.gz
    57 COMPONENT_ARCHIVE_HASH_2=	\
    57 COMPONENT_ARCHIVE_HASH_2=	\
    58     sha256:db131a347217ab434ca4c483abb61dc01989e0db43e1fe6982c3067f60cf91d7
    58     sha256:d06f580f11d1303217a5c1cf8d68a98d7e01c535be934dcd430ecdc254f7572e
    59 COMPONENT_ARCHIVE_URL_2=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_2)
    59 COMPONENT_ARCHIVE_URL_2=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_2)
    60 
    60 
    61 include ../../make-rules/prep.mk
    61 include ../../make-rules/prep.mk
    62 include ../../make-rules/configure.mk
    62 include ../../make-rules/configure.mk
    63 include ../../make-rules/ips.mk
    63 include ../../make-rules/ips.mk
    64 
    64 
    65 # IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but it is not
    65 # IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but it is not
    66 # enough for us. We need to include the $(COMPONENT_SUBVERSION) somehow.
    66 # enough for us. We need to include the $(COMPONENT_SUBVERSION) somehow.
    67 # Because the IPS_COMPONENT_VERSION cannot contain letters we use mapping:
    67 # Because the IPS_COMPONENT_VERSION cannot contain letters or leading zeroes
    68 # R(major)(minor)-(micro) - (major).(minor as number).(micro)
    68 # we use mapping:
    69 IPS_COMPONENT_VERSION=  $(COMPONENT_VERSION_MAJOR).2.$(COMPONENT_VERSION_MICRO)
    69 # R(major)(minor)(micro) - (major).(minor as number).(micro)
       
    70 IPS_COMPONENT_VERSION=  $(COMPONENT_VERSION_MAJOR).2.3
    70 
    71 
    71 # Built in SFW with gcc and builds cleanly now only with gcc
    72 # Built in SFW with gcc and builds cleanly now only with gcc
    72 COMPILER = gcc3
    73 COMPILER =	gcc
    73 
    74 
    74 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
    75 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
    75 CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/gd2"
    76 CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/gd2"
    76 CONFIGURE_OPTIONS += --enable-smp-support
    77 CONFIGURE_OPTIONS += --enable-smp-support
    77 CONFIGURE_OPTIONS += --enable-threads
    78 CONFIGURE_OPTIONS += --enable-threads
       
    79 # The HiPE portion is a bit sensitive, and only seems to work 64-bit on 
       
    80 # amd64 (thus the variant.arch tagging in erlang.p5m). erts/config.log
       
    81 # can be very interesting if issues occur. 
    78 CONFIGURE_OPTIONS += --enable-hipe
    82 CONFIGURE_OPTIONS += --enable-hipe
    79 CONFIGURE_OPTIONS += --with-ssl
    83 CONFIGURE_OPTIONS += --with-ssl
    80 CONFIGURE_OPTIONS += --enable-dynamic-ssl-lib
    84 CONFIGURE_OPTIONS += --enable-dynamic-ssl-lib
    81 
    85 
       
    86 CONFIGURE_BINDIR.64 =   $(CONFIGURE_PREFIX)/bin
       
    87 
    82 CONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
    88 CONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
    83 CONFIGURE_OPTIONS.64 += LIBS="-m64"
    89 CONFIGURE_OPTIONS.64 += LIBS="-m64"
       
    90 
       
    91 # Needed for 'set name=info.source-url' action in erlang-doc.p5m
       
    92 PKG_MACROS += COMPONENT_ARCHIVE_URL_2=$(COMPONENT_ARCHIVE_URL_2) 
    84 
    93 
    85 # Use cp(1) instead of cloney because erlang's 'install' target uses 'tar'
    94 # Use cp(1) instead of cloney because erlang's 'install' target uses 'tar'
    86 # to copy files and our tar doesn't handle long links by default.  Between
    95 # to copy files and our tar doesn't handle long links by default.  Between
    87 # the use of 'tar' and 'ld', a path adjustment wasn't an option due to the
    96 # the use of 'tar' and 'ld', a path adjustment wasn't an option due to the
    88 # need for /usr/bin/ld and /usr/gnu/bin/tar.  Perhaps this can be looked
    97 # need for /usr/bin/ld and /usr/gnu/bin/tar.  Perhaps this can be looked
    91 	($(CP) -rp $(SOURCE_DIR)/. $(@D))
   100 	($(CP) -rp $(SOURCE_DIR)/. $(@D))
    92 CONFIGURE_SCRIPT =	$(@D)/configure
   101 CONFIGURE_SCRIPT =	$(@D)/configure
    93 
   102 
    94 COMPONENT_INSTALL_ARGS += INSTALL_PREFIX=$(PROTO_DIR)
   103 COMPONENT_INSTALL_ARGS += INSTALL_PREFIX=$(PROTO_DIR)
    95 
   104 
       
   105 COMPONENT_TEST_ENV +=		ERL_TOP=$(BUILD_DIR_64)
       
   106 COMPONENT_TEST_TARGETS =	tests
       
   107 
       
   108 ASLR_MODE = $(ASLR_ENABLE)
       
   109 
    96 # common targets
   110 # common targets
    97 build:	$(BUILD_32_and_64)
   111 build:	$(BUILD_64)
    98 
   112 
    99 install:	$(INSTALL_32_and_64)
   113 install:	$(INSTALL_64)
   100 	# Undelivered useless files:
   114 	# Undelivered useless files:
   101 	#    erlang/lib/crypto-*/priv/obj
   115 	#    erlang/lib/crypto-*/priv/obj
   102 	#    erlang/lib/ssl-*/priv/obj
   116 	#    erlang/lib/ssl-*/priv/obj
   103 	#    erlang/Install
   117 	#    erlang/Install
   104 	#    erlang/misc
   118 	#    erlang/misc
   107 	$(RM) -r documentation
   121 	$(RM) -r documentation
   108 	$(MKDIR) documentation && cd documentation && \
   122 	$(MKDIR) documentation && cd documentation && \
   109 	$(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1) && \
   123 	$(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1) && \
   110 	$(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_2)
   124 	$(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_2)
   111 	# remove INSTALL_PREFIX from path
   125 	# remove INSTALL_PREFIX from path
   112 	$(PERL) -pi -e "s|$(PROTO_DIR)||g" $(PROTO_DIR)/usr/lib/erlang/bin/erl \
   126 	$(PERL) -pi -e "s|$(PROTO_DIR)||g" \
   113 		$(PROTO_DIR)/usr/lib/$(MACH64)/erlang/bin/erl \
   127 		$(PROTO_DIR)/usr/lib/$(MACH64)/erlang/bin/erl \
   114 		$(PROTO_DIR)/usr/lib/erlang/releases/RELEASES \
       
   115 		$(PROTO_DIR)/usr/lib/$(MACH64)/erlang/releases/RELEASES
   128 		$(PROTO_DIR)/usr/lib/$(MACH64)/erlang/releases/RELEASES
   116 
   129 
   117 clean::
   130 clean::
   118 	$(RM) -r documentation
   131 	$(RM) -r documentation
   119 
   132 
   120 test:	$(NO_TESTS)
   133 test:	$(TEST_64)
   121 
   134 
   122 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
   135 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
   123 
   136 
   124 include ../../make-rules/depend.mk
   137 include ../../make-rules/depend.mk