Makefile revision 5795
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica#
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# CDDL HEADER START
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica#
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# The contents of this file are subject to the terms of the
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# Common Development and Distribution License (the "License").
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# You may not use this file except in compliance with the License.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica#
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# or http://www.opensolaris.org/os/licensing.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# See the License for the specific language governing permissions
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# and limitations under the License.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica#
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# When distributing Covered Code, include this CDDL HEADER in each
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# If applicable, add the following below this CDDL HEADER, with the
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# fields enclosed by brackets "[]" replaced with your own identifying
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# information: Portions Copyright [yyyy] [name of copyright owner]
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica#
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# CDDL HEADER END
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica#
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
3afe87ebb25691cb6d158edaa34a6fb9b703a691Roger A. Faulkner#
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica#
3afe87ebb25691cb6d158edaa34a6fb9b703a691Roger A. Faulkner
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricainclude ../../../make-rules/shared-macros.mk
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaCOMPONENT_NAME= perl
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaCOMPONENT_VERSION= 5.22.1
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaPERL_VERSION_LOCAL= 5.22
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaCOMPONENT_PROJECT_URL= http://www.perl.org/
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaCOMPONENT_ARCHIVE_HASH= \
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica sha256:e98e4075a3167fa40524abe447c30bcca10c60e02a54ee1361eff278947a1221
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaCOMPONENT_ARCHIVE_URL= http://www.cpan.org/src/5.0/$(COMPONENT_ARCHIVE)
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaCOMPONENT_BUGDB= utility/perl
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaTPNO= 26810
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Loweinclude $(WS_MAKE_RULES)/prep.mk
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Loweinclude $(WS_MAKE_RULES)/configure.mk
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Loweinclude $(WS_MAKE_RULES)/ips.mk
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaifeq ($(strip $(PARFAIT_BUILD)),yes)
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaPATH=$(PARFAIT_TOOLS):$(SPRO_VROOT)/bin:/usr/bin
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricaendif
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica#
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# Override these compiler settings because they are causing problems
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# in the ON build of the contrib components.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# ON doesn't use or need these settings or the compiler has some of them
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# on by default.
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01rica# This also produces a perl more inline with past perl's. For better
3afe87ebb25691cb6d158edaa34a6fb9b703a691Roger A. Faulkner# or worse.
3afe87ebb25691cb6d158edaa34a6fb9b703a691Roger A. Faulkner#
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricastudio_XBITS=
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricastudio_XREGS=
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricastudio_IROPTS=
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricastudio_C99MODE=
f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01ricastudio_ALIGN=
studio_MT=
# Sparc optimization -xO4 causes issues with dtrace probes on Sparc
studio_OPT.sparc.64=-xO3
CONFIGURE_SCRIPT = $(SOURCE_DIR)/Configure
CONFIGURE_ENV += MAKE=$(GMAKE)
CONFIGURE_ENV += PATH=$(dir $(CC)):$(PATH)
# -Dperl_static_inline="static" turns OFF "static inline".
# This was added because Configure probes
# for static inline (C99 feature) and finds it in our default Studio
# compiler. But in the ON build of the perl add-ons, sun-solaris, the
# shadow build with gcc 3.4.3 doesn't understand static inline so errors.
#
CONFIGURE_OPTIONS = \
-de \
-Dmksymlinks \
-Ulocincpth= \
-Dbin=/usr/perl5/$(PERL_VERSION_LOCAL)/bin \
-Dcc="cc" \
-Dcf_email="discuss@solaris-userland.java.net" \
-Dcf_by="perl-bugs" \
-Dlibperl=libperl.so \
-Dmyhostname="localhost" \
-Dperl_static_inline="static" \
-Dprefix=/usr/perl5/$(PERL_VERSION_LOCAL) \
-Dprivlib=/usr/perl5/$(PERL_VERSION_LOCAL)/lib \
-Dsitelib=/usr/perl5/site_perl/$(PERL_VERSION_LOCAL) \
-Dsiteprefix=/usr/perl5/$(PERL_VERSION_LOCAL) \
-Dvendorlib=/usr/perl5/vendor_perl/$(PERL_VERSION_LOCAL) \
-Dvendorprefix=/usr/perl5/$(PERL_VERSION_LOCAL) \
-Duseshrplib \
-Dusedtrace \
-Duse64bitall \
-Dusethreads \
-Dlibpth="/lib/64 /usr/lib/64" \
-Doptimize="$(CFLAGS.studio)"
#
# 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_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 )
#
# 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)):$(PATH)
COMPONENT_INSTALL_ENV += PATH=$(dir $(CC)):$(PATH)
COMPONENT_INSTALL_ENV += DESTDIR="$(PROTO_DIR)"
COMPONENT_TEST_ENV += PATH=$(dir $(CC)):$(PATH)
#
# Getting 1 different result between sparc and x86.
#
COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master
#
# Throw out everything prior to test results.
# 2 x delete timings
#
COMPONENT_TEST_TRANSFORMS += \
'-e "1,/runtests choose/d"' \
'-e "/^u=/d" ' \
'-e "/^Elapsed/d"'
#
# perl's install path for sparc is based off the value of the
# "arch" command. So we must package that way also.
#
PKG_MACROS += P_ARCH=$(shell arch)
PKG_MACROS += PERL_VERSION=$(PERL_VERSION_LOCAL)
ASLR_MODE = $(ASLR_ENABLE)
configure: $(CONFIGURE_64)
build: $(BUILD_64)
parfait: PARFAIT_BUILD=yes install
install: $(INSTALL_64)
test: $(TEST_64)
system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
REQUIRED_PACKAGES += database/berkeleydb-5
REQUIRED_PACKAGES += library/database/gdbm
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/math