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