Makefile revision 5672
4737N/A#
4737N/A# CDDL HEADER START
4737N/A#
4737N/A# The contents of this file are subject to the terms of the
4737N/A# Common Development and Distribution License (the "License").
4737N/A# You may not use this file except in compliance with the License.
4737N/A#
4737N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4737N/A# or http://www.opensolaris.org/os/licensing.
4737N/A# See the License for the specific language governing permissions
4737N/A# and limitations under the License.
4737N/A#
4737N/A# When distributing Covered Code, include this CDDL HEADER in each
4737N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4737N/A# If applicable, add the following below this CDDL HEADER, with the
4737N/A# fields enclosed by brackets "[]" replaced with your own identifying
4737N/A# information: Portions Copyright [yyyy] [name of copyright owner]
4737N/A#
4737N/A# CDDL HEADER END
4737N/A#
4737N/A
4737N/A#
5336N/A# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4737N/A#
4737N/A
4737N/Ainclude ../../make-rules/shared-macros.mk
4737N/A
4737N/ACOMPONENT_NAME= R
5363N/ACOMPONENT_VERSION= 3.2.3
4737N/ACOMPONENT_PROJECT_URL= http://www.r-project.org/
4737N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
4737N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
4737N/ACOMPONENT_ARCHIVE_HASH= \
5363N/A sha256:b93b7d878138279234160f007cb9b7f81b8a72c012a15566e9ec5395cfd9b6c1
4737N/ACOMPONENT_ARCHIVE_URL= http://cran.mtu.edu/src/base/R-3/$(COMPONENT_ARCHIVE)
4737N/ACOMPONENT_BUGDB= utility/r
4737N/A
5363N/ATPNO= 26540
4737N/A
4737N/Ainclude $(WS_MAKE_RULES)/prep.mk
4737N/Ainclude $(WS_MAKE_RULES)/configure.mk
4737N/Ainclude $(WS_MAKE_RULES)/ips.mk
4737N/A
4737N/ACOMPONENT_PRE_CONFIGURE_ACTION = \
4737N/A ($(CLONEY) $(SOURCE_DIR) $(@D))
4737N/A
4737N/A# Get rid of compiler path set in RUNPATH
4737N/ALDFLAGS += $(studio_NORUNPATH)
4737N/A
4737N/ALDFLAGS += $(CC_BITS)
4737N/A
4737N/ALDFLAGS += $(studio_PIC)
4737N/ALDFLAGS += $(LD_DEF_LIBS)
4737N/A
4737N/ASTUDIO_LIBS_PATH = /usr/lib/studio/64
4737N/AR_LIBS_PATH = /usr/lib/$(MACH64)/R/lib
4737N/AJAVA_LIBS_PATH = $(JAVA8_HOME)/jre/lib/$(MACH64)/server
4737N/A
4737N/ALDFLAGS += -L$(STUDIO_LIBS_PATH) -R$(STUDIO_LIBS_PATH) \
4737N/A -lsunperf -lfsu -lmtsk -lpicl -lkstat
4737N/A
5487N/A# Augment the PATH and set CC/CXX/F95 such that the build environment doesn't
5487N/A# leak into usr/lib/64/etc/Makeconf and force consumers to have a setup like
5487N/A# our build environment to build R modules.
5487N/Aexport PATH=$(SPRO_VROOT)/bin:/usr/bin:/usr/gnu/bin
5487N/ACC = cc
5487N/ACXX = CC
5487N/AF95 = f95
5672N/Aifeq ($(strip $(PARFAIT_BUILD)),yes)
5672N/Aexport PATH=$(PARFAIT_TOOLS):$(SPRO_VROOT)/bin:/usr/bin:/usr/gnu/bin
5672N/Aendif
5672N/A
4737N/A
4737N/ACONFIGURE_ENV += F77="$(F95) $(CC_BITS)"
4737N/ACONFIGURE_ENV += FC="$(F95) $(CC_BITS)"
4737N/A
4737N/ACONFIGURE_ENV += CPICFLAGS="$(studio_PIC)"
4737N/ACONFIGURE_ENV += CFLAGS="-xO3 -xc99 -xlibmieee $(CC_BITS)"
5450N/A# Needed to successfully compile R packages using C++ code.
5487N/ACONFIGURE_ENV += CXX="$(CXX) -std=c++11"
5594N/A
5594N/A# We (the Userland) team don't need -D__MATHERR_RENAME_EXCEPTION for the
5594N/A# creation of the R packages we provide in Solaris. It would be needed by
5594N/A# our customers that try to install R packages that use C++. And they would
5594N/A# be using the version of the Studio compilers on their machine(s) to do this.
5594N/A# Studio 12.5 will hopefully automatically provide this definition when C++
5594N/A# code is compiled with "-std=c++11". When that version of the Studio
5594N/A# compilers is released, we should encourage customers to install it, but
5594N/A# for those still using Studio 12.4, this definition will continue to be needed.
5594N/ACONFIGURE_ENV += CXXFLAGS="$(CC_BITS) -std=c++11 -D__MATHERR_RENAME_EXCEPTION"
4737N/ACONFIGURE_ENV += FPICFLAGS="$(studio_PIC)"
4737N/ACONFIGURE_ENV += FFLAGS="-xO3 $(CC_BITS)"
4737N/ACONFIGURE_ENV += FCFLAGS="-xO3 $(CC_BITS)"
4737N/ACONFIGURE_ENV += FCLIBS="-lsunperf -lfsu -lsunmath"
4737N/ACONFIGURE_ENV += FLIBS="-lsunperf -lfsu -lsunmath"
4737N/ACONFIGURE_ENV += LDFLAGS="$(LDFLAGS) -L$(R_LIBS_PATH) -R$(R_LIBS_PATH)"
5450N/A# Needed so that R packages using C++ code can link against the standard
5450N/A# C++ libraries.
5487N/ACONFIGURE_ENV += SHLIB_CXXLDFLAGS="-lCrunG3"
4737N/A
4737N/A# Set the various Java variables otherwise it auto-detects the 32-bit ones.
4737N/ACONFIGURE_ENV += JAVA_CPPFLAGS="-I$(JAVA8_HOME)/jre/../include -I$(JAVA8_HOME)/jre/../include/solaris"
4737N/ACONFIGURE_ENV += JAVA_LIBS="-L$(JAVA_LIBS_PATH) -R$(JAVA_LIBS_PATH) -ljvm"
4737N/A
4737N/A# From Brian Whitney:
4737N/A# You need to define this option on SPARC, otherwise you will get quad
4737N/A# arithmetic on SPARC but not on x86. Really makes some R functions run
4737N/A# very slow on SPARC (COR path).
4737N/ACONFIGURE_OPTIONS.i386 =
4737N/ACONFIGURE_OPTIONS.sparc = --disable-long-double
4737N/ACONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(MACH))
4737N/A
4737N/ACONFIGURE_OPTIONS += --enable-R-shlib
4737N/ACONFIGURE_OPTIONS += --with-blas='-lsunperf'
4737N/ACONFIGURE_OPTIONS += --with-ICU
4737N/ACONFIGURE_OPTIONS += --with-lapack
4737N/ACONFIGURE_OPTIONS += --with-recommended-packages
4737N/ACONFIGURE_OPTIONS += --with-tcltk
4737N/ACONFIGURE_OPTIONS += --enable-prebuilt-html
4737N/A
4737N/ACOMPONENT_PRE_TEST_ACTION = \
4737N/A $(RM) $(BUILD_DIR_64)/tests/Examples/*.prev
4737N/A
4897N/ACOMPONENT_PRE_SYSTEM_TEST_ACTION = \
4897N/A $(RM) $(BUILD_DIR_64)/tests/Examples/*.prev
4897N/A
4737N/A# Increase stack limit to allow the "infinite recursion" test to work.
4737N/ACOMPONENT_TEST_ENV_CMD = ulimit -Ss 32768 ; $(ENV)
4897N/ACOMPONENT_SYSTEM_TEST_ENV_CMD = ulimit -Ss 32768 ; $(ENV)
4737N/A
5336N/ACOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
4737N/A
4737N/ACOMPONENT_TEST_TRANSFORMS += \
4737N/A '-n ' \
4737N/A '-e "/^Testing examples for package /p" ' \
4737N/A '-e "/^running /p" ' \
5336N/A '-e "/^ expect some differences/p" ' \
5336N/A '-e "/comparing.*datetime.Rout/d" ' \
5336N/A '-e "/comparing.*reg-examples3.Rout/d" ' \
5336N/A '-e "/^ comparing /p" '
4737N/A
4737N/AASLR_MODE = $(ASLR_ENABLE)
4737N/A
4897N/A# Use the installed version of R, not the one in the build area.
4897N/A# These definitions override those found in .../test/Makefile.
5336N/ACOMPONENT_SYSTEM_TEST_ARGS += R="LANGUAGE=en LC_ALL=C SRCDIR=$(BUILD_DIR_64)/tests R_DEFAULT_PACKAGES= /usr/bin/R --vanilla"
4897N/ACOMPONENT_SYSTEM_TEST_ARGS += R2="R_DEFAULT_PACKAGES= /usr/bin/R --vanilla"
4897N/ACOMPONENT_SYSTEM_TEST_ARGS += R3="/usr/bin/R CMD check"
4897N/ACOMPONENT_SYSTEM_TEST_ARGS += RDIFF="/usr/bin/R CMD Rdiff"
4897N/ACOMPONENT_SYSTEM_TEST_ARGS += RDCONV="LC_CTYPE=C /usr/bin/R CMD Rdconv"
4897N/A
4897N/ACOMPONENT_TEST_ARGS = -k -i
4897N/ACOMPONENT_SYSTEM_TEST_ARGS += -k -i
4737N/A
4896N/Aconfigure: $(CONFIGURE_64)
4896N/A
4737N/Abuild: $(BUILD_64)
4737N/A
4737N/Ainstall: $(INSTALL_64)
4737N/A
4737N/Atest: $(TEST_64)
4737N/A
4897N/A# Need to build the tests before use them.
4897N/Asystem-test: build $(SYSTEM_TEST_64)
4737N/A
4737N/AREQUIRED_PACKAGES += image/library/libjpeg
4737N/AREQUIRED_PACKAGES += image/library/libpng
4737N/AREQUIRED_PACKAGES += image/library/libtiff
4737N/AREQUIRED_PACKAGES += library/desktop/cairo
4737N/AREQUIRED_PACKAGES += library/desktop/pango
4737N/AREQUIRED_PACKAGES += library/glib2
4896N/AREQUIRED_PACKAGES += library/icu
4737N/AREQUIRED_PACKAGES += library/pcre
4739N/AREQUIRED_PACKAGES += library/readline
4737N/AREQUIRED_PACKAGES += library/zlib
4737N/AREQUIRED_PACKAGES += shell/bash
4737N/AREQUIRED_PACKAGES += system/library
4737N/AREQUIRED_PACKAGES += system/library/fortran-runtime
4898N/AREQUIRED_PACKAGES += system/library/iconv
4737N/AREQUIRED_PACKAGES += system/library/math
4737N/AREQUIRED_PACKAGES += system/library/sunperf
4737N/AREQUIRED_PACKAGES += web/curl
4737N/AREQUIRED_PACKAGES += x11/library/libx11
4737N/AREQUIRED_PACKAGES += x11/library/libxmu
4737N/AREQUIRED_PACKAGES += x11/library/toolkit/libxt