Makefile revision 5680
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews#
885f47576842cf3c569315b9a48bd9f0ca03f203Automatic Updater# CDDL HEADER START
71bd43eebd9d6e42dbcae62b730f5b6508d5acd8Automatic Updater#
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater# The contents of this file are subject to the terms of the
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater# Common Development and Distribution License (the "License").
2bb3422dc683c013db7042f5736240de6b86f182Automatic Updater# You may not use this file except in compliance with the License.
0bddff542cf2ae1b6595020f2f72ca482c6b438fAutomatic Updater#
75b70a68aefaa17ac4e768d5ed85d2f50d471490Automatic Updater# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater# or http://www.opensolaris.org/os/licensing.
ea854b585041ad19f70f7af15e08144ef2c2bd1bMark Andrews# See the License for the specific language governing permissions
78cb74fab4665da2e2641ba909c6f59f74cc4193Automatic Updater# and limitations under the License.
c89d02f2fb4c06168236d600e86831cff324f763Mark Andrews#
90ff38a0d8deaf5f9c2aa5916d99b2e572d28738Automatic Updater# When distributing Covered Code, include this CDDL HEADER in each
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
6c6a121295b30772cbf3dd75a51fb9d883051a0eAutomatic Updater# fields enclosed by brackets "[]" replaced with your own identifying
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# information: Portions Copyright [yyyy] [name of copyright owner]
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater#
bc0a53583d92309bebcf93c408e2f3247ebd3d3cAutomatic Updater# CDDL HEADER END
56874aef380a64a2c183b7c282c3e7a361d67fa1Automatic Updater#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
96713299d08c0735c18ebe8772dd2cc1ecd4356aAutomatic Updater#
3cc98b8ecedcbc8465f1cf2740b966b315662430Automatic Updater# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsBUILD_BITS= 64
96713299d08c0735c18ebe8772dd2cc1ecd4356aAutomatic Updaterinclude ../../make-rules/shared-macros.mk
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCOMPONENT_NAME= R
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCOMPONENT_VERSION= 3.2.3
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark AndrewsCOMPONENT_PROJECT_URL= http://www.r-project.org/
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCOMPONENT_ARCHIVE_HASH= \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson sha256:b93b7d878138279234160f007cb9b7f81b8a72c012a15566e9ec5395cfd9b6c1
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCOMPONENT_ARCHIVE_URL= http://cran.mtu.edu/src/base/R-3/$(COMPONENT_ARCHIVE)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCOMPONENT_BUGDB= utility/r
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterTPNO= 26540
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# Need to build the tests before using them.
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntSYSTEM_TEST_TARGET= build $(SYSTEM_TEST_64)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updaterinclude $(WS_MAKE_RULES)/common.mk
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntCOMPONENT_PRE_CONFIGURE_ACTION = \
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater ($(CLONEY) $(SOURCE_DIR) $(@D))
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# Get rid of compiler path set in RUNPATH
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntLDFLAGS += $(studio_NORUNPATH)
2d2dc37599979c83495510f8af8d1756753aa2c5Automatic Updater
2d2dc37599979c83495510f8af8d1756753aa2c5Automatic UpdaterLDFLAGS += $(CC_BITS)
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterLDFLAGS += $(studio_PIC)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterLDFLAGS += $(LD_DEF_LIBS)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterSTUDIO_LIBS_PATH = $(USRLIBDIR)/studio/64
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterR_LIBS_PATH = $(USRLIBDIR64)/R/lib
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic UpdaterJAVA_LIBS_PATH = $(JAVA8_HOME)/jre/lib/$(MACH64)/server
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterLDFLAGS += -L$(STUDIO_LIBS_PATH) -R$(STUDIO_LIBS_PATH) \
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater -lsunperf -lfsu -lmtsk -lpicl -lkstat
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# Augment the PATH and set CC/CXX/F95 such that the build environment doesn't
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews# leak into usr/lib/64/etc/Makeconf and force consumers to have a setup like
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews# our build environment to build R modules.
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrewsexport PATH=$(SPRO_VROOT)/bin:$(USRBINDIR):$(GNUBIN)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCC = cc
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic UpdaterCXX = CC
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsF95 = f95
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updaterifeq ($(strip $(PARFAIT_BUILD)),yes)
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updaterexport PATH=$(PARFAIT_TOOLS):$(SPRO_VROOT)/bin:$(USRBINDIR):$(GNUBIN)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsendif
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
db5b7e2cdf150c46e8242d3e2e3ad3f5c7300258Automatic UpdaterCONFIGURE_ENV += F77="$(F95) $(CC_BITS)"
80faf1588895fd26490f82f95a7a1b771df1c324Automatic UpdaterCONFIGURE_ENV += FC="$(F95) $(CC_BITS)"
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
1a06700908f5a1d9f4a8d51285a0fd971e2f9117Automatic Updater# For now, R is built with a very specific set of optimization flags to match
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Oracle-provided builds. These should be re-evaluated when upgrading to
db5b7e2cdf150c46e8242d3e2e3ad3f5c7300258Automatic Updater# Studio 12.5 or later or when next upgrading R.
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrewsstudio_OPT= -xO3
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsstudio_XBITS=
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updaterstudio_XREGS=
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonstudio_IROPTS=
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updaterstudio_C99MODE= $(studio_C99_ENABLE)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updaterstudio_ALIGN=
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrewsstudio_MT=
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCFLAGS.studio += -xlibmieee
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCXXFLAGS += -std=c++11
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# We (the Userland) team don't need -D__MATHERR_RENAME_EXCEPTION for the
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# creation of the R packages we provide in Solaris. It would be needed by
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# our customers that try to install R packages that use C++. And they would
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater# be using the version of the Studio compilers on their machine(s) to do this.
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater# Studio 12.5 will hopefully automatically provide this definition when C++
9174e44c14b1cb91a651fa1dc29470438c246ab9Automatic Updater# code is compiled with "-std=c++11". When that version of the Studio
55e03fc54708d97917bf26639b987f759bdc1f44Automatic Updater# compilers is released, we should encourage customers to install it, but
9174e44c14b1cb91a651fa1dc29470438c246ab9Automatic Updater# for those still using Studio 12.4, this definition will continue to be needed.
9174e44c14b1cb91a651fa1dc29470438c246ab9Automatic UpdaterCXXFLAGS += -D__MATHERR_RENAME_EXCEPTION
2a31bd531072824ef252c18303859d6af7451b00Francis DupontLDFLAGS += -L$(R_LIBS_PATH) -R$(R_LIBS_PATH)
52367885450d8f61d4f2d63292beb15ba8f39ac7Automatic Updater
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic UpdaterCONFIGURE_ENV += CPICFLAGS="$(studio_PIC)"
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCONFIGURE_ENV += FPICFLAGS="$(studio_PIC)"
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCONFIGURE_ENV += FFLAGS="$(studio_OPT) $(CC_BITS)"
52367885450d8f61d4f2d63292beb15ba8f39ac7Automatic UpdaterCONFIGURE_ENV += FCFLAGS="$(studio_OPT) $(CC_BITS)"
9174e44c14b1cb91a651fa1dc29470438c246ab9Automatic UpdaterCONFIGURE_ENV += FCLIBS="-lsunperf -lfsu -lsunmath"
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCONFIGURE_ENV += FLIBS="-lsunperf -lfsu -lsunmath"
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater# Needed so that R packages using C++ code can link against the standard
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater# C++ libraries.
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic UpdaterCONFIGURE_ENV += SHLIB_CXXLDFLAGS="-lCrunG3"
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater# Set the various Java variables otherwise it auto-detects the 32-bit ones.
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic UpdaterCONFIGURE_ENV += JAVA_CPPFLAGS="-I$(JAVA8_HOME)/jre/../include -I$(JAVA8_HOME)/jre/../include/solaris"
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic UpdaterCONFIGURE_ENV += JAVA_LIBS="-L$(JAVA_LIBS_PATH) -R$(JAVA_LIBS_PATH) -ljvm"
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# From Brian Whitney:
885f47576842cf3c569315b9a48bd9f0ca03f203Automatic Updater# You need to define this option on SPARC, otherwise you will get quad
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater# arithmetic on SPARC but not on x86. Really makes some R functions run
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# very slow on SPARC (COR path).
ae7e54b14c946e0984c191554db9abb4893f9349Automatic UpdaterCONFIGURE_OPTIONS.sparc += --disable-long-double
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_OPTIONS += --enable-R-shlib
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic UpdaterCONFIGURE_OPTIONS += --with-blas='-lsunperf'
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_OPTIONS += --with-ICU
fe80a4909bf62b602feaf246866e9d29f7654194Automatic UpdaterCONFIGURE_OPTIONS += --with-lapack
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_OPTIONS += --with-recommended-packages
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_OPTIONS += --with-tcltk
fe80a4909bf62b602feaf246866e9d29f7654194Automatic UpdaterCONFIGURE_OPTIONS += --enable-prebuilt-html
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCOMPONENT_PRE_TEST_ACTION = \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(RM) $(BUILD_DIR_64)/tests/Examples/*.prev
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsCOMPONENT_PRE_SYSTEM_TEST_ACTION = \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(RM) $(BUILD_DIR_64)/tests/Examples/*.prev
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater# Increase stack limit to allow the "infinite recursion" test to work.
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic UpdaterCOMPONENT_TEST_ENV_CMD = ulimit -Ss 32768 ; $(ENV)
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic UpdaterCOMPONENT_SYSTEM_TEST_ENV_CMD = ulimit -Ss 32768 ; $(ENV)
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic UpdaterCOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCOMPONENT_TEST_TRANSFORMS += \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater '-n ' \
4104e236f71eb5108fcfda6711878a97f6f4a8e7Automatic Updater '-e "/^Testing examples for package /p" ' \
0df8ead472f207020f8da22a185fe4b945248ab8Automatic Updater '-e "/^running /p" ' \
e8c7dc2a5ce48f11c07a67c9923eeb8f419ff19fEvan Hunt '-e "/^ expect some differences/p" ' \
0ce87e5749aabb8eef1e0a37e4bd6e6ffa1d7196Automatic Updater '-e "/comparing.*datetime.Rout/d" ' \
0ce87e5749aabb8eef1e0a37e4bd6e6ffa1d7196Automatic Updater '-e "/comparing.*reg-examples3.Rout/d" ' \
0df8ead472f207020f8da22a185fe4b945248ab8Automatic Updater '-e "/^ comparing /p" '
2bb3422dc683c013db7042f5736240de6b86f182Automatic Updater
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater# Use the installed version of R, not the one in the build area.
0df8ead472f207020f8da22a185fe4b945248ab8Automatic Updater# These definitions override those found in .../test/Makefile.
3b6e4c84a525b0b3fc9e8affd8bb9fa5c000345fAutomatic UpdaterCOMPONENT_SYSTEM_TEST_ARGS += R="LANGUAGE=en LC_ALL=C SRCDIR=$(BUILD_DIR_64)/tests R_DEFAULT_PACKAGES= $(USRBINDIR)/R --vanilla"
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic UpdaterCOMPONENT_SYSTEM_TEST_ARGS += R2="R_DEFAULT_PACKAGES= $(USRBINDIR)/R --vanilla"
d145b64cacc8d9cda51f9924ec70cd4661c3e2cfAutomatic UpdaterCOMPONENT_SYSTEM_TEST_ARGS += R3="$(USRBINDIR)/R CMD check"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterCOMPONENT_SYSTEM_TEST_ARGS += RDIFF="$(USRBINDIR)/R CMD Rdiff"
59528addd704f8d5757b54e540520f74e588a7c7Automatic UpdaterCOMPONENT_SYSTEM_TEST_ARGS += RDCONV="LC_CTYPE=C $(USRBINDIR)/R CMD Rdconv"
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
c243d779731a410f8dc2d2feeed20c15f299b6e3Automatic UpdaterCOMPONENT_TEST_ARGS = -k -i
0df8ead472f207020f8da22a185fe4b945248ab8Automatic UpdaterCOMPONENT_SYSTEM_TEST_ARGS += -k -i
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterREQUIRED_PACKAGES += image/library/libjpeg
bc0a53583d92309bebcf93c408e2f3247ebd3d3cAutomatic UpdaterREQUIRED_PACKAGES += image/library/libpng
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterREQUIRED_PACKAGES += image/library/libtiff
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterREQUIRED_PACKAGES += library/desktop/cairo
59528addd704f8d5757b54e540520f74e588a7c7Automatic UpdaterREQUIRED_PACKAGES += library/desktop/pango
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterREQUIRED_PACKAGES += library/glib2
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterREQUIRED_PACKAGES += library/icu
7f79131f9a8e804b93c57f3c679065cce878b726Automatic UpdaterREQUIRED_PACKAGES += library/pcre
59528addd704f8d5757b54e540520f74e588a7c7Automatic UpdaterREQUIRED_PACKAGES += library/readline
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterREQUIRED_PACKAGES += library/zlib
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterREQUIRED_PACKAGES += shell/bash
7f94d9a8162c9a96b56e66176702b66e79d8e1a2Automatic UpdaterREQUIRED_PACKAGES += system/library/fortran-runtime
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterREQUIRED_PACKAGES += system/library/iconv
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic UpdaterREQUIRED_PACKAGES += system/library/math
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterREQUIRED_PACKAGES += system/library/sunperf
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterREQUIRED_PACKAGES += web/curl
7f94d9a8162c9a96b56e66176702b66e79d8e1a2Automatic UpdaterREQUIRED_PACKAGES += x11/library/libx11
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterREQUIRED_PACKAGES += x11/library/libxmu
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterREQUIRED_PACKAGES += x11/library/toolkit/libxt
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater