components/python/python27/Makefile
author John Beck <John.Beck@Oracle.COM>
Mon, 02 Feb 2015 19:31:12 -0800
branchs11-update
changeset 3789 137fdcb27c8e
parent 3565 2d729d36ded7
child 3793 7befd73326eb
permissions -rw-r--r--
16837431 /usr/lib/python2.7/config/Makefile is incorrect
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     1
#
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     3
#
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     7
#
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    12
#
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    18
#
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    20
#
2914
4f1967424876 18065425 parfait gcc wrappers should force gcc3 for now
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 2434
diff changeset
    21
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    22
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    23
#
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    24
include ../../../make-rules/shared-macros.mk
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    25
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    26
PATH=/usr/bin:/usr/gnu/bin:/usr/sbin
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    27
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    28
COMPONENT_NAME=		Python
3565
2d729d36ded7 20230129 update Python 2.7 line to version 2.7.9
John Beck <John.Beck@Oracle.COM>
parents: 3367
diff changeset
    29
COMPONENT_VERSION=	2.7.9
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 578
diff changeset
    30
COMPONENT_PROJECT_URL=	http://python.org/
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    31
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
3367
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
    32
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.xz
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    33
COMPONENT_ARCHIVE_HASH=	\
3565
2d729d36ded7 20230129 update Python 2.7 line to version 2.7.9
John Beck <John.Beck@Oracle.COM>
parents: 3367
diff changeset
    34
    sha256:90d27e14ea7e03570026850e2e50ba71ad20b7eb31035aada1cf3def8f8d4916
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 578
diff changeset
    35
COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
3565
2d729d36ded7 20230129 update Python 2.7 line to version 2.7.9
John Beck <John.Beck@Oracle.COM>
parents: 3367
diff changeset
    36
COMPONENT_SIG_URL=	$(COMPONENT_ARCHIVE_URL).asc
2434
6c9bb5cf5610 15930486 - Auto-generation of Userland gate list for the Solaris 11 Update Release
Rich Burridge <rich.burridge@oracle.com>
parents: 896
diff changeset
    37
COMPONENT_BUGDB=	utility/python
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    38
3565
2d729d36ded7 20230129 update Python 2.7 line to version 2.7.9
John Beck <John.Beck@Oracle.COM>
parents: 3367
diff changeset
    39
TPNO=			20750
3367
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
    40
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    41
include $(WS_TOP)/make-rules/prep.mk
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    42
include $(WS_TOP)/make-rules/configure.mk
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    43
include $(WS_TOP)/make-rules/ips.mk
578
4f51372decaf 7053223 python needs lint libraries
Danek Duvall <danek.duvall@oracle.com>
parents: 458
diff changeset
    44
include $(WS_TOP)/make-rules/lint-libraries.mk
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    45
3367
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
    46
# Need to preserve timestamp for Grammar files.  If the pickle files are older, 
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
    47
# Python will try to rebuild them.  
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
    48
PKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.txt
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
    49
PKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.pickle
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
    50
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    51
# We patch auto* files, so regenerate headers and configure
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    52
COMPONENT_PREP_ACTION = \
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    53
	(cd $(@D) ; autoheader ; autoconf)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    54
896
50be262e44f7 7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents: 885
diff changeset
    55
# we don't want to leak $(CC_BITS) into BASECFLAGS as it causes problems with
50be262e44f7 7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents: 885
diff changeset
    56
# python-config
50be262e44f7 7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents: 885
diff changeset
    57
CC +=	$(CFLAGS)
50be262e44f7 7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents: 885
diff changeset
    58
50be262e44f7 7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents: 885
diff changeset
    59
C99MODE=
50be262e44f7 7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents: 885
diff changeset
    60
CPPFLAGS +=	-IPython
50be262e44f7 7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents: 885
diff changeset
    61
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    62
# to find the ncurses headers
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    63
CPPFLAGS +=	-I/usr/include/ncurses
896
50be262e44f7 7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents: 885
diff changeset
    64
# enable large files how they did in JDS
50be262e44f7 7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents: 885
diff changeset
    65
CPPFLAGS +=	-D_LARGEFILE64_SOURCE
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    66
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    67
# libffi for _ctypes
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    68
CPPFLAGS +=	$(shell pkg-config --cflags-only-I libffi)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    69
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    70
# because python links with $(CC) ... $(LDFLAGS) ...
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    71
LDFLAGS =	$(CC_BITS) $(CC_PIC)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    72
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    73
# build pic
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    74
CFLAGS +=	$(CC_PIC)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    75
634
bd9c94f9f6e0 6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents: 609
diff changeset
    76
# The python build is profile-guided for studio; to see the benefits of that,
bd9c94f9f6e0 6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents: 609
diff changeset
    77
# Python must be compiled with -xO5 and a different build target must be used.
bd9c94f9f6e0 6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents: 609
diff changeset
    78
# Use of xprofile requires that the same options be used during compilation and
bd9c94f9f6e0 6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents: 609
diff changeset
    79
# linking.  The targets chosen are based on Solaris 11 minimum supported system
bd9c94f9f6e0 6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents: 609
diff changeset
    80
# requirements.
bd9c94f9f6e0 6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents: 609
diff changeset
    81
COMPONENT_BUILD_TARGETS = profile-opt
bd9c94f9f6e0 6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents: 609
diff changeset
    82
XPROFILE_DIR = $(BUILD_DIR_$(BITS))/.profile
2914
4f1967424876 18065425 parfait gcc wrappers should force gcc3 for now
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 2434
diff changeset
    83
PYFLAGS.i386 = -xtarget=opteron -xarch=sse2 -xcache=generic
634
bd9c94f9f6e0 6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents: 609
diff changeset
    84
PYFLAGS.sparc =
bd9c94f9f6e0 6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents: 609
diff changeset
    85
CFLAGS += -xO5 $(PYFLAGS.$(MACH))
bd9c94f9f6e0 6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents: 609
diff changeset
    86
LDFLAGS += -xO5 $(PYFLAGS.$(MACH))
bd9c94f9f6e0 6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents: 609
diff changeset
    87
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    88
# add /usr/gnu/lib to the library search/run path
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    89
LDFLAGS.32 = -R/usr/gnu/lib -L/usr/gnu/lib
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    90
LDFLAGS.64 = -R/usr/gnu/lib/$(MACH64) -L/usr/gnu/lib/$(MACH64)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    91
LDFLAGS += $(LDFLAGS.$(BITS))
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    92
578
4f51372decaf 7053223 python needs lint libraries
Danek Duvall <danek.duvall@oracle.com>
parents: 458
diff changeset
    93
# Python puts its header files in a special place.
4f51372decaf 7053223 python needs lint libraries
Danek Duvall <danek.duvall@oracle.com>
parents: 458
diff changeset
    94
LINT_FLAGS +=	-I$(SOURCE_DIR)/Include
4f51372decaf 7053223 python needs lint libraries
Danek Duvall <danek.duvall@oracle.com>
parents: 458
diff changeset
    95
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    96
CONFIGURE_OPTIONS  +=		--infodir=$(CONFIGURE_INFODIR)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    97
CONFIGURE_OPTIONS  +=		--enable-shared
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    98
CONFIGURE_OPTIONS  +=		--with-system-expat
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    99
CONFIGURE_OPTIONS  +=		--with-system-ffi
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   100
CONFIGURE_OPTIONS  +=		--without-gcc
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   101
CONFIGURE_OPTIONS  +=		--enable-ipv6
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   102
CONFIGURE_OPTIONS  +=		CPPFLAGS="$(CPPFLAGS)"
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   103
CONFIGURE_OPTIONS  +=		LDFLAGS="$(LDFLAGS)"
896
50be262e44f7 7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents: 885
diff changeset
   104
CONFIGURE_OPTIONS  +=		CFLAGS="$(CFLAGS)"
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   105
CONFIGURE_OPTIONS  +=		DFLAGS="-$(BITS)"
634
bd9c94f9f6e0 6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents: 609
diff changeset
   106
CONFIGURE_OPTIONS  +=		XPROFILE_DIR="$(XPROFILE_DIR)"
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   107
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   108
COMPONENT_BUILD_ENV  +=		DFLAGS="-$(BITS)"
634
bd9c94f9f6e0 6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents: 609
diff changeset
   109
COMPONENT_BUILD_ENV  +=		XPROFILE_DIR="$(XPROFILE_DIR)"
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   110
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   111
# 64 bit shared objects need to go in a 64-bit directory
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   112
COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.7/lib-dynload
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   113
3789
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   114
# Simplify the definitions of CC, CXX, CFLAGS and LDFLAGS so they hard-code
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   115
# neither paths from our build systems nor Studio-specific options.
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   116
COMPONENT_PRE_INSTALL_ACTION= \
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   117
            (cd $(@D) ; $(GSED) -i -e 's/^CC=.*/CC=\t\tcc/' \
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   118
		-e 's/^CXX=.*/CXX=\t\tCC/' \
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   119
		-e 's/^CFLAGS=.*/CFLAGS=\t\t\$$\(BASECFLAGS) \$$\(OPT) \$$\(EXTRA_CFLAGS)/' \
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   120
		-e 's|^LDFLAGS=.*|LDFLAGS=|' \
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   121
		Makefile)
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   122
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   123
# Because we stripped the Makefile above, we need to pass several things in the
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   124
# environment, and use -e to tell gmake to pay attention to the environment.
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   125
COMPONENT_INSTALL_ENV +=	CC="$(CC)"
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   126
COMPONENT_INSTALL_ENV +=	CXX="$(CXX)"
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   127
COMPONENT_INSTALL_ENV +=	CFLAGS="$(CFLAGS)"
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   128
COMPONENT_INSTALL_ENV +=	LDFLAGS="$(LDFLAGS)"
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   129
COMPONENT_INSTALL_ARGS +=	-e
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   130
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   131
# 1. Setup pyconfig.h file to support 32 & 64 bit.
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   132
# 2. If the /usr/lib/python2.7/lib2to3/*.pickle files are older than the
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   133
#    related *.txt files in the same directory, it will rebuild them any time
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   134
#    you try to build a Python module.  So here we also touch the pickle files
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   135
#    to avoid this.
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   136
# 3. Strip build machine paths from _sysconfigdata.py & config/Makefile.
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   137
#    Note that although the 64-bit version is not used (and thus commented
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   138
#    out in the manifest), we still need to specify the 32-/64-bit paths,
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   139
#    otherwise the 64-bit build will fail to find the 32-bit path.
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   140
CONFIG_MAKEFILE.32=	lib/python2.7/config/Makefile
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   141
CONFIG_MAKEFILE.64=	lib/$(MACH64)/python2.7/config/Makefile
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   142
CONFIG_MAKEFILE=	$(CONFIG_MAKEFILE.$(BITS))
3367
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   143
COMPONENT_POST_INSTALL_ACTION= \
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   144
            (cd $(PROTOUSRDIR) ;  \
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   145
             $(MV) include/python2.7/pyconfig.h include/python2.7/pyconfig-$(BITS).h ; \
3789
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   146
             $(TOUCH) lib/python2.7/lib2to3/*.pickle ; \
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   147
	     $(GSED) -i -e 's|$(SOURCE_DIR)|.|g' -e 's|$(COMPONENT_DIR)|..|g' \
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   148
		-e 's|$(SPRO_VROOT)/bin/||g' lib/python2.7/_sysconfigdata.py \
137fdcb27c8e 16837431 /usr/lib/python2.7/config/Makefile is incorrect
John Beck <John.Beck@Oracle.COM>
parents: 3565
diff changeset
   149
		$(CONFIG_MAKEFILE))
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   150
3367
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   151
ASLR_MODE = $(ASLR_ENABLE)
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   152
3367
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   153
# common targets
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   154
$(INSTALL_32):  $(INSTALL_64)
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   155
build:		$(BUILD_32_and_64)
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   156
install:	$(INSTALL_32_and_64)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   157
3367
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   158
# Using "-uall,-network" ensures all tests are run except the network tests.
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   159
# The network tests contain many expected failures when run behind a firewall.
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   160
# The "-v" ensures verbose mode.  You can set TESTOPTS_PYTHON_TEST to a
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   161
# particular test if you want to run just one test.  For example, run gmake with
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   162
# "-k" so it continues and does both 32-bit and 64-bit tests, even if there is a
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   163
# failure, like this:
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   164
# $ TESTOPTS_PYTHON_TEST=test_sys gmake -k test
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   165
# Note that when a test succeeds, the builds/*/.tested file gets created.  You
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   166
# may need to remove these files, or run "gmake clobber" or "gmake clean"
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   167
# between tests.
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   168
#
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   169
COMPONENT_TEST_ENV = EXTRATESTOPTS="-v -uall,-network $(TESTOPTS_PYTHON_TEST)"
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   170
COMPONENT_TEST_TARGETS = test
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   171
3367
ed5024e47b53 PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 2914
diff changeset
   172
test:				$(TEST_32_and_64)
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   173
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   174
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   175
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   176
include $(WS_TOP)/make-rules/depend.mk