Makefile revision 3901
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# CDDL HEADER START
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# The contents of this file are subject to the terms of the
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# Common Development and Distribution License (the "License").
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# You may not use this file except in compliance with the License.
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# See the License for the specific language governing permissions
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# and limitations under the License.
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# When distributing Covered Code, include this CDDL HEADER in each
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# If applicable, add the following below this CDDL HEADER, with the
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# fields enclosed by brackets "[]" replaced with your own identifying
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# information: Portions Copyright [yyyy] [name of copyright owner]
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# CDDL HEADER END
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# I want to override PERL_VERSION and PERL_ARCH because when building
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# a new version of perl it probably isn't installed so shared-macros.mk
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# can't call it.
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo SorceCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce sha256:10749417fd3010aae320a34181ad4cd6a4855c1fc63403b87fa4d630b18e966c
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo SorceCOMPONENT_ARCHIVE_URL= http://www.cpan.org/src/5.0/$(COMPONENT_ARCHIVE)
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# Override these compiler settings because they are causing problems
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# in the ON build of the contrib components.
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# ON doesn't use or need these settings or the compiler has some of them
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# on by default.
ab967283b710dfa05d11ee5b30c7ac916486ceecSimo Sorce# This also produces a perl more inline with past perl's. For better
233a3c6c48972b177e60d6ef4cecfacd3cf31659Simo Sorce# Sparc optimization -xO4 makes perl dtrace probes broken
233a3c6c48972b177e60d6ef4cecfacd3cf31659Simo Sorce# The extra Configure parameters (cf_email, cf_by, myhostname) and
c9b0071bfcb8eb8c71e40248de46d23aceecc0f3Pavel Reichl# the gawk and sed that follow are attempting to sanatize the
c9b0071bfcb8eb8c71e40248de46d23aceecc0f3Pavel Reichl# resulting config.sh of values from our build environment that
c9b0071bfcb8eb8c71e40248de46d23aceecc0f3Pavel Reichl# are discoverable in perl's config via "perl -V".
dfd71fc92db940b2892cc996911cec03d7b6c52bSimo Sorce# I'm assuming our compilers live on a path that contains "SUNWspro".
f9961e5f82e0ef474d6492371bfdf9e74e208a99Pavel Březina# If that changes the sed filter needs to change.
9cb46bc62f22e0104f1b41a423b014c281ef5fc2Jakub Hrozek# That last bit re-runs bison to regenerate perly.h.
e81deec535d11912b87954c81a1edd768c1386c9Jakub Hrozek -Dsitelib=/usr/perl5/site_perl/$(PERL_VERSION) \
4dd38025efda88f123eac672f87d3cda12f050c8Jakub Hrozek -Dvendorlib=/usr/perl5/vendor_perl/$(PERL_VERSION) \
9118a539a5d59f669f551114f880fe91d6bb8741Jakub Hrozek '/^myuname=/{print $$1" localhost "$$3" "$$5" "$$6" "$$7"\047"} ; \
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce sed -e 's/[^ ]*SUNWspro[^ ]*//g' > config.sh ) ; \
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce ( $(RM) $(@D)/perly.act $(@D)/perly.tab $(@D)/perly.h; \
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# perl's install path for sparc is based off the value of the
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# "arch" command. So we must package that way also.
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# Put studio compilers in PATH so we can tell Configure and gmake just
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# use cc. Trying to avoid the full path so it doesn't end up in
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# perl's config.
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo SorceCOMPONENT_BUILD_ENV += PATH=$(dir $(CC.studio.32)):$(PATH)
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# ST=single-thread. MT=multi-thread. The only difference in the build is that
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce# $(CONFIGURE_THREAD_OPTIONS) gets added to $(CONFIGURE_OPTIONS) in the MT case.
test: $(TEST_32)