#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
#
# COMPONENT_VERSION <major>.<minor>.<teeny>
# is transformed into <major>.<minor> for RUBY_VER.
# First change the separator '.' to ' ', so we can use "word" to pull the
# first two space-separated words from the string.
# the library-compatible version
PROTO_RBCONFIG_FILE=$(PROTORUBYDIR)/lib/ruby/$(RUBY_LIB_VER)/$(MACH64)-solaris$(SOLARIS_VERSION)/rbconfig.rb
# these macros are used in the package manifest
# Prevent re-compile of ripper.so during install, which would result in
# an erroneous full build directory in its RUNPATH. The below change to
# and prevents its regeneration.
# Apply some of the edits here--including to the sed scripts themselves.
# These modifications of ruby.1 must occur after ruby
# is installed, not before. Although there are some other patches
# to ruby.1 that occur before, the ruby installation does some
# formatting of ruby.1 that won't occur if the below changes
# are applied.
# Fix generated rbconfig.rb using /usr/bin/sed; gsed doesn't
# work for some of the commands in rbconfig.sedscript.
> Solaris/ruby.1.sedscript.mod ; \
$(PROTO_RBCONFIG_FILE) > rbconfig.rb.mod ; \
# default LD_OPTION $(LD_B_DIRECT) causes problems--
# during install of ruby, ruby is executed and will core dump
# after compiling with this option
# don't use LD_Z_IGNORE: causes ruby linker problems with
# unreferenced symbol tgetent in libreadline, similar to bug #15617172
# sparc build sometimes fails with studio 12.3 because of 17537968;
# -xO3 worked around the problem. Also, iropt optimizer has a
# an assertion failure when compiling ext/socket/raddrinfo.c,
# (CR 20704428); dropping down to -xO2 works around the bug.
# without this define, config fails frequently on i386 when including
# /usr/include/sys/isa_defs.h with error: "ISA not supported";
# many extensions don't get built and at least one error causes
# the build to fail
# change CONFIGURE_BINDIR.64 because this path will be embedded in
# the header for ruby scripts; we are only building 64-bit,
# so the real path for ruby will not have $(MACH64) in it
# not strictly needed, since ruby doesn't use sbin, but
# change this as well, for consistency with BINDIR
# we are building 64-bit, but most of the ruby libraries (*.rb files)
# are non-bit-specfic text files, so don't put them under lib/$(MACH64).
# The 64-bit *.so libraries will be in the $(MACH64)-solaris$(SOLARIS_VERSION)
# arch directories under lib
# Don't need docs for ruby C source files
# If Ruby is configured with __builtin_setjmp, may cause
# problems with gems compiled with gcc. Studio compiler doesn't
# report an error for __builtin_setjmp, but gcc would.
# ensure we use the 64-bit configuration file, not the 32-bit one
# ffi_raw_size(), although its prototype is in libffi's
# /usr/lib/libffi-3.0/include/ffi.h header file.
# Defining FFI_NO_RAW_API avoids use of ffi_raw_size().
# This is a workaround to bug
# 17349280 - libffi is missing ffi_raw_size()
# keep ASLR disabled;
# miniruby may core dump on sparc during build
# Some tests produce warnings if HTTP_PROXY is set
COMPONENT_TEST_ENV += "--unset=HTTP_PROXY"
# This set of tests goes through thousands of entries in the passwd
# and group table, taking hours to run; move it aside so we skip it.
# There may also be spurious errors if group memberships are modified
# during testing.
# common targets
test: $(TEST_64)