components/python/python35/Makefile
author Enrico Perla <enrico.perla@oracle.com>
Fri, 06 May 2016 09:33:24 -0700
changeset 5936 56a9d82c570e
parent 5846 8ea1051b8f11
child 6447 56a2f066191a
permissions -rw-r--r--
21658934 Python is not ADI-safe
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4912
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     1
#
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     3
#
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     7
#
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    12
#
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    18
#
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    20
#
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    21
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    22
#
5468
46526e9c171d 22743766 new {open,fork}pty functions break Python test_pty
John Beck <John.Beck@Oracle.COM>
parents: 5184
diff changeset
    23
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4912
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    24
#
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    25
include ../../../make-rules/shared-macros.mk
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    26
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    27
COMPONENT_NAME=		Python
5184
6c2a9525f3a4 22332010 upgrade Python to 3.5.1
John Beck <John.Beck@Oracle.COM>
parents: 5066
diff changeset
    28
COMPONENT_VERSION=	3.5.1
4912
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    29
COMPONENT_PROJECT_URL=	http://python.org/
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    30
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    31
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.xz
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    32
COMPONENT_ARCHIVE_HASH=	\
5184
6c2a9525f3a4 22332010 upgrade Python to 3.5.1
John Beck <John.Beck@Oracle.COM>
parents: 5066
diff changeset
    33
    sha256:c6d57c0c366d9060ab6c0cdf889ebf3d92711d466cc0119c441dbf2746f725c9
6c2a9525f3a4 22332010 upgrade Python to 3.5.1
John Beck <John.Beck@Oracle.COM>
parents: 5066
diff changeset
    34
COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
4912
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    35
COMPONENT_SIG_URL=	$(COMPONENT_ARCHIVE_URL).asc
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    36
COMPONENT_BUGDB=	utility/python
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    37
5184
6c2a9525f3a4 22332010 upgrade Python to 3.5.1
John Beck <John.Beck@Oracle.COM>
parents: 5066
diff changeset
    38
TPNO=			25978
4912
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    39
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    40
include $(WS_MAKE_RULES)/prep.mk
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    41
include $(WS_MAKE_RULES)/configure.mk
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    42
include $(WS_MAKE_RULES)/ips.mk
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    43
include $(WS_MAKE_RULES)/lint-libraries.mk
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    44
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    45
# Need to preserve timestamp for Grammar files.  If the pickle files are older,
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    46
# Python will try to rebuild them.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    47
PKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.txt
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    48
PKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.pickle
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    49
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    50
# We patch auto* files, so regenerate headers and configure
4978
055c17ca3402 22065993 python Makefiles should use autoconf -f
John Beck <John.Beck@Oracle.COM>
parents: 4912
diff changeset
    51
COMPONENT_PREP_ACTION = (cd $(@D) ; autoheader ; autoconf -f)
4912
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    52
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    53
# The DTrace patch needs this file to be mode 0755.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    54
COMPONENT_PRE_BUILD_ACTION=($(CHMOD) +x \
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    55
    $(SOURCE_DIR)/Include/pydtrace_offsets.sh)
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    56
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    57
# we don't want to leak $(CC_BITS) into BASECFLAGS as it causes problems with
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    58
# python-config
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    59
CC +=	$(CFLAGS)
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    60
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    61
C99MODE=
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    62
CPPFLAGS +=	-IPython
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    63
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    64
# to find the ncurses headers
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    65
CPPFLAGS +=	-I/usr/include/ncurses
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    66
# enable large files how they did in JDS
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    67
CPPFLAGS +=	-D_LARGEFILE64_SOURCE
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    68
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    69
# libffi for _ctypes
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    70
CPPFLAGS +=	$(shell pkg-config --cflags-only-I libffi)
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    71
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    72
# because python links with $(CC) ... $(LDFLAGS) ...
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    73
LDFLAGS =	$(CC_BITS) $(CC_PIC)
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    74
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    75
# build pic
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    76
CFLAGS +=	$(CC_PIC)
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    77
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    78
# for DWARF
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    79
CFLAGS.i386 =	-preserve_argvalues=complete
5936
56a9d82c570e 21658934 Python is not ADI-safe
Enrico Perla <enrico.perla@oracle.com>
parents: 5846
diff changeset
    80
# Use the Studio VIS SDK in order to explicitly generate nonfaulting loads
56a9d82c570e 21658934 Python is not ADI-safe
Enrico Perla <enrico.perla@oracle.com>
parents: 5846
diff changeset
    81
# that allow Python to work with ADI-aware memory allocators.
56a9d82c570e 21658934 Python is not ADI-safe
Enrico Perla <enrico.perla@oracle.com>
parents: 5846
diff changeset
    82
CFLAGS.studio.sparc.64 =	-xvis
56a9d82c570e 21658934 Python is not ADI-safe
Enrico Perla <enrico.perla@oracle.com>
parents: 5846
diff changeset
    83
4912
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    84
CFLAGS +=	$(CFLAGS.$(MACH))
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    85
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    86
# 16-byte memory alignment + interpretation of non-alignment prevents SIGBUS.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    87
studio_ALIGN.sparc.64 = -xmemalign=16i
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    88
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    89
# The python build is profile-guided for studio; to see the benefits of that,
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    90
# Python must be compiled with -xO5 and a different build target must be used.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    91
# Use of xprofile requires that the same options be used during compilation and
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    92
# linking.  The targets chosen are based on Solaris 11 minimum supported system
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    93
# requirements.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    94
COMPONENT_BUILD_TARGETS = profile-opt
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    95
XPROFILE_DIR = $(BUILD_DIR_$(BITS))/.profile
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    96
PYFLAGS.i386 = -xtarget=opteron -xarch=sse2 -xcache=generic
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    97
PYFLAGS.sparc =
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    98
CFLAGS += -xO5 $(PYFLAGS.$(MACH))
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    99
LDFLAGS += -xO5 $(PYFLAGS.$(MACH))
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   100
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   101
# Python puts its header files in a special place.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   102
LINT_FLAGS +=	-I$(SOURCE_DIR)/Include
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   103
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   104
# PYTHONPATH in the environment can be harmful, but setting it to empty via
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   105
# _INSTALL_ENV causes problems too, so just ignore the entire environment.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   106
# Because of this, we need to specify PATH in multiple places below.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   107
ENV +=				-i
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   108
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   109
CONFIGURE_ENV +=		PATH="$(PATH)"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   110
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   111
CONFIGURE_OPTIONS  +=		--infodir=$(CONFIGURE_INFODIR)
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   112
CONFIGURE_OPTIONS  +=		--enable-shared
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   113
CONFIGURE_OPTIONS  +=		--with-dtrace
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   114
CONFIGURE_OPTIONS  +=		--with-system-expat
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   115
CONFIGURE_OPTIONS  +=		--with-system-ffi
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   116
CONFIGURE_OPTIONS  +=		--without-gcc
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   117
CONFIGURE_OPTIONS  +=		--without-ensurepip
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   118
CONFIGURE_OPTIONS  +=		--enable-ipv6
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   119
CONFIGURE_OPTIONS  +=		--bindir=/usr/bin
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   120
CONFIGURE_OPTIONS  +=		"ac_cv_func_getentropy=no"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   121
CONFIGURE_OPTIONS  +=		CPPFLAGS="$(CPPFLAGS)"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   122
CONFIGURE_OPTIONS  +=		LDFLAGS="$(LDFLAGS)"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   123
CONFIGURE_OPTIONS  +=		CFLAGS="$(CFLAGS)"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   124
CONFIGURE_OPTIONS  +=		DFLAGS="-$(BITS)"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   125
CONFIGURE_OPTIONS  +=		XPROFILE_DIR="$(XPROFILE_DIR)"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   126
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   127
COMPONENT_BUILD_ENV  +=		DFLAGS="-$(BITS)"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   128
COMPONENT_BUILD_ENV  +=		XPROFILE_DIR="$(XPROFILE_DIR)"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   129
COMPONENT_BUILD_ENV  +=		PATH="$(PATH)"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   130
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   131
# Some tests have non-ASCII characters encoded for international domain names;
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   132
# the publish step will fail in 'pkgdepend generate' without this:
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   133
COMPONENT_PUBLISH_ENV  +=	LC_ALL=en_US.UTF-8
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   134
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   135
# 64 bit shared objects need to go in a 64-bit directory
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   136
COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python3.5/lib-dynload
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   137
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   138
ASLR_MODE = $(ASLR_ENABLE)
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   139
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   140
# Simplify the definitions of CC, CXX, CFLAGS and LDFLAGS so they hard-code
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   141
# neither paths from our build systems nor Studio-specific options.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   142
COMPONENT_PRE_INSTALL_ACTION= \
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   143
    (cd $(@D) ; \
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   144
     $(GSED) -i -e 's/^CC=.*/CC=\t\tcc/' -e 's/^CXX=.*/CXX=\t\tCC/' \
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   145
	-e 's/^CFLAGS=.*/CFLAGS=\t\t\$$\(BASECFLAGS) \$$\(OPT) \$$\(EXTRA_CFLAGS)/' \
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   146
	-e 's|^LDFLAGS=.*|LDFLAGS=|' Makefile)
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   147
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   148
# Because we stripped the Makefile above, we need to pass several things in the
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   149
# environment, and use -e to tell gmake to pay attention to the environment.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   150
COMPONENT_INSTALL_ENV +=	CC="$(CC)"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   151
COMPONENT_INSTALL_ENV +=	CXX="$(CXX)"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   152
COMPONENT_INSTALL_ENV +=	CFLAGS="$(CFLAGS)"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   153
COMPONENT_INSTALL_ENV +=	LDFLAGS="$(LDFLAGS)"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   154
COMPONENT_INSTALL_ENV +=	PATH="$(PATH)"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   155
COMPONENT_INSTALL_ARGS +=	-e
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   156
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   157
# Strip build machine paths from _sysconfigdata.py & config/Makefile,
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   158
# then (re)compile _sysconfigdata.py since we just updated it.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   159
# Note that once Python 3.5 has been integrated and propagated to build
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   160
# machines, then the LD_LIBRARY_PATH setting and PROTO_DIR prefix below
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   161
# can both be removed.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   162
COMPONENT_POST_INSTALL_ACTION= \
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   163
    (cd $(PROTOUSRLIBDIR)/python3.5 ; \
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   164
     $(GSED) -i -e 's|$(SOURCE_DIR)|.|g' -e 's|$(COMPONENT_DIR)|..|g' \
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   165
	-e 's|$(SPRO_VROOT)/bin/||g' _sysconfigdata.py config-3.5m/Makefile; \
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   166
	LD_LIBRARY_PATH=$(PROTOUSRLIBDIR64) $(PROTO_DIR)$(PYTHON.3.5) -m py_compile _sysconfigdata.py)
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   167
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   168
# common targets
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   169
configure:	$(CONFIGURE_64)
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   170
build:		$(BUILD_64)
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   171
install:	$(INSTALL_64)
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   172
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   173
# Using "-uall,-network" ensures all tests are run except the network tests.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   174
# The network tests contain many expected failures when run behind a firewall.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   175
# The "-v" ensures verbose mode.  You can set TESTOPTS_PYTHON_TEST to a
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   176
# particular test if you want to run just one test.  For example,
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   177
# $ TESTOPTS_PYTHON_TEST=test_sys gmake -k test
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   178
# Note that when a test succeeds, the builds/*/.tested file gets created.  You
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   179
# may need to remove these files, or run "gmake clobber" or "gmake clean"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   180
# between tests.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   181
#
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   182
COMPONENT_TEST_ENV = EXTRATESTOPTS="-v -uall,-network $(TESTOPTS_PYTHON_TEST)"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   183
# The distutils tests need $CC in $PATH.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   184
COMPONENT_TEST_ENV += PATH="$(SPRO_VROOT)/bin:$(PATH)"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   185
# Prevent the tests from getting stuck waiting for input.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   186
COMPONENT_TEST_TARGETS = test < /dev/null
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   187
# Some different values for system testing.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   188
COMPONENT_SYSTEM_TEST_ENV = EXTRATESTOPTS="-v -uall,-network $(TESTOPTS_PYTHON_TEST)"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   189
COMPONENT_SYSTEM_TEST_TARGETS = 
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   190
COMPONENT_SYSTEM_TEST_CMD=    $(PYTHON.3.5)
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   191
COMPONENT_SYSTEM_TEST_ARGS=   /usr/lib/python3.5/test/regrtest.py -v -uall,-network
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   192
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   193
# The test output contains details from each test, in whatever order they
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   194
# complete.  The default _TRANSFORMER is not powerful enough to deal with
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   195
# this; we need heavier artillery.  Extract just the sections that start
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   196
# with "tests OK." and end with "Re-running failed tests..." for comparison.
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   197
COMPONENT_TEST_TRANSFORMER =	$(NAWK)
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   198
COMPONENT_TEST_TRANSFORMS =	"'/tests OK./ {results = 1}; /Re-running failed tests in verbose mode/ {results = 0} {if (results) print $0 } '"
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   199
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   200
test:				$(TEST_64)
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   201
system-test:			$(SYSTEM_TEST_64)
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   202
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   203
REQUIRED_PACKAGES += compress/bzip2
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   204
REQUIRED_PACKAGES += compress/xz
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   205
REQUIRED_PACKAGES += database/sqlite-3
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   206
REQUIRED_PACKAGES += library/database/gdbm
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   207
REQUIRED_PACKAGES += library/expat
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   208
REQUIRED_PACKAGES += library/libffi
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   209
REQUIRED_PACKAGES += library/ncurses
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   210
REQUIRED_PACKAGES += library/readline
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   211
REQUIRED_PACKAGES += library/security/openssl
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   212
REQUIRED_PACKAGES += library/zlib
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   213
REQUIRED_PACKAGES += runtime/tcl-8
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   214
REQUIRED_PACKAGES += runtime/tk-8
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   215
REQUIRED_PACKAGES += system/library/math
0b79e9575718 PSARC 2015/414 Python 3.5
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   216
REQUIRED_PACKAGES += x11/library/libx11