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