Makefile revision 3786
f9c7106cc05eedb57d1beee3ca3c47f49fafb172Timo Sirainen# CDDL HEADER START
f9c7106cc05eedb57d1beee3ca3c47f49fafb172Timo Sirainen# The contents of this file are subject to the terms of the
ef50336eefcb9ba99f73c6af37420eaf8857a39bTimo Sirainen# Common Development and Distribution License (the "License").
2f122b4db3f0d4eeb59ff9d306e54b2009d72cf9Timo Sirainen# You may not use this file except in compliance with the License.
e7ca5f820d6a1a8fe549a2966ac707a60e055ef4Timo Sirainen# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f9c7106cc05eedb57d1beee3ca3c47f49fafb172Timo Sirainen# See the License for the specific language governing permissions
81e6e1ef0feef60644a4c4b745d82a4c98223affTimo Sirainen# and limitations under the License.
f9c7106cc05eedb57d1beee3ca3c47f49fafb172Timo Sirainen# When distributing Covered Code, include this CDDL HEADER in each
f9c7106cc05eedb57d1beee3ca3c47f49fafb172Timo Sirainen# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2f122b4db3f0d4eeb59ff9d306e54b2009d72cf9Timo Sirainen# If applicable, add the following below this CDDL HEADER, with the
2f122b4db3f0d4eeb59ff9d306e54b2009d72cf9Timo Sirainen# fields enclosed by brackets "[]" replaced with your own identifying
2f122b4db3f0d4eeb59ff9d306e54b2009d72cf9Timo Sirainen# information: Portions Copyright [yyyy] [name of copyright owner]
2f122b4db3f0d4eeb59ff9d306e54b2009d72cf9Timo Sirainen# CDDL HEADER END
ef893433824a4e9a8e423cfc493b8423ae32ef0fTimo Sirainen# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
2615df45a8027948a474abe5e817b34b0499c171Timo SirainenCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
2615df45a8027948a474abe5e817b34b0499c171Timo Sirainen sha256:1c6d9682d145c056537e477bbfa060ce727f9edd38df1827e0f970dcf04b2def
2615df45a8027948a474abe5e817b34b0499c171Timo SirainenCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
f9c7106cc05eedb57d1beee3ca3c47f49fafb172Timo Sirainen# Need to preserve timestamp for Grammar files. If the pickle files are older,
e7ca5f820d6a1a8fe549a2966ac707a60e055ef4Timo Sirainen# Python will try to rebuild them.
e7ca5f820d6a1a8fe549a2966ac707a60e055ef4Timo SirainenPKGSEND_PUBLISH_OPTIONS += -T \*Grammar\*.pickle
e7ca5f820d6a1a8fe549a2966ac707a60e055ef4Timo Sirainen# We patch auto* files, so regenerate headers and configure
2615df45a8027948a474abe5e817b34b0499c171Timo Sirainen# The DTrace patch needs this file to be mode 0755.
2615df45a8027948a474abe5e817b34b0499c171Timo Sirainen# we don't want to leak $(CC_BITS) into BASECFLAGS as it causes problems with
2615df45a8027948a474abe5e817b34b0499c171Timo Sirainen# python-config
2615df45a8027948a474abe5e817b34b0499c171Timo Sirainen# to find the ncurses headers
2615df45a8027948a474abe5e817b34b0499c171Timo Sirainen# enable large files how they did in JDS
2615df45a8027948a474abe5e817b34b0499c171Timo Sirainen# libffi for _ctypes
2615df45a8027948a474abe5e817b34b0499c171Timo SirainenCPPFLAGS += $(shell pkg-config --cflags-only-I libffi)
2615df45a8027948a474abe5e817b34b0499c171Timo Sirainen# because python links with $(CC) ... $(LDFLAGS) ...
da9f6acdcb303d0fe5160b669668aedf39c8f45aTimo Sirainen# The python build is profile-guided for studio; to see the benefits of that,
e7ca5f820d6a1a8fe549a2966ac707a60e055ef4Timo Sirainen# Python must be compiled with -xO5 and a different build target must be used.
f9c7106cc05eedb57d1beee3ca3c47f49fafb172Timo Sirainen# Use of xprofile requires that the same options be used during compilation and
5707c94de29af4645a93e0d36ffa57af5537172cTimo Sirainen# linking. The targets chosen are based on Solaris 11 minimum supported system
2e295aaaf04febd3bb7be66cddd4d8ffa96fa5dcAki Tuomi# requirements.
2e295aaaf04febd3bb7be66cddd4d8ffa96fa5dcAki TuomiPYFLAGS.i386 = -xtarget=opteron -xarch=sse2 -xcache=generic
2f122b4db3f0d4eeb59ff9d306e54b2009d72cf9Timo Sirainen# add /usr/gnu/lib to the library search/run path
2e295aaaf04febd3bb7be66cddd4d8ffa96fa5dcAki TuomiLDFLAGS.64 = -R/usr/gnu/lib/$(MACH64) -L/usr/gnu/lib/$(MACH64)
2f122b4db3f0d4eeb59ff9d306e54b2009d72cf9Timo Sirainen# Python puts its header files in a special place.
5707c94de29af4645a93e0d36ffa57af5537172cTimo SirainenCONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
5707c94de29af4645a93e0d36ffa57af5537172cTimo SirainenCONFIGURE_OPTIONS += XPROFILE_DIR="$(XPROFILE_DIR)"
efe78d3ba24fc866af1c79b9223dc0809ba26cadStephan BoschCOMPONENT_BUILD_ENV += XPROFILE_DIR="$(XPROFILE_DIR)"
44fda09101a94883f45b8a6214628e541550cebcTimo Sirainen# Some tests have non-ASCII characters encoded for international domain names;
44fda09101a94883f45b8a6214628e541550cebcTimo Sirainen# the publish step will fail in 'pkgdepend generate' without this:
5707c94de29af4645a93e0d36ffa57af5537172cTimo Sirainen# 64 bit shared objects need to go in a 64-bit directory
ef893433824a4e9a8e423cfc493b8423ae32ef0fTimo SirainenCOMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python3.4/lib-dynload
c7f6992db44e9cd33b3b0d754833a1503ee9a53fAki Tuomi# common targets
c0a87e5f3316a57e6f915882fa1951d0fbb74a61Timo Sirainen# Using "-uall,-network" ensures all tests are run except the network tests.
c0a87e5f3316a57e6f915882fa1951d0fbb74a61Timo Sirainen# The network tests contain many expected failures when run behind a firewall.
2f122b4db3f0d4eeb59ff9d306e54b2009d72cf9Timo Sirainen# The "-v" ensures verbose mode. You can set TESTOPTS_PYTHON_TEST to a
a81e49899669137f9d7d1ba4c3130c9389cee530Timo Sirainen# particular test if you want to run just one test. For example,
bbc7e2c2e726cf84da49f4062d05b0c35a9377bdAki Tuomi# $ TESTOPTS_PYTHON_TEST=test_sys gmake -k test
a81e49899669137f9d7d1ba4c3130c9389cee530Timo Sirainen# Note that when a test succeeds, the builds/*/.tested file gets created. You
a81e49899669137f9d7d1ba4c3130c9389cee530Timo Sirainen# may need to remove these files, or run "gmake clobber" or "gmake clean"
a81e49899669137f9d7d1ba4c3130c9389cee530Timo Sirainen# between tests.
2f122b4db3f0d4eeb59ff9d306e54b2009d72cf9Timo SirainenCOMPONENT_TEST_ENV = EXTRATESTOPTS="-v -uall,-network $(TESTOPTS_PYTHON_TEST)"
cb5a43d2dd99db0037b3450701ed83df78bc90f5Timo Sirainen# Prevent the tests from getting stuck waiting for input.