Makefile revision 215
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# CDDL HEADER START
a7c412f37cc73d0332887a746e81220cbf09dd00Mark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# The contents of this file are subject to the terms of the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# Common Development and Distribution License (the "License").
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# You may not use this file except in compliance with the License.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# or http://www.opensolaris.org/os/licensing.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# See the License for the specific language governing permissions
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# and limitations under the License.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# When distributing Covered Code, include this CDDL HEADER in each
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# If applicable, add the following below this CDDL HEADER, with the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# CDDL HEADER END
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsinclude ../../make-rules/shared-macros.mk
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
dbb012765c735ee0d82dedb116cdc7cf18957814Evan HuntCOMPONENT_NAME= perl
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsCOMPONENT_VERSION= 5.12.3
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsPERL_VERSION= 5.12
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsCOMPONENT_ARCHIVE_HASH= sha1:86d77c6cbc7a60068dc14c88ffd0729324d1174f
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsCOMPONENT_ARCHIVE_URL= http://www.cpan.org/src/5.0/$(COMPONENT_ARCHIVE)
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsinclude ../../make-rules/prep.mk
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsinclude ../../make-rules/justmake.mk
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsinclude ../../make-rules/ips.mk
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# Override these compiler settings because they are causing problems
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# in the ON build of the contrib components.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# ON doesn't use or need these settings or the compiler has some of them
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# on by default.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# This also produces a perl more inline with past perl's. For better
2ae159b376dac23870d8005563c585acf85a4b5aEvan Hunt# or worse.
2ae159b376dac23870d8005563c585acf85a4b5aEvan Hunt#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsstudio_XBITS=
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsstudio_XREGS=
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsstudio_IROPTS=
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsstudio_C99MODE=
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsstudio_ALIGN=
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsstudio_MT=
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# The extra Configure parameters (cf_email, cf_by, myhostname) and
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# the gawk and sed that follow are attempting to sanatize the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# resulting config.sh of values from our build environment that
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# are discoverable in perl's config via "perl -V".
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# I'm assuming our compilers live on a path that contains "SUNWspro".
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# If that changes the sed filter needs to change.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsCOMPONENT_PRE_BUILD_ACTION= \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews (cd $(@D); $(ENV) -i \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews MAKE=$(GMAKE) \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews PATH=$(dir $(CC.studio.32)):$(PATH) \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews $(CONFIG_SHELL) ./Configure \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews -Dprefix=/usr/perl5/$(PERL_VERSION) \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews -Dprivlib=/usr/perl5/$(PERL_VERSION)/lib \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews -Dsitelib=/usr/perl5/site_perl/$(PERL_VERSION) \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews -Dvendorprefix=/usr/perl5/$(PERL_VERSION) \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews -Dvendorlib=/usr/perl5/vendor_perl/$(PERL_VERSION) \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews -Dlibperl=libperl.so \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews -Duseshrplib \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews -Dusedtrace \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews -Duse64bitint \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews -Dcc="cc" \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews -Doptimize="$(CFLAGS.studio)" \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews -Dcf_email="perl-bugs@sun.com" \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews -Dcf_by="perl-bugs" \
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt -Dmyhostname="localhost" \
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt -O \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews -de ) ; \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews (cd $(@D); \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews cp config.sh config.sh_orig ; \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews gawk \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews '/^myuname=/{print $$1" localhost "$$3" "$$5" "$$6" "$$7"\047"} ; \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews !/^myuname=/ {print}' config.sh_orig \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews | \
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews sed -e 's/[^ ]*SUNWspro[^ ]*//g' > config.sh )
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsCOMPONENT_INSTALL_ENV += DESTDIR="$(PROTO_DIR)"
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# perl's install path for sparc is based off the value of the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# "arch" command. So we must package that way also.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsPKG_MACROS += PERL_ARCH=$(shell arch)
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsPKG_MACROS += PERL_VERSION=$(PERL_VERSION)
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# Put studio compilers in PATH so we can tell Configure and gmake just
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# use cc. Trying to avoid the full path so it doesn't end up in
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# perl's config.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsCOMPONENT_BUILD_ENV += PATH=$(dir $(CC.studio.32)):$(PATH)
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsbuild: $(BUILD_32)
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsinstall: $(INSTALL_32)
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewstest: $(TEST_32)
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews #
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews # 2 expected failures because of the use of cloney in this build.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews # Without cloney all tests pass.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews #
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark AndrewsBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrewsinclude ../../make-rules/depend.mk
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews