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