Makefile revision 3869
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# CDDL HEADER START
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# The contents of this file are subject to the terms of the
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# Common Development and Distribution License (the "License").
e64031e20c39650a7bc902a3e1aba613b9415deevboxsync# You may not use this file except in compliance with the License.
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# See the License for the specific language governing permissions
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# and limitations under the License.
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# When distributing Covered Code, include this CDDL HEADER in each
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# If applicable, add the following below this CDDL HEADER, with the
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# fields enclosed by brackets "[]" replaced with your own identifying
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# CDDL HEADER END
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
8d974ced0dc3540dd1b3ec85f8663388e246461avboxsyncCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync sha256:b5b3963533768d5fc325a4d7a6bd6f666726002d696f1d399ec06b043ea996b8
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsyncCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# Need to preserve timestamp for Grammar files. If the pickle files are older,
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# Python will try to rebuild them.
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# We patch auto* files, so regenerate headers and configure
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# The DTrace patch needs this file to be mode 0755.
8d974ced0dc3540dd1b3ec85f8663388e246461avboxsync# we don't want to leak $(CC_BITS) into BASECFLAGS as it causes problems with
8d974ced0dc3540dd1b3ec85f8663388e246461avboxsync# python-config
8d974ced0dc3540dd1b3ec85f8663388e246461avboxsync# to find the ncurses headers
8d974ced0dc3540dd1b3ec85f8663388e246461avboxsync# enable large files how they did in JDS
8d974ced0dc3540dd1b3ec85f8663388e246461avboxsync# libffi for _ctypes
8d974ced0dc3540dd1b3ec85f8663388e246461avboxsyncCPPFLAGS += $(shell pkg-config --cflags-only-I libffi)
8d974ced0dc3540dd1b3ec85f8663388e246461avboxsync# because python links with $(CC) ... $(LDFLAGS) ...
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# 16-byte memory alignment + interpretation of non-alignment prevents SIGBUS.
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# The python build is profile-guided for studio; to see the benefits of that,
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# Python must be compiled with -xO5 and a different build target must be used.
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# Use of xprofile requires that the same options be used during compilation and
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# linking. The targets chosen are based on Solaris 11 minimum supported system
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# requirements.
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsyncPYFLAGS.i386 = -xtarget=opteron -xarch=sse2 -xcache=generic
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# Python puts its header files in a special place.
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# PYTHONPATH in the environment can be harmful, but setting it to empty via
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# _INSTALL_ENV causes problems too, so just ignore the entire environment.
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# Because of this, we need to specify PATH in multiple places below.
c285785ffc9f35513e0c6e7e2a05df3090dc919cvboxsyncCOMPONENT_BUILD_ENV += XPROFILE_DIR="$(XPROFILE_DIR)"
c285785ffc9f35513e0c6e7e2a05df3090dc919cvboxsync# Some tests have non-ASCII characters encoded for international domain names;
c285785ffc9f35513e0c6e7e2a05df3090dc919cvboxsync# the publish step will fail in 'pkgdepend generate' without this:
c285785ffc9f35513e0c6e7e2a05df3090dc919cvboxsync# 64 bit shared objects need to go in a 64-bit directory
c285785ffc9f35513e0c6e7e2a05df3090dc919cvboxsyncCOMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python3.4/lib-dynload
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# Simplify the definitions of CC, CXX, CFLAGS and LDFLAGS so they hard-code
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# neither paths from our build systems nor Studio-specific options.
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync $(GSED) -i -e 's/^CC=.*/CC=\t\tcc/' -e 's/^CXX=.*/CXX=\t\tCC/' \
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync -e 's/^CFLAGS=.*/CFLAGS=\t\t\$$\(BASECFLAGS) \$$\(OPT) \$$\(EXTRA_CFLAGS)/' \
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# Because we stripped the Makefile above, we need to pass several things in the
037f4c44a9ef4e458f46b264aebd12df049b0f0cvboxsync# environment, and use -e to tell gmake to pay attention to the environment.
COMPONENT_INSTALL_ARGS += -e
# Strip build machine paths from _sysconfigdata.py & config/Makefile.
COMPONENT_TEST_TRANSFORMS = "'/tests OK./ {results = 1}; /Re-running failed tests in verbose mode/ {results = 0} {if (results) print $0 } '"
test: $(TEST_64)