Makefile revision 1531
407N/A#
407N/A# CDDL HEADER START
407N/A#
407N/A# The contents of this file are subject to the terms of the
407N/A# Common Development and Distribution License (the "License").
407N/A# You may not use this file except in compliance with the License.
407N/A#
407N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
407N/A# or http://www.opensolaris.org/os/licensing.
407N/A# See the License for the specific language governing permissions
407N/A# and limitations under the License.
407N/A#
407N/A# When distributing Covered Code, include this CDDL HEADER in each
407N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
407N/A# If applicable, add the following below this CDDL HEADER, with the
407N/A# fields enclosed by brackets "[]" replaced with your own identifying
407N/A# information: Portions Copyright [yyyy] [name of copyright owner]
407N/A#
407N/A# CDDL HEADER END
407N/A#
407N/A# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
407N/A#
407N/Ainclude ../../make-rules/shared-macros.mk
407N/A
407N/APATH=$(dir $(CC)):/usr/bin:/usr/gnu/bin
407N/A
407N/A# I want to override PERL_VERSION and PERL_ARCH because when building
407N/A# a new version of perl it probably isn't installed so shared-macros.mk
407N/A# can't call it.
407N/A
407N/ACOMPONENT_NAME= perl
407N/ACOMPONENT_VERSION= 5.12.5
407N/APERL_VERSION= 5.12
407N/ACOMPONENT_PROJECT_URL= http://www.perl.org/
407N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
407N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
407N/ACOMPONENT_ARCHIVE_HASH= \
407N/A sha256:10749417fd3010aae320a34181ad4cd6a4855c1fc63403b87fa4d630b18e966c
407N/ACOMPONENT_ARCHIVE_URL= http://www.cpan.org/src/5.0/$(COMPONENT_ARCHIVE)
407N/ACOMPONENT_BUGDB= utility/perl
407N/A
407N/Ainclude ../../make-rules/prep.mk
407N/Ainclude ../../make-rules/configure.mk
407N/Ainclude ../../make-rules/ips.mk
407N/A
407N/A#
407N/A# Override these compiler settings because they are causing problems
407N/A# in the ON build of the contrib components.
407N/A# ON doesn't use or need these settings or the compiler has some of them
407N/A# on by default.
407N/A# This also produces a perl more inline with past perl's. For better
407N/A# or worse.
407N/A#
407N/Astudio_XBITS=
407N/Astudio_XREGS=
407N/Astudio_IROPTS=
407N/Astudio_C99MODE=
407N/Astudio_ALIGN=
407N/Astudio_MT=
407N/A
407N/A#
407N/A# The extra Configure parameters (cf_email, cf_by, myhostname) and
407N/A# the gawk and sed that follow are attempting to sanatize the
407N/A# resulting config.sh of values from our build environment that
407N/A# are discoverable in perl's config via "perl -V".
407N/A# I'm assuming our compilers live on a path that contains "SUNWspro".
407N/A# If that changes the sed filter needs to change.
407N/A#
407N/A
407N/A# That last bit re-runs bison to regenerate perly.h.
407N/A
CONFIGURE_SCRIPT = $(SOURCE_DIR)/Configure
CONFIGURE_ENV += MAKE=$(GMAKE)
CONFIGURE_ENV += PATH=$(dir $(CC)):$(PATH)
CONFIGURE_OPTIONS = \
-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="userland-discuss@opensolaris.org" \
-Dcf_by="perl-bugs" \
-Dmyhostname="localhost" \
-Dmksymlinks \
-O \
-de
COMPONENT_POST_CONFIGURE_ACTION = \
(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 ) ; \
( $(RM) $(@D)/perly.act $(@D)/perly.tab $(@D)/perly.h; \
cd $(@D) ; $(GMAKE) regen_perly )
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)
#
#
# All tests should pass.
#
#
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
include ../../make-rules/depend.mk