components/erlang/Makefile
branchs11-update
changeset 4258 e6c70ecb57e7
parent 3996 20c0f21bbe1e
equal deleted inserted replaced
4257:f2f4561efbb1 4258:e6c70ecb57e7
    21 
    21 
    22 #
    22 #
    23 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
    23 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
    24 #
    24 #
    25 
    25 
       
    26 # Built in SFW with gcc and builds cleanly now only with gcc
    26 COMPILER =	gcc
    27 COMPILER =	gcc
    27 
    28 
    28 include ../../make-rules/shared-macros.mk
    29 include ../../make-rules/shared-macros.mk
    29 
    30 
    30 PATH=$(SPRO_VROOT)/bin:$(JAVA_HOME)/bin:/usr/bin
    31 PATH=$(JAVA_HOME)/bin:/usr/bin
    31 
    32 
    32 COMPONENT_NAME=			erlang
    33 COMPONENT_NAME=			erlang
    33 COMPONENT_VERSION_MAJOR=	15
    34 COMPONENT_VERSION=		17.5
    34 COMPONENT_VERSION_MINOR=	B
       
    35 COMPONENT_VERSION_MICRO=	03
       
    36 # IPS_COMPONENT_VERSION needs update whenever this is changed
       
    37 COMPONENT_VERSION=	R$(COMPONENT_VERSION_MAJOR)$(COMPONENT_VERSION_MINOR)$(COMPONENT_VERSION_MICRO)
       
    38 COMPONENT_PROJECT_URL=	http://www.erlang.org/
    35 COMPONENT_PROJECT_URL=	http://www.erlang.org/
    39 COMPONENT_SRC_NAME=	otp_src
    36 COMPONENT_SRC_NAME=	otp_src
    40 COMPONENT_SRC=		$(COMPONENT_SRC_NAME)_$(COMPONENT_VERSION)
    37 COMPONENT_SRC=		$(COMPONENT_SRC_NAME)_$(COMPONENT_VERSION)
    41 COMPONENT_ARCHIVE=	$(COMPONENT_SRC)-1.tar.gz
    38 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
    42 COMPONENT_ARCHIVE_HASH=	\
    39 COMPONENT_ARCHIVE_HASH=	\
    43     sha256:4bccac86dd76aec050252e44276a0283a0df9218e6470cf042a9b9f9dfc9476c
    40     sha256:3c28820c981b30c50df8ac2a4a238e5813454fa3ed2ad530bc7948a282846474
    44 COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE)
    41 COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE)
    45 COMPONENT_BUGDB=	utility/erlang
    42 COMPONENT_BUGDB=	utility/erlang
    46 
    43 
    47 # manpages
    44 # manpages
    48 COMPONENT_NAME_1=	otp_doc_man
    45 COMPONENT_NAME_1=	otp_doc_man
    49 COMPONENT_SRC_1=	$(COMPONENT_NAME_1)_$(COMPONENT_VERSION)
    46 COMPONENT_SRC_1=	$(COMPONENT_NAME_1)_$(COMPONENT_VERSION)
    50 COMPONENT_ARCHIVE_1=	$(COMPONENT_SRC_1)-1.tar.gz
    47 COMPONENT_ARCHIVE_1=	$(COMPONENT_SRC_1).tar.gz
    51 COMPONENT_ARCHIVE_HASH_1=	\
    48 COMPONENT_ARCHIVE_HASH_1=	\
    52     sha256:07980d8014c7cf8194b7078c137353f5083992add4663ced3dcba2ff91f228d8
    49     sha256:85b1b2a1011fc01af550f1fe9e5a599a4c5f2a35d264d2804af1d05590a857c3
    53 COMPONENT_ARCHIVE_URL_1=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_1)
    50 COMPONENT_ARCHIVE_URL_1=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_1)
    54 
    51 
    55 # HTML documentation
    52 # HTML documentation
    56 COMPONENT_NAME_2=	otp_doc_html
    53 COMPONENT_NAME_2=	otp_doc_html
    57 COMPONENT_SRC_2=	$(COMPONENT_NAME_2)_$(COMPONENT_VERSION)
    54 COMPONENT_SRC_2=	$(COMPONENT_NAME_2)_$(COMPONENT_VERSION)
    58 COMPONENT_ARCHIVE_2=	$(COMPONENT_SRC_2)-1.tar.gz
    55 COMPONENT_ARCHIVE_2=	$(COMPONENT_SRC_2).tar.gz
    59 COMPONENT_ARCHIVE_HASH_2=	\
    56 COMPONENT_ARCHIVE_HASH_2=	\
    60     sha256:d06f580f11d1303217a5c1cf8d68a98d7e01c535be934dcd430ecdc254f7572e
    57     sha256:baba1d373c1faacf4a1a6ec1220d57d0cb2b977edb74f32cd58dc786361c6cf5
    61 COMPONENT_ARCHIVE_URL_2=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_2)
    58 COMPONENT_ARCHIVE_URL_2=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_2)
    62 
    59 
    63 TPNO=			18548
    60 TPNO=			18548
    64 
    61 
    65 include $(WS_MAKE_RULES)/prep.mk
    62 include $(WS_MAKE_RULES)/prep.mk
    66 include $(WS_MAKE_RULES)/configure.mk
    63 include $(WS_MAKE_RULES)/configure.mk
    67 include $(WS_MAKE_RULES)/ips.mk
    64 include $(WS_MAKE_RULES)/ips.mk
    68 
    65 
    69 # IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but it is not
       
    70 # enough for us. We need to include the $(COMPONENT_SUBVERSION) somehow.
       
    71 # Because the IPS_COMPONENT_VERSION cannot contain letters or leading zeroes
       
    72 # we use mapping:
       
    73 # R(major)(minor)(micro) - (major).(minor as number).(micro)
       
    74 IPS_COMPONENT_VERSION=  $(COMPONENT_VERSION_MAJOR).2.3
       
    75 
       
    76 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
    66 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
    77 CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/gd2"
    67 CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/gd2"
    78 CONFIGURE_OPTIONS += --enable-smp-support
    68 CONFIGURE_OPTIONS += --enable-smp-support
    79 CONFIGURE_OPTIONS += --enable-threads
    69 CONFIGURE_OPTIONS += --enable-threads
    80 # The HiPE portion is a bit sensitive, and only seems to work 64-bit on 
    70 # The HiPE portion is a bit sensitive, and only seems to work 64-bit on
    81 # amd64 (thus the variant.arch tagging in erlang.p5m). erts/config.log
    71 # amd64 (thus the variant.arch tagging in erlang.p5m). erts/config.log
    82 # can be very interesting if issues occur. 
    72 # can be very interesting if issues occur.
    83 CONFIGURE_OPTIONS += --enable-hipe
    73 CONFIGURE_OPTIONS += --enable-hipe
    84 CONFIGURE_OPTIONS += --with-ssl
    74 CONFIGURE_OPTIONS += --with-ssl
    85 CONFIGURE_OPTIONS += --enable-dynamic-ssl-lib
    75 CONFIGURE_OPTIONS += --enable-dynamic-ssl-lib
    86 
    76 
    87 CONFIGURE_BINDIR.64 =   $(CONFIGURE_PREFIX)/bin
    77 CONFIGURE_BINDIR.64 =   $(CONFIGURE_PREFIX)/bin
    88 
    78 
    89 CONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
    79 CONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
    90 CONFIGURE_OPTIONS.64 += LIBS="-m64"
    80 CONFIGURE_OPTIONS.64 += LIBS="-m64"
    91 
    81 
    92 # Needed for 'set name=info.source-url' action in erlang-doc.p5m
    82 # Needed for 'set name=info.source-url' action in erlang-doc.p5m
    93 PKG_MACROS += COMPONENT_ARCHIVE_URL_2=$(COMPONENT_ARCHIVE_URL_2) 
    83 PKG_MACROS += COMPONENT_ARCHIVE_URL_2=$(COMPONENT_ARCHIVE_URL_2)
    94 
    84 
    95 # Use cp(1) instead of cloney because erlang's 'install' target uses 'tar'
    85 # Use cp(1) instead of cloney because erlang's 'install' target uses 'tar'
    96 # to copy files and our tar doesn't handle long links by default.  Between
    86 # to copy files and our tar doesn't handle long links by default.  Between
    97 # the use of 'tar' and 'ld', a path adjustment wasn't an option due to the
    87 # the use of 'tar' and 'ld', a path adjustment wasn't an option due to the
    98 # need for /usr/bin/ld and /usr/gnu/bin/tar.  Perhaps this can be looked
    88 # need for /usr/bin/ld and /usr/gnu/bin/tar.  This is still the case with
    99 # at when we upgrade to a more current version.
    89 # erlang version 17.5.
   100 COMPONENT_PRE_CONFIGURE_ACTION = \
    90 COMPONENT_PRE_CONFIGURE_ACTION = \
   101 	($(CP) -rp $(SOURCE_DIR)/. $(@D))
    91 	($(CP) -rp $(SOURCE_DIR)/. $(@D))
   102 CONFIGURE_SCRIPT =	$(@D)/configure
    92 CONFIGURE_SCRIPT =		$(@D)/configure
       
    93 
       
    94 # Always show the build and link lines for easier debugging.
       
    95 COMPONENT_BUILD_ARGS +=		V=1
   103 
    96 
   104 COMPONENT_INSTALL_ARGS += INSTALL_PREFIX=$(PROTO_DIR)
    97 COMPONENT_INSTALL_ARGS += INSTALL_PREFIX=$(PROTO_DIR)
   105 
    98 
   106 COMPONENT_TEST_ENV +=		ERL_TOP=$(BUILD_DIR_64)
    99 COMPONENT_TEST_ENV +=		ERL_TOP=$(BUILD_DIR_64)
   107 COMPONENT_TEST_TARGETS =	tests
   100 COMPONENT_TEST_TARGETS =	tests
   108 
   101 
       
   102 # Remove the two lines which contains the tester's username.
       
   103 COMPONENT_TEST_TRANSFORMS += \
       
   104 	'-e "s|/ldisk/tests|XXX_UID_XXX|g" ' \
       
   105 	'-e "/XXX_UID_XXX/d" '
       
   106 
   109 ASLR_MODE = $(ASLR_ENABLE)
   107 ASLR_MODE = $(ASLR_ENABLE)
   110 
   108 
   111 # common targets
   109 configure:	$(CONFIGURE_64)
       
   110 
   112 build:	$(BUILD_64)
   111 build:	$(BUILD_64)
   113 
   112 
   114 install:	$(INSTALL_64)
   113 install:	$(INSTALL_64)
   115 	# Undelivered useless files:
   114 	# Undelivered useless files:
   116 	#    erlang/lib/crypto-*/priv/obj
   115 	#    erlang/lib/crypto-*/priv/obj
   131 clean::
   130 clean::
   132 	$(RM) -r documentation
   131 	$(RM) -r documentation
   133 
   132 
   134 test:	$(TEST_64)
   133 test:	$(TEST_64)
   135 
   134 
   136 
       
   137 REQUIRED_PACKAGES += library/ncurses
   135 REQUIRED_PACKAGES += library/ncurses
   138 REQUIRED_PACKAGES += library/security/openssl
   136 REQUIRED_PACKAGES += library/security/openssl
       
   137 REQUIRED_PACKAGES += library/security/openssl/openssl-fips-140
       
   138 REQUIRED_PACKAGES += library/zlib
   139 REQUIRED_PACKAGES += shell/ksh93
   139 REQUIRED_PACKAGES += shell/ksh93
   140 REQUIRED_PACKAGES += system/core-os
   140 REQUIRED_PACKAGES += system/core-os
   141 REQUIRED_PACKAGES += system/library
   141 REQUIRED_PACKAGES += system/library
   142 REQUIRED_PACKAGES += system/library/math
   142 REQUIRED_PACKAGES += system/library/math
   143 REQUIRED_PACKAGES += system/linker
   143 REQUIRED_PACKAGES += system/linker