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