Makefile revision 3882
dd0228908543562781a4c0d8773ae87d4c530633Mark Andrews# CDDL HEADER START
dd0228908543562781a4c0d8773ae87d4c530633Mark Andrews# The contents of this file are subject to the terms of the
810e8d27763c5d8557239ab321eb125163af9236Mark Andrews# Common Development and Distribution License (the "License").
810e8d27763c5d8557239ab321eb125163af9236Mark Andrews# You may not use this file except in compliance with the License.
15f358ed4ea081793041bbfba70849be472236d3Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15f358ed4ea081793041bbfba70849be472236d3Mark Andrews# See the License for the specific language governing permissions
984c39beed2fee49dda75c4c8a37b7f32bf434bfMark Andrews# and limitations under the License.
984c39beed2fee49dda75c4c8a37b7f32bf434bfMark Andrews# When distributing Covered Code, include this CDDL HEADER in each
c08a03a43116c21cf12dea7cbcb5465588f7955cMark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c08a03a43116c21cf12dea7cbcb5465588f7955cMark Andrews# If applicable, add the following below this CDDL HEADER, with the
c311ed52d45334e182a093efad827fe4cbe7e686Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
c311ed52d45334e182a093efad827fe4cbe7e686Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
79a6a33184abff1999ba13b10922ccb34a2758a5Mark Andrews# CDDL HEADER END
79a6a33184abff1999ba13b10922ccb34a2758a5Mark Andrews# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
2b1c71b134eb92f2e297a56f778838e42f41c880Mark Andrews# I want to override PERL_VERSION and PERL_ARCH because when building
2b1c71b134eb92f2e297a56f778838e42f41c880Mark Andrews# a new version of perl it probably isn't installed so shared-macros.mk
2b1c71b134eb92f2e297a56f778838e42f41c880Mark Andrews# can't call it.
091b098b49a4f84f459abd46451955a18abd6d40Mark AndrewsCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
7d3458a972a902740eb142044655aba6c6ffb9acMark Andrews sha256:10749417fd3010aae320a34181ad4cd6a4855c1fc63403b87fa4d630b18e966c
7d3458a972a902740eb142044655aba6c6ffb9acMark AndrewsCOMPONENT_ARCHIVE_URL= http://www.cpan.org/src/5.0/$(COMPONENT_ARCHIVE)
7f20fd8ebb0cabc8f935381d958f8371990c9212Mark Andrews# Override these compiler settings because they are causing problems
7f20fd8ebb0cabc8f935381d958f8371990c9212Mark Andrews# in the ON build of the contrib components.
8695d7b357789bedff63e5b19c5ab25cd58fcd4bMark Andrews# ON doesn't use or need these settings or the compiler has some of them
8695d7b357789bedff63e5b19c5ab25cd58fcd4bMark Andrews# on by default.
8695d7b357789bedff63e5b19c5ab25cd58fcd4bMark Andrews# This also produces a perl more inline with past perl's. For better
c00a1eb423623442aff428336bb55590f79013bbMark Andrews# The extra Configure parameters (cf_email, cf_by, myhostname) and
1e258716acade52396a8f260b5e19cbf6ca0290aMark Andrews# the gawk and sed that follow are attempting to sanatize the
1e258716acade52396a8f260b5e19cbf6ca0290aMark Andrews# resulting config.sh of values from our build environment that
d972fa317829804a692e46a34b6f27a33f861d9dMark Andrews# are discoverable in perl's config via "perl -V".
d972fa317829804a692e46a34b6f27a33f861d9dMark Andrews# I'm assuming our compilers live on a path that contains "SUNWspro".
4b171ebd702d72200a4d7609f11c5f79d6b6f964Brian Wellington# If that changes the sed filter needs to change.
cceca51fec3b4af660d28e2d3df7242823312eb6Brian Wellington# That last bit re-runs bison to regenerate perly.h.
603d1d1e20fbffc986b3aec93379bb4f6ac37afcMark Andrews -Dsitelib=/usr/perl5/site_perl/$(PERL_VERSION) \
603d1d1e20fbffc986b3aec93379bb4f6ac37afcMark Andrews -Dvendorlib=/usr/perl5/vendor_perl/$(PERL_VERSION) \
2211bec6a0626b681fdf5a8e4406555ef76ddf70Mark Andrews '/^myuname=/{print $$1" localhost "$$3" "$$5" "$$6" "$$7"\047"} ; \
fcb2ecdb52a594a5c0d07c2e98e67c14708c16dfMark Andrews sed -e 's/[^ ]*SUNWspro[^ ]*//g' > config.sh ) ; \
fcb2ecdb52a594a5c0d07c2e98e67c14708c16dfMark Andrews ( $(RM) $(@D)/perly.act $(@D)/perly.tab $(@D)/perly.h; \
b9c80c8bddbb88384d7baef297a873b5f8715e49Mark Andrews# perl's install path for sparc is based off the value of the
b9c80c8bddbb88384d7baef297a873b5f8715e49Mark Andrews# "arch" command. So we must package that way also.
faf23095be9a0b5e2696f2b1f1a260af16e9ebeaMark Andrews# Put studio compilers in PATH so we can tell Configure and gmake just
27269e9dd45b619160f90db1a0f6b2b3f6f4bbb8Mark Andrews# use cc. Trying to avoid the full path so it doesn't end up in
faf23095be9a0b5e2696f2b1f1a260af16e9ebeaMark Andrews# perl's config.
f38c274c217d0a5b791786877422306a0e477e10Mark AndrewsCOMPONENT_BUILD_ENV += PATH=$(dir $(CC.studio.32)):$(PATH)
84ef147b1fa0aed15cade55478ed647d15f7b094Mark Andrews# ST=single-thread. MT=multi-thread. The only difference in the build is that
84ef147b1fa0aed15cade55478ed647d15f7b094Mark Andrews# $(CONFIGURE_THREAD_OPTIONS) gets added to $(CONFIGURE_OPTIONS) in the MT case.
986be654feec852eb9da0d15599f18d0035e569bMark Andrews$(MT_VARIANT)/.configured: CONFIGURE_OPTIONS += $(CONFIGURE_THREAD_OPTIONS)
de36c606c52ad51e5abca6e42faf655937e5ed10Mark Andrews # All tests should pass.