Makefile revision 5487
dcfda24abf565c442d058cbf81b2180d847a1b3eAutomatic Updater# CDDL HEADER START
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The contents of this file are subject to the terms of the
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# Common Development and Distribution License (the "License").
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You may not use this file except in compliance with the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# See the License for the specific language governing permissions
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# and limitations under the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
7717ec7a6a898cdd3c35cbfba66010b7304ffd9bAutomatic Updater# information: Portions Copyright [yyyy] [name of copyright owner]
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# CDDL HEADER END
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_PROJECT_URL= http://www.r-project.org/
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater sha256:b93b7d878138279234160f007cb9b7f81b8a72c012a15566e9ec5395cfd9b6c1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_ARCHIVE_URL= http://cran.mtu.edu/src/base/R-3/$(COMPONENT_ARCHIVE)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Get rid of compiler path set in RUNPATH
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsJAVA_LIBS_PATH = $(JAVA8_HOME)/jre/lib/$(MACH64)/server
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLDFLAGS += -L$(STUDIO_LIBS_PATH) -R$(STUDIO_LIBS_PATH) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Augment the PATH and set CC/CXX/F95 such that the build environment doesn't
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# leak into usr/lib/64/etc/Makeconf and force consumers to have a setup like
7717ec7a6a898cdd3c35cbfba66010b7304ffd9bAutomatic Updater# our build environment to build R modules.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsexport PATH=$(SPRO_VROOT)/bin:/usr/bin:/usr/gnu/bin
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic UpdaterCONFIGURE_ENV += CFLAGS="-xO3 -xc99 -xlibmieee $(CC_BITS)"
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater# Needed to successfully compile R packages using C++ code.
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic UpdaterCONFIGURE_ENV += CXXFLAGS="$(CC_BITS) -std=c++11"
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic UpdaterCONFIGURE_ENV += FCLIBS="-lsunperf -lfsu -lsunmath"
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic UpdaterCONFIGURE_ENV += FLIBS="-lsunperf -lfsu -lsunmath"
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterCONFIGURE_ENV += LDFLAGS="$(LDFLAGS) -L$(R_LIBS_PATH) -R$(R_LIBS_PATH)"
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater# Needed so that R packages using C++ code can link against the standard
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater# C++ libraries.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterCONFIGURE_ENV += SHLIB_CXXLDFLAGS="-lCrunG3"
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater# Set the various Java variables otherwise it auto-detects the 32-bit ones.
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic UpdaterCONFIGURE_ENV += JAVA_CPPFLAGS="-I$(JAVA8_HOME)/jre/../include -I$(JAVA8_HOME)/jre/../include/solaris"
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic UpdaterCONFIGURE_ENV += JAVA_LIBS="-L$(JAVA_LIBS_PATH) -R$(JAVA_LIBS_PATH) -ljvm"
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater# From Brian Whitney:
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater# You need to define this option on SPARC, otherwise you will get quad
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater# arithmetic on SPARC but not on x86. Really makes some R functions run
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater# very slow on SPARC (COR path).
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic UpdaterCONFIGURE_OPTIONS.sparc = --disable-long-double
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic UpdaterCONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(MACH))
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic UpdaterCONFIGURE_OPTIONS += --with-blas='-lsunperf'
64affc54f96a2c71cbd10ed71e246ce0746259aaAutomatic UpdaterCONFIGURE_OPTIONS += --with-recommended-packages
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterCONFIGURE_OPTIONS += --enable-prebuilt-html
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater $(RM) $(BUILD_DIR_64)/tests/Examples/*.prev
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater $(RM) $(BUILD_DIR_64)/tests/Examples/*.prev
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater# Increase stack limit to allow the "infinite recursion" test to work.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterCOMPONENT_TEST_ENV_CMD = ulimit -Ss 32768 ; $(ENV)
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterCOMPONENT_SYSTEM_TEST_ENV_CMD = ulimit -Ss 32768 ; $(ENV)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews '-e "/^Testing examples for package /p" ' \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews '-e "/^running /p" ' \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews '-e "/^ expect some differences/p" ' \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews '-e "/comparing.*datetime.Rout/d" ' \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews '-e "/comparing.*reg-examples3.Rout/d" ' \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews '-e "/^ comparing /p" '
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Use the installed version of R, not the one in the build area.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# These definitions override those found in .../test/Makefile.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_SYSTEM_TEST_ARGS += R="LANGUAGE=en LC_ALL=C SRCDIR=$(BUILD_DIR_64)/tests R_DEFAULT_PACKAGES= /usr/bin/R --vanilla"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_SYSTEM_TEST_ARGS += R2="R_DEFAULT_PACKAGES= /usr/bin/R --vanilla"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_SYSTEM_TEST_ARGS += R3="/usr/bin/R CMD check"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_SYSTEM_TEST_ARGS += RDIFF="/usr/bin/R CMD Rdiff"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_SYSTEM_TEST_ARGS += RDCONV="LC_CTYPE=C /usr/bin/R CMD Rdconv"
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater# Need to build the tests before use them.
60a900e83bab52c3f023be66654f3ab023172778Automatic UpdaterREQUIRED_PACKAGES += system/library/fortran-runtime