setup.py.mk revision 31
213N/A#
213N/A# CDDL HEADER START
213N/A#
213N/A# The contents of this file are subject to the terms of the
213N/A# Common Development and Distribution License (the "License").
213N/A# You may not use this file except in compliance with the License.
213N/A#
213N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
213N/A# or http://www.opensolaris.org/os/licensing.
213N/A# See the License for the specific language governing permissions
213N/A# and limitations under the License.
213N/A#
213N/A# When distributing Covered Code, include this CDDL HEADER in each
213N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
213N/A# If applicable, add the following below this CDDL HEADER, with the
213N/A# fields enclosed by brackets "[]" replaced with your own identifying
213N/A# information: Portions Copyright [yyyy] [name of copyright owner]
213N/A#
213N/A# CDDL HEADER END
213N/A#
213N/A# Copyright (c) 2010, Oracle and/or it's affiliates. All rights reserved.
213N/A#
844N/A
213N/A$(COMPONENT_SRC)/build-%-2.6/.built: PYTHON_VERSION=2.6
213N/A$(COMPONENT_SRC)/build-%-2.4/.built: PYTHON_VERSION=2.4
213N/A$(COMPONENT_SRC)/build-$(MACH32)-%/.built: BITS=32
213N/A$(COMPONENT_SRC)/build-$(MACH64)-%/.built: BITS=64
213N/A
213N/A$(COMPONENT_SRC)/build-%-2.6/.installed: PYTHON_VERSION=2.6
213N/A$(COMPONENT_SRC)/build-%-2.4/.installed: PYTHON_VERSION=2.4
213N/A$(COMPONENT_SRC)/build-$(MACH32)-%/.installed: BITS=32
844N/A$(COMPONENT_SRC)/build-$(MACH64)-%/.installed: BITS=64
844N/A
213N/ABUILD_32 = $(PYTHON_VERSIONS:%=$(COMPONENT_SRC)/build-$(MACH32)-%/.built)
213N/ABUILD_64 = $(PYTHON_VERSIONS:%=$(COMPONENT_SRC)/build-$(MACH64)-%/.built)
213N/A
213N/AINSTALL_32 = $(PYTHON_VERSIONS:%=$(COMPONENT_SRC)/build-$(MACH32)-%/.installed)
213N/AINSTALL_64 = $(PYTHON_VERSIONS:%=$(COMPONENT_SRC)/build-$(MACH64)-%/.installed)
213N/A
213N/A# build the configured source
213N/A$(COMPONENT_SRC)/build-%/.built: $(COMPONENT_SRC)/.prep
213N/A $(RM) -r $(@D) ; $(MKDIR) $(@D)
213N/A $(COMPONENT_PRE_BUILD_ACTION)
213N/A (cd $(COMPONENT_SRC) ; $(ENV) $(PYTHON_ENV) \
213N/A $(PYTHON.$(BITS)) ./setup.py build --build-temp $(@D:$(COMPONENT_SRC)/%=%))
213N/A $(COMPONENT_POST_BUILD_ACTION)
213N/A $(TOUCH) $@
213N/A
213N/A# The default is site-packages, but that directory belongs to the end-user.
213N/A# Modules which are shipped by the OS but not with the core Python distribution
213N/A# belong in vendor-packages.
213N/APYTHON_LIB= /usr/lib/python$(PYTHON_VERSION)/vendor-packages
213N/A
213N/A# install the built source into a prototype area
213N/A$(COMPONENT_SRC)/build-%/.installed: $(COMPONENT_SRC)/build-%/.built
213N/A $(COMPONENT_PRE_INSTALL_ACTION)
213N/A (cd $(COMPONENT_SRC) ; $(ENV) $(PYTHON_ENV) \
213N/A $(PYTHON.$(BITS)) ./setup.py install --root $(PROTO_DIR) \
213N/A --install-lib=$(PYTHON_LIB))
213N/A $(COMPONENT_POST_INSTALL_ACTION)
213N/A $(TOUCH) $@
213N/A