Makefile revision 618
12343c067e12be071a68bbb10d1d1c4870696769Tinderbox User#
6c2a76b3e2ccd32c35814b6e0f54da00190749d7Evan Hunt# CDDL HEADER START
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater#
e5404e49304b1f8f13a03cc63e5341e4501735ceTinderbox User# The contents of this file are subject to the terms of the
e5404e49304b1f8f13a03cc63e5341e4501735ceTinderbox User# Common Development and Distribution License (the "License").
ba9e87b35e561bc7354ce3f4b9685b747b7be507Tinderbox User# You may not use this file except in compliance with the License.
1f9754245cbd5eec2d2a667bb292f62f72386d4bMark Andrews#
59663800d2ec04777dae2791dd92aa563faf94c8Evan Hunt# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d0036fd5ddfe3c8e24151bbb1f21bc51bf876774Tinderbox User# or http://www.opensolaris.org/os/licensing.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# See the License for the specific language governing permissions
1f9754245cbd5eec2d2a667bb292f62f72386d4bMark Andrews# and limitations under the License.
59663800d2ec04777dae2791dd92aa563faf94c8Evan Hunt#
1ca2cf024391992fe14b2df7d3ae0f575d074452Evan Hunt# When distributing Covered Code, include this CDDL HEADER in each
0726d872f6f36901ea09321df57084614e5bb6faTinderbox User# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1ca2cf024391992fe14b2df7d3ae0f575d074452Evan Hunt# If applicable, add the following below this CDDL HEADER, with the
a2c370ca12bb0360ff7e969474ead3f788c65fffTinderbox User# fields enclosed by brackets "[]" replaced with your own identifying
8de3f14f1c300c3e1ed99084cc03485b42c92bf1Tinderbox User# information: Portions Copyright [yyyy] [name of copyright owner]
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# CDDL HEADER END
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews
2b7254075b883d70852a2757210793603085a0f1Tinderbox User#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
b91d11bfcc30b96f2c80f3a76d12e3dcc8597a68Mark Andrews
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrewsinclude ../../make-rules/shared-macros.mk
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCOMPONENT_NAME= otp_src
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsCOMPONENT_VERSION_MAJOR= 12
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsCOMPONENT_VERSION_MINOR= B
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCOMPONENT_VERSION_MICRO= 5
415d630b6309922caee8469384a6fab75cf05032Mark Andrews# IPS_COMPONENT_VERSION needs update whenever this is changed
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsCOMPONENT_VERSION= R$(COMPONENT_VERSION_MAJOR)$(COMPONENT_VERSION_MINOR)-$(COMPONENT_VERSION_MICRO)
415d630b6309922caee8469384a6fab75cf05032Mark AndrewsCOMPONENT_PROJECT_URL= http://www.erlang.org/
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark AndrewsCOMPONENT_SRC= $(COMPONENT_NAME)_$(COMPONENT_VERSION)
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox UserCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsCOMPONENT_ARCHIVE_HASH= sha1:6c45509acf70d35d5def2cbefd86ada093c1ac3a
415d630b6309922caee8469384a6fab75cf05032Mark AndrewsCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE)
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews# manpages
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox UserCOMPONENT_NAME_1= otp_doc_man
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsCOMPONENT_SRC_1= $(COMPONENT_NAME_1)_$(COMPONENT_VERSION)
415d630b6309922caee8469384a6fab75cf05032Mark AndrewsCOMPONENT_ARCHIVE_1= $(COMPONENT_SRC_1).tar.gz
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsCOMPONENT_ARCHIVE_HASH_1= sha1:ae7036bd2afc9d1fca97f0de2eca84f56656def8
415d630b6309922caee8469384a6fab75cf05032Mark AndrewsCOMPONENT_ARCHIVE_URL_1= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_1)
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User# HTML documentation
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsCOMPONENT_NAME_2= otp_doc_html
015055b6e23f5c08f6a5b34726f90b62597e9e45Tinderbox UserCOMPONENT_SRC_2= $(COMPONENT_NAME_2)_$(COMPONENT_VERSION)
7fcb9dbe08bc0111c5e03e953ba889f86a38b854Tinderbox UserCOMPONENT_ARCHIVE_2= $(COMPONENT_SRC_2).tar.gz
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntCOMPONENT_ARCHIVE_HASH_2= sha1:0bd369d02051e01bac58c9b8665bd3538e116f51
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsCOMPONENT_ARCHIVE_URL_2= $(COMPONENT_PROJECT_URL)download/$(COMPONENT_ARCHIVE_2)
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Huntinclude ../../make-rules/prep.mk
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrewsinclude ../../make-rules/configure.mk
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrewsinclude ../../make-rules/ips.mk
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but it is not
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# enough for us. We need to include the $(COMPONENT_SUBVERSION) somehow.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Because the IPS_COMPONENT_VERSION cannot contain letters we use mapping:
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# R(major)(minor)-(micro) - (major).(minor as number).(micro)
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsIPS_COMPONENT_VERSION= $(COMPONENT_VERSION_MAJOR).2.$(COMPONENT_VERSION_MICRO)
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Built in SFW with gcc and builds cleanly now only with gcc
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsCOMPILER = gcc
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic UpdaterCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark AndrewsCONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS) -I/usr/include/gd2"
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox UserCONFIGURE_OPTIONS += INSTALL="/usr/ucb/install -c"
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsCONFIGURE_OPTIONS += --enable-smp-support
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsCONFIGURE_OPTIONS += --enable-threads
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCONFIGURE_OPTIONS += --enable-hipe
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsCONFIGURE_OPTIONS += --with-ssl
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark AndrewsCONFIGURE_OPTIONS += --enable-dynamic-ssl-lib
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsCONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsCONFIGURE_OPTIONS.64 += LIBS="-m64"
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews# Use cp(1) instead of cloney because erlang's 'install' target uses 'tar'
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# to copy files and our tar doesn't handle long links by default. Between
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews# the use of 'tar' and 'ld', a path adjustment wasn't an option due to the
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User# need for /usr/bin/ld and /usr/gnu/bin/tar. Perhaps this can be looked
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# at when we upgrade to a more current version.
015055b6e23f5c08f6a5b34726f90b62597e9e45Tinderbox UserCOMPONENT_PRE_CONFIGURE_ACTION = \
3ccf87473f7cf6d9faac156df38a935a238f96fdTinderbox User ($(CP) -rp $(SOURCE_DIR)/. $(@D))
fec6e13f2d1e69fe1c2b8fac36f732f124cf5398Mark AndrewsCONFIGURE_SCRIPT = $(@D)/configure
b378314925e78f21853a98cec924788ce1822c6cTinderbox User
ebe53509ca55a141131c104b6d722236b606e0efTinderbox UserCOMPONENT_INSTALL_ARGS += INSTALL_PREFIX=$(PROTO_DIR)
fec6e13f2d1e69fe1c2b8fac36f732f124cf5398Mark Andrews
415d630b6309922caee8469384a6fab75cf05032Mark Andrews# common targets
2ae159b376dac23870d8005563c585acf85a4b5aEvan Huntbuild: $(BUILD_32_and_64)
415d630b6309922caee8469384a6fab75cf05032Mark Andrews
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrewsinstall: $(INSTALL_32_and_64)
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User # Undelivered useless files:
2ae159b376dac23870d8005563c585acf85a4b5aEvan Hunt # erlang/lib/crypto-*/priv/obj
7cc0a5d21ef046bfd630c4769943d896a7d7472cTinderbox User # erlang/lib/ssl-*/priv/obj
3ccf87473f7cf6d9faac156df38a935a238f96fdTinderbox User # erlang/Install
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews # erlang/misc
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User # erlang/*/*.bat
551e6d2414c4f47d58a9bb0b37f206f915a4f5acTinderbox User # manpages: start.1 werl.1
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(RM) -r documentation
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User $(MKDIR) documentation && cd documentation && \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1) && \
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_2)
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User # remove INSTALL_PREFIX from path
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(PERL) -pi -e "s|$(PROTO_DIR)||g" $(PROTO_DIR)/usr/lib/erlang/bin/erl \
51aeb0ae19596e99b029cfa933e73b76ebec480aTinderbox User $(PROTO_DIR)/usr/lib/$(MACH64)/erlang/bin/erl \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(PROTO_DIR)/usr/lib/erlang/releases/RELEASES \
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User $(PROTO_DIR)/usr/lib/$(MACH64)/erlang/releases/RELEASES
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsclean::
415d630b6309922caee8469384a6fab75cf05032Mark Andrews $(RM) -r documentation
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
415d630b6309922caee8469384a6fab75cf05032Mark Andrewstest: $(NO_TESTS)
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox UserBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews
415d630b6309922caee8469384a6fab75cf05032Mark Andrewsinclude ../../make-rules/depend.mk
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews