Makefile revision 894
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina#
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# CDDL HEADER START
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina#
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# The contents of this file are subject to the terms of the
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# Common Development and Distribution License (the "License").
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# You may not use this file except in compliance with the License.
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina#
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# or http://www.opensolaris.org/os/licensing.
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# See the License for the specific language governing permissions
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# and limitations under the License.
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina#
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# When distributing Covered Code, include this CDDL HEADER in each
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# If applicable, add the following below this CDDL HEADER, with the
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# fields enclosed by brackets "[]" replaced with your own identifying
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# information: Portions Copyright [yyyy] [name of copyright owner]
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina#
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# CDDL HEADER END
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina#
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina#
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březinainclude ../../make-rules/shared-macros.mk
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina
3f32406640d89face5e79244b4d8dab34adb6c7cPavel BřezinaPATH=$(dir $(CC)):/usr/bin:/usr/gnu/bin
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# I want to override PERL_VERSION and PERL_ARCH because when building
28600ab8d160faa24aae379628dd8a58f50d13c6Jakub Hrozek# a new version of perl it probably isn't installed so shared-macros.mk
28600ab8d160faa24aae379628dd8a58f50d13c6Jakub Hrozek# can't call it.
28600ab8d160faa24aae379628dd8a58f50d13c6Jakub Hrozek
28600ab8d160faa24aae379628dd8a58f50d13c6Jakub HrozekCOMPONENT_NAME= perl
28600ab8d160faa24aae379628dd8a58f50d13c6Jakub HrozekCOMPONENT_VERSION= 5.12.4
28600ab8d160faa24aae379628dd8a58f50d13c6Jakub HrozekPERL_VERSION= 5.12
28600ab8d160faa24aae379628dd8a58f50d13c6Jakub HrozekCOMPONENT_PROJECT_URL= http://www.perl.org/
28600ab8d160faa24aae379628dd8a58f50d13c6Jakub HrozekCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
28600ab8d160faa24aae379628dd8a58f50d13c6Jakub HrozekCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
28600ab8d160faa24aae379628dd8a58f50d13c6Jakub HrozekCOMPONENT_ARCHIVE_HASH= \
28600ab8d160faa24aae379628dd8a58f50d13c6Jakub Hrozek sha256:c920fa01a34b7752e8cbbc99c6921b908df60611d84a29c4377e4a798604767e
28600ab8d160faa24aae379628dd8a58f50d13c6Jakub HrozekCOMPONENT_ARCHIVE_URL= http://www.cpan.org/src/5.0/$(COMPONENT_ARCHIVE)
28600ab8d160faa24aae379628dd8a58f50d13c6Jakub Hrozek
28600ab8d160faa24aae379628dd8a58f50d13c6Jakub Hrozekinclude ../../make-rules/prep.mk
28600ab8d160faa24aae379628dd8a58f50d13c6Jakub Hrozekinclude ../../make-rules/justmake.mk
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březinainclude ../../make-rules/ips.mk
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina#
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# Override these compiler settings because they are causing problems
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# in the ON build of the contrib components.
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# ON doesn't use or need these settings or the compiler has some of them
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# on by default.
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# This also produces a perl more inline with past perl's. For better
d2633d922eeed68f92be4248b9172b928c189920Jakub Hrozek# or worse.
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina#
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březinastudio_XBITS=
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březinastudio_XREGS=
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březinastudio_IROPTS=
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březinastudio_C99MODE=
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březinastudio_ALIGN=
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březinastudio_MT=
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina#
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# The extra Configure parameters (cf_email, cf_by, myhostname) and
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# the gawk and sed that follow are attempting to sanatize the
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# resulting config.sh of values from our build environment that
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# are discoverable in perl's config via "perl -V".
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# I'm assuming our compilers live on a path that contains "SUNWspro".
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# If that changes the sed filter needs to change.
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina#
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# That last bit re-runs bison to regenerate perly.h.
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina
3f32406640d89face5e79244b4d8dab34adb6c7cPavel BřezinaCOMPONENT_PRE_BUILD_ACTION= \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina (cd $(@D); $(ENV) -i \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina MAKE=$(GMAKE) \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina PATH=$(dir $(CC.studio.32)):$(PATH) \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina $(CONFIG_SHELL) ./Configure \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina -Dprefix=/usr/perl5/$(PERL_VERSION) \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina -Dprivlib=/usr/perl5/$(PERL_VERSION)/lib \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina -Dsitelib=/usr/perl5/site_perl/$(PERL_VERSION) \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina -Dvendorprefix=/usr/perl5/$(PERL_VERSION) \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina -Dvendorlib=/usr/perl5/vendor_perl/$(PERL_VERSION) \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina -Dlibperl=libperl.so \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina -Duseshrplib \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina -Dusedtrace \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina -Duse64bitint \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina -Dcc="cc" \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina -Doptimize="$(CFLAGS.studio)" \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina -Dcf_email="userland-discuss@opensolaris.org" \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina -Dcf_by="perl-bugs" \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina -Dmyhostname="localhost" \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina -O \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina -de ) ; \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina (cd $(@D); \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina cp config.sh config.sh_orig ; \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina gawk \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina '/^myuname=/{print $$1" localhost "$$3" "$$5" "$$6" "$$7"\047"} ; \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina !/^myuname=/ {print}' config.sh_orig \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina | \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina sed -e 's/[^ ]*SUNWspro[^ ]*//g' > config.sh ) ; \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina ( $(RM) $(@D)/perly.act $(@D)/perly.tab $(@D)/perly.h; \
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina cd $(@D) ; $(GMAKE) regen_perly )
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina
3f32406640d89face5e79244b4d8dab34adb6c7cPavel BřezinaCOMPONENT_INSTALL_ENV += DESTDIR="$(PROTO_DIR)"
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina#
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# perl's install path for sparc is based off the value of the
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# "arch" command. So we must package that way also.
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina#
3f32406640d89face5e79244b4d8dab34adb6c7cPavel BřezinaPKG_MACROS += PERL_ARCH=$(shell arch)
132d6228d981436c5e1ca3ddf486f95ac77e46b6Jakub HrozekPKG_MACROS += PERL_VERSION=$(PERL_VERSION)
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina#
be73b26325bbd9c5a9bf34a32acfdf9b15bda531Lukas Slebodnik# Put studio compilers in PATH so we can tell Configure and gmake just
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# use cc. Trying to avoid the full path so it doesn't end up in
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina# perl's config.
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina#
3f32406640d89face5e79244b4d8dab34adb6c7cPavel BřezinaCOMPONENT_BUILD_ENV += PATH=$(dir $(CC.studio.32)):$(PATH)
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březinabuild: $(BUILD_32)
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březinainstall: $(INSTALL_32)
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březinatest: $(TEST_32)
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina #
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina # 2 expected failures because of the use of cloney in this build.
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina # Without cloney all tests pass.
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina #
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina # Failed 2 tests out of 1697, 99.88% okay.
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina # ../cpan/Archive-Tar/t/02_methods.t
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina # ../lib/File/stat.t
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina #
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina
3f32406640d89face5e79244b4d8dab34adb6c7cPavel BřezinaBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březinainclude ../../make-rules/depend.mk
3f32406640d89face5e79244b4d8dab34adb6c7cPavel Březina