Makefile revision 844
0N/A#
0N/A# CDDL HEADER START
0N/A#
0N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License (the "License").
0N/A# You may not use this file except in compliance with the License.
0N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0N/A# or http://www.opensolaris.org/os/licensing.
0N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
0N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
0N/A# information: Portions Copyright [yyyy] [name of copyright owner]
0N/A#
0N/A# CDDL HEADER END
0N/A#
0N/A# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
0N/A#
0N/Ainclude ../../make-rules/shared-macros.mk
0N/A
0N/APATH=$(dir $(CC)):/usr/bin:/usr/gnu/bin
0N/A
0N/A# I want to override PERL_VERSION and PERL_ARCH because when building
0N/A# a new version of perl it probably isn't installed so shared-macros.mk
0N/A# can't call it.
0N/A
0N/ACOMPONENT_NAME= perl
0N/ACOMPONENT_VERSION= 5.12.4
0N/APERL_VERSION= 5.12
0N/ACOMPONENT_PROJECT_URL= http://www.perl.org/
0N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
0N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
0N/ACOMPONENT_ARCHIVE_HASH= \
0N/A sha256:c920fa01a34b7752e8cbbc99c6921b908df60611d84a29c4377e4a798604767e
0N/ACOMPONENT_ARCHIVE_URL= http://www.cpan.org/src/5.0/$(COMPONENT_ARCHIVE)
0N/A
0N/Ainclude ../../make-rules/prep.mk
0N/Ainclude ../../make-rules/justmake.mk
0N/Ainclude ../../make-rules/ips.mk
0N/A
0N/A#
0N/A# Override these compiler settings because they are causing problems
0N/A# in the ON build of the contrib components.
0N/A# ON doesn't use or need these settings or the compiler has some of them
0N/A# on by default.
0N/A# This also produces a perl more inline with past perl's. For better
0N/A# or worse.
0N/A#
0N/Astudio_XBITS=
0N/Astudio_XREGS=
0N/Astudio_IROPTS=
0N/Astudio_C99MODE=
0N/Astudio_ALIGN=
0N/Astudio_MT=
0N/A
0N/A#
0N/A# The extra Configure parameters (cf_email, cf_by, myhostname) and
0N/A# the gawk and sed that follow are attempting to sanatize the
0N/A# resulting config.sh of values from our build environment that
0N/A# are discoverable in perl's config via "perl -V".
0N/A# I'm assuming our compilers live on a path that contains "SUNWspro".
0N/A# If that changes the sed filter needs to change.
0N/A#
0N/A
0N/A# That last bit re-runs bison to regenerate perly.h.
0N/A
0N/ACOMPONENT_PRE_BUILD_ACTION= \
0N/A (cd $(@D); $(ENV) -i \
0N/A MAKE=$(GMAKE) \
0N/A PATH=$(dir $(CC.studio.32)):$(PATH) \
0N/A $(CONFIG_SHELL) ./Configure \
0N/A -Dprefix=/usr/perl5/$(PERL_VERSION) \
0N/A -Dprivlib=/usr/perl5/$(PERL_VERSION)/lib \
0N/A -Dsitelib=/usr/perl5/site_perl/$(PERL_VERSION) \
0N/A -Dvendorprefix=/usr/perl5/$(PERL_VERSION) \
0N/A -Dvendorlib=/usr/perl5/vendor_perl/$(PERL_VERSION) \
0N/A -Dlibperl=libperl.so \
0N/A -Duseshrplib \
0N/A -Dusedtrace \
0N/A -Duse64bitint \
0N/A -Dcc="cc" \
0N/A -Doptimize="$(CFLAGS.studio)" \
0N/A -Dcf_email="userland-discuss@opensolaris.org" \
0N/A -Dcf_by="perl-bugs" \
0N/A -Dmyhostname="localhost" \
0N/A -O \
0N/A -de ) ; \
0N/A (cd $(@D); \
0N/A cp config.sh config.sh_orig ; \
0N/A gawk \
0N/A '/^myuname=/{print $$1" localhost "$$3" "$$5" "$$6" "$$7"\047"} ; \
0N/A !/^myuname=/ {print}' config.sh_orig \
0N/A | \
0N/A sed -e 's/[^ ]*SUNWspro[^ ]*//g' > config.sh ) ; \
0N/A ( $(RM) $(@D)/perly.act $(@D)/perly.tab $(@D)/perly.h; \
0N/A cd $(@D) ; $(GMAKE) regen_perly )
0N/A
0N/ACOMPONENT_INSTALL_ENV += DESTDIR="$(PROTO_DIR)"
0N/A#
0N/A# perl's install path for sparc is based off the value of the
0N/A# "arch" command. So we must package that way also.
0N/A#
0N/APKG_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.
#
# Failed 2 tests out of 1697, 99.88% okay.
# ../cpan/Archive-Tar/t/02_methods.t
# ../lib/File/stat.t
#
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
include ../../make-rules/depend.mk