components/erlang/Makefile
changeset 4164 78ce887dcfd6
parent 3958 fc5cedb0932b
child 4196 d697072a92f5
equal deleted inserted replaced
4159:516d88bbf1a4 4164:78ce887dcfd6
    26 # Built in SFW with gcc and builds cleanly now only with gcc
    26 # Built in SFW with gcc and builds cleanly now only with gcc
    27 COMPILER =	gcc
    27 COMPILER =	gcc
    28 
    28 
    29 include ../../make-rules/shared-macros.mk
    29 include ../../make-rules/shared-macros.mk
    30 
    30 
    31 PATH=$(SPRO_VROOT)/bin:$(JAVA_HOME)/bin:/usr/bin
    31 PATH=$(JAVA_HOME)/bin:/usr/bin
    32 
    32 
    33 COMPONENT_NAME=			erlang
    33 COMPONENT_NAME=			erlang
    34 COMPONENT_VERSION_MAJOR=	15
    34 COMPONENT_VERSION=		17.5
    35 COMPONENT_VERSION_MINOR=	B
       
    36 COMPONENT_VERSION_MICRO=	03
       
    37 # IPS_COMPONENT_VERSION needs update whenever this is changed
       
    38 COMPONENT_VERSION=	R$(COMPONENT_VERSION_MAJOR)$(COMPONENT_VERSION_MINOR)$(COMPONENT_VERSION_MICRO)
       
    39 COMPONENT_PROJECT_URL=	http://www.erlang.org/
    35 COMPONENT_PROJECT_URL=	http://www.erlang.org/
    40 COMPONENT_SRC_NAME=	otp_src
    36 COMPONENT_SRC_NAME=	otp_src
    41 COMPONENT_SRC=		$(COMPONENT_SRC_NAME)_$(COMPONENT_VERSION)
    37 COMPONENT_SRC=		$(COMPONENT_SRC_NAME)_$(COMPONENT_VERSION)
    42 COMPONENT_ARCHIVE=	$(COMPONENT_SRC)-1.tar.gz
    38 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
    43 COMPONENT_ARCHIVE_HASH=	\
    39 COMPONENT_ARCHIVE_HASH=	\
    44     sha256:4bccac86dd76aec050252e44276a0283a0df9218e6470cf042a9b9f9dfc9476c
    40     sha256:3c28820c981b30c50df8ac2a4a238e5813454fa3ed2ad530bc7948a282846474
    45 COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE)
    41 COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE)
    46 COMPONENT_BUGDB=	utility/erlang
    42 COMPONENT_BUGDB=	utility/erlang
    47 
    43 
    48 # manpages
    44 # manpages
    49 COMPONENT_NAME_1=	otp_doc_man
    45 COMPONENT_NAME_1=	otp_doc_man
    50 COMPONENT_SRC_1=	$(COMPONENT_NAME_1)_$(COMPONENT_VERSION)
    46 COMPONENT_SRC_1=	$(COMPONENT_NAME_1)_$(COMPONENT_VERSION)
    51 COMPONENT_ARCHIVE_1=	$(COMPONENT_SRC_1)-1.tar.gz
    47 COMPONENT_ARCHIVE_1=	$(COMPONENT_SRC_1).tar.gz
    52 COMPONENT_ARCHIVE_HASH_1=	\
    48 COMPONENT_ARCHIVE_HASH_1=	\
    53     sha256:07980d8014c7cf8194b7078c137353f5083992add4663ced3dcba2ff91f228d8
    49     sha256:85b1b2a1011fc01af550f1fe9e5a599a4c5f2a35d264d2804af1d05590a857c3
    54 COMPONENT_ARCHIVE_URL_1=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_1)
    50 COMPONENT_ARCHIVE_URL_1=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_1)
    55 
    51 
    56 # HTML documentation
    52 # HTML documentation
    57 COMPONENT_NAME_2=	otp_doc_html
    53 COMPONENT_NAME_2=	otp_doc_html
    58 COMPONENT_SRC_2=	$(COMPONENT_NAME_2)_$(COMPONENT_VERSION)
    54 COMPONENT_SRC_2=	$(COMPONENT_NAME_2)_$(COMPONENT_VERSION)
    59 COMPONENT_ARCHIVE_2=	$(COMPONENT_SRC_2)-1.tar.gz
    55 COMPONENT_ARCHIVE_2=	$(COMPONENT_SRC_2).tar.gz
    60 COMPONENT_ARCHIVE_HASH_2=	\
    56 COMPONENT_ARCHIVE_HASH_2=	\
    61     sha256:d06f580f11d1303217a5c1cf8d68a98d7e01c535be934dcd430ecdc254f7572e
    57     sha256:baba1d373c1faacf4a1a6ec1220d57d0cb2b977edb74f32cd58dc786361c6cf5
    62 COMPONENT_ARCHIVE_URL_2=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_2)
    58 COMPONENT_ARCHIVE_URL_2=	$(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_2)
    63 
    59 
    64 TPNO=			18548
    60 TPNO=			18548
    65 
    61 
    66 include $(WS_MAKE_RULES)/prep.mk
    62 include $(WS_MAKE_RULES)/prep.mk
    67 include $(WS_MAKE_RULES)/configure.mk
    63 include $(WS_MAKE_RULES)/configure.mk
    68 include $(WS_MAKE_RULES)/ips.mk
    64 include $(WS_MAKE_RULES)/ips.mk
    69 
    65 
    70 # IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but it is not
       
    71 # enough for us. We need to include the $(COMPONENT_SUBVERSION) somehow.
       
    72 # Because the IPS_COMPONENT_VERSION cannot contain letters or leading zeroes
       
    73 # we use mapping:
       
    74 # R(major)(minor)(micro) - (major).(minor as number).(micro)
       
    75 IPS_COMPONENT_VERSION=  $(COMPONENT_VERSION_MAJOR).2.3
       
    76 
       
    77 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
    66 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
    78 CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/gd2"
    67 CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/gd2"
    79 CONFIGURE_OPTIONS += --enable-smp-support
    68 CONFIGURE_OPTIONS += --enable-smp-support
    80 CONFIGURE_OPTIONS += --enable-threads
    69 CONFIGURE_OPTIONS += --enable-threads
    81 # 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
    82 # 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
    83 # can be very interesting if issues occur. 
    72 # can be very interesting if issues occur.
    84 CONFIGURE_OPTIONS += --enable-hipe
    73 CONFIGURE_OPTIONS += --enable-hipe
    85 CONFIGURE_OPTIONS += --with-ssl
    74 CONFIGURE_OPTIONS += --with-ssl
    86 CONFIGURE_OPTIONS += --enable-dynamic-ssl-lib
    75 CONFIGURE_OPTIONS += --enable-dynamic-ssl-lib
    87 
    76 
    88 CONFIGURE_BINDIR.64 =   $(CONFIGURE_PREFIX)/bin
    77 CONFIGURE_BINDIR.64 =   $(CONFIGURE_PREFIX)/bin
    89 
    78 
    90 CONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
    79 CONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
    91 CONFIGURE_OPTIONS.64 += LIBS="-m64"
    80 CONFIGURE_OPTIONS.64 += LIBS="-m64"
    92 
    81 
    93 # 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
    94 PKG_MACROS += COMPONENT_ARCHIVE_URL_2=$(COMPONENT_ARCHIVE_URL_2) 
    83 PKG_MACROS += COMPONENT_ARCHIVE_URL_2=$(COMPONENT_ARCHIVE_URL_2)
    95 
    84 
    96 # 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'
    97 # 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
    98 # 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
    99 # 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
   100 # at when we upgrade to a more current version.
    89 # erlang version 17.5.
   101 COMPONENT_PRE_CONFIGURE_ACTION = \
    90 COMPONENT_PRE_CONFIGURE_ACTION = \
   102 	($(CP) -rp $(SOURCE_DIR)/. $(@D))
    91 	($(CP) -rp $(SOURCE_DIR)/. $(@D))
   103 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
   104 
    96 
   105 COMPONENT_INSTALL_ARGS += INSTALL_PREFIX=$(PROTO_DIR)
    97 COMPONENT_INSTALL_ARGS += INSTALL_PREFIX=$(PROTO_DIR)
   106 
    98 
   107 COMPONENT_TEST_ENV +=		ERL_TOP=$(BUILD_DIR_64)
    99 COMPONENT_TEST_ENV +=		ERL_TOP=$(BUILD_DIR_64)
   108 COMPONENT_TEST_TARGETS =	tests
   100 COMPONENT_TEST_TARGETS =	tests
   112 	'-e "s|/ldisk/tests|XXX_UID_XXX|g" ' \
   104 	'-e "s|/ldisk/tests|XXX_UID_XXX|g" ' \
   113 	'-e "/XXX_UID_XXX/d" '
   105 	'-e "/XXX_UID_XXX/d" '
   114 
   106 
   115 ASLR_MODE = $(ASLR_ENABLE)
   107 ASLR_MODE = $(ASLR_ENABLE)
   116 
   108 
   117 # common targets
       
   118 configure:	$(CONFIGURE_64)
   109 configure:	$(CONFIGURE_64)
   119 
   110 
   120 build:	$(BUILD_64)
   111 build:	$(BUILD_64)
   121 
   112 
   122 install:	$(INSTALL_64)
   113 install:	$(INSTALL_64)
   139 clean::
   130 clean::
   140 	$(RM) -r documentation
   131 	$(RM) -r documentation
   141 
   132 
   142 test:	$(TEST_64)
   133 test:	$(TEST_64)
   143 
   134 
   144 
       
   145 REQUIRED_PACKAGES += library/ncurses
   135 REQUIRED_PACKAGES += library/ncurses
   146 REQUIRED_PACKAGES += library/security/openssl
   136 REQUIRED_PACKAGES += library/security/openssl
       
   137 REQUIRED_PACKAGES += library/zlib
   147 REQUIRED_PACKAGES += shell/ksh93
   138 REQUIRED_PACKAGES += shell/ksh93
   148 REQUIRED_PACKAGES += system/core-os
   139 REQUIRED_PACKAGES += system/core-os
   149 REQUIRED_PACKAGES += system/library
   140 REQUIRED_PACKAGES += system/library
   150 REQUIRED_PACKAGES += system/library/math
   141 REQUIRED_PACKAGES += system/library/math
   151 REQUIRED_PACKAGES += system/linker