Makefile revision 3477
b0e8629055a766d4555a005a283c2889a5974945Mark Andrews# CDDL HEADER START
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The contents of this file are subject to the terms of the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# 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
1224c3b69b3d18f7127aa042644936af25a2d679Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# CDDL HEADER END
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# I want to override PERL_VERSION and PERL_ARCH because when building
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# a new version of perl it probably isn't installed so shared-macros.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# can't call it.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews sha256:10749417fd3010aae320a34181ad4cd6a4855c1fc63403b87fa4d630b18e966c
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_ARCHIVE_URL= http://www.cpan.org/src/5.0/$(COMPONENT_ARCHIVE)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Override these compiler settings because they are causing problems
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# in the ON build of the contrib components.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# ON doesn't use or need these settings or the compiler has some of them
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# on by default.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# This also produces a perl more inline with past perl's. For better
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The extra Configure parameters (cf_email, cf_by, myhostname) and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# the gawk and sed that follow are attempting to sanatize the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# resulting config.sh of values from our build environment that
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# are discoverable in perl's config via "perl -V".
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# I'm assuming our compilers live on a path that contains "SUNWspro".
c247e3f281613fabe1af362e9f3157e35ebbe52cMark Andrews# If that changes the sed filter needs to change.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# That last bit re-runs bison to regenerate perly.h.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -Dsitelib=/usr/perl5/site_perl/$(PERL_VERSION) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -Dvendorlib=/usr/perl5/vendor_perl/$(PERL_VERSION) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -Dcf_email="userland-discuss@opensolaris.org" \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews '/^myuname=/{print $$1" localhost "$$3" "$$5" "$$6" "$$7"\047"} ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews sed -e 's/[^ ]*SUNWspro[^ ]*//g' > config.sh ) ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ( $(RM) $(@D)/perly.act $(@D)/perly.tab $(@D)/perly.h; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# perl's install path for sparc is based off the value of the
1224c3b69b3d18f7127aa042644936af25a2d679Mark Andrews# "arch" command. So we must package that way also.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Put studio compilers in PATH so we can tell Configure and gmake just
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# use cc. Trying to avoid the full path so it doesn't end up in
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# perl's config.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_BUILD_ENV += PATH=$(dir $(CC.studio.32)):$(PATH)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# ST=single-thread. MT=multi-thread. The only difference in the build is that
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# $(CONFIGURE_THREAD_OPTIONS) gets added to $(CONFIGURE_OPTIONS) in the MT case.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(MT_VARIANT)/.configured: CONFIGURE_OPTIONS += $(CONFIGURE_THREAD_OPTIONS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews # All tests should pass.