Makefile revision 6011
11e9368a226272085c337e9e74b79808c16fbdbaTinderbox User# CDDL HEADER START
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# The contents of this file are subject to the terms of the
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# Common Development and Distribution License (the "License").
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# You may not use this file except in compliance with the License.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# See the License for the specific language governing permissions
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# and limitations under the License.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# When distributing Covered Code, include this CDDL HEADER in each
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# If applicable, add the following below this CDDL HEADER, with the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# fields enclosed by brackets "[]" replaced with your own identifying
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# information: Portions Copyright [yyyy] [name of copyright owner]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# CDDL HEADER END
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# switching to parfait breaks a patch (23049278)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein sha256:b93b7d878138279234160f007cb9b7f81b8a72c012a15566e9ec5395cfd9b6c1
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCOMPONENT_ARCHIVE_URL= http://cran.mtu.edu/src/base/R-3/$(COMPONENT_ARCHIVE)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Requires newer version of system/linker from ON, available in S12 but not
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# 11.3, so do not publish.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Need to build the tests before using them.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# R_LIBS_PATH is used when creating /usr/lib/64/R/etc/Makeconf
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Using a resolved pathname here (rather than say $(USRLIBDIR64)/R/lib) so
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# that the Makeconf-GNU.patch patch used by the COMPONENT_POST_INSTALL_ACTION
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# will just work on both platforms.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntJAVA_LIBS_PATH = $(JAVA8_HOME)/jre/lib/$(MACH64)/server
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLDFLAGS += -L$(STUDIO_LIBS_PATH) -R$(STUDIO_LIBS_PATH) \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Augment the PATH and set CC/CXX/FC/F77 such that the build environment doesn't
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# leak into usr/lib/64/etc/Makeconf and force consumers to have a setup like
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# our build environment to build R modules.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinexport PATH=$(PARFAIT_TOOLS):$(SPRO_VROOT)/bin:$(USRBINDIR):$(GNUBIN)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# We can't use $(CC_PIC) here (which provides "-fPIC -DPIC" for the GNU
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# compilers), because we fail at configure time with:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# configure: error: Building R requires the 'va_copy' system call
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# .../make-rules/configure.mk:170: recipe for target
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# '.../components/r/build/amd64/.configured' failed
727f5b8846457a33d06f515a10a7e1aa849ddf18Andreas Gustafsson# These CONFIGURE_ENV lines are here so that /usr/lib/64/R/etc/Makeconf (the
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# configuration file used when building/installing the R CRAN packages),
ac93437301f55ed69bf85883a497a75598c628f9Automatic Updater# is in exactly the correct format to work properly with the GNU compilers for
ac93437301f55ed69bf85883a497a75598c628f9Automatic Updater# all the R CRAN packages containing C, C++, Fortran or Java code.
ac93437301f55ed69bf85883a497a75598c628f9Automatic UpdaterCONFIGURE_ENV += CC="$(CC) -std=gnu99 $(CC_BITS)"
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceCONFIGURE_ENV += C_VISIBILITY="-fvisibility=hidden"
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceCONFIGURE_ENV += CFLAGS="-g -O2 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2"
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceCONFIGURE_ENV += CXXFLAGS="$(CC_BITS) -g -O2 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCONFIGURE_ENV += CXX1XFLAGS="$(CC_BITS) -g -O2 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCONFIGURE_ENV += F77_VISIBILITY="-fvisibility=hidden"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONFIGURE_ENV += FCLIBS="-lsunperf -lfsu -lsunmath"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONFIGURE_ENV += FLIBS="-lsunperf -lfsu -lsunmath -lgfortran -lm"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Set the various Java variables otherwise it auto-detects the 32-bit ones.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONFIGURE_ENV += JAVA_CPPFLAGS="-I$(JAVA8_HOME)/jre/../include -I$(JAVA8_HOME)/jre/../include/solaris"
ac93437301f55ed69bf85883a497a75598c628f9Automatic UpdaterCONFIGURE_ENV += JAVA_LIBS="-L$(JAVA_LIBS_PATH) -R$(JAVA_LIBS_PATH) -ljvm"
ac93437301f55ed69bf85883a497a75598c628f9Automatic Updater# From Brian Whitney:
ac93437301f55ed69bf85883a497a75598c628f9Automatic Updater# You need to define this option on SPARC, otherwise you will get quad
ac93437301f55ed69bf85883a497a75598c628f9Automatic Updater# arithmetic on SPARC but not on x86. Really makes some R functions run
ac93437301f55ed69bf85883a497a75598c628f9Automatic Updater# very slow on SPARC (COR path).
ac93437301f55ed69bf85883a497a75598c628f9Automatic UpdaterCONFIGURE_OPTIONS.sparc += --disable-long-double
ac93437301f55ed69bf85883a497a75598c628f9Automatic Updater# Increase stack limit to allow the "infinite recursion" test to work.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceCOMPONENT_SYSTEM_TEST_ENV_CMD = ulimit -Ss 32768 ; $(ENV)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceCOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce '-e "/^Testing examples for package /p" ' \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce '-e "/^running /p" ' \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce '-e "/^ expect some differences/p" ' \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce '-e "/comparing.*datetime.Rout/d" ' \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce '-e "/comparing.*reg-examples3.Rout/d" ' \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein '-e "/^ comparing /p" '
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Use the installed version of R, not the one in the build area.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# These definitions override those found in .../test/Makefile.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCOMPONENT_SYSTEM_TEST_ARGS += R="LANGUAGE=en LC_ALL=C SRCDIR=$(BUILD_DIR_64)/tests R_DEFAULT_PACKAGES= $(USRBINDIR)/R --vanilla"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCOMPONENT_SYSTEM_TEST_ARGS += R2="R_DEFAULT_PACKAGES= $(USRBINDIR)/R --vanilla"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCOMPONENT_SYSTEM_TEST_ARGS += R3="$(USRBINDIR)/R CMD check"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCOMPONENT_SYSTEM_TEST_ARGS += RDIFF="$(USRBINDIR)/R CMD Rdiff"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCOMPONENT_SYSTEM_TEST_ARGS += RDCONV="LC_CTYPE=C $(USRBINDIR)/R CMD Rdconv"