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