Makefile revision 3661
2127N/A#
2127N/A# CDDL HEADER START
2127N/A#
2127N/A# The contents of this file are subject to the terms of the
2127N/A# Common Development and Distribution License (the "License").
2127N/A# You may not use this file except in compliance with the License.
2127N/A#
2127N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2127N/A# or http://www.opensolaris.org/os/licensing.
2127N/A# See the License for the specific language governing permissions
2127N/A# and limitations under the License.
2127N/A#
2127N/A# When distributing Covered Code, include this CDDL HEADER in each
2127N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2127N/A# If applicable, add the following below this CDDL HEADER, with the
2127N/A# fields enclosed by brackets "[]" replaced with your own identifying
2127N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2127N/A#
2127N/A# CDDL HEADER END
2127N/A#
2127N/A
2127N/A#
2541N/A# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
2127N/A#
2127N/A
2127N/Ainclude ../../../make-rules/shared-macros.mk
2127N/A
2127N/ACOMPONENT_NAME= xattr
2127N/ACOMPONENT_VERSION= 0.7.4
2127N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
2127N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
2127N/ACOMPONENT_ARCHIVE_HASH= \
2127N/A sha256:16c612ac01b9b5a31967e231c7f7d32b7263f151d5e3c617c69378170054805f
2127N/ACOMPONENT_ARCHIVE_URL= $(call pypi_url)
2127N/ACOMPONENT_PROJECT_URL= http://github.com/xattr/xattr
2127N/ACOMPONENT_BUGDB= python-mod/xattr
2127N/A
2127N/ATPNO= 16912
2127N/A
2127N/Ainclude $(WS_TOP)/make-rules/prep.mk
2127N/Ainclude $(WS_TOP)/make-rules/setup.py.mk
2127N/Ainclude $(WS_TOP)/make-rules/ips.mk
2127N/A
2127N/AASLR_MODE = $(ASLR_NOT_APPLICABLE)
2127N/A
2127N/A# Look over into the pycparser and cffi proto areas until they're available in
2127N/A# the build environment. Make sure that cffi is built.
2127N/APYCPARSER = $(WS_COMPONENTS)/python/pycparser/build/prototype/$(MACH)/$(PYTHON_LIB)
2127N/ACFFI = $(WS_COMPONENTS)/python/cffi/build/prototype/$(MACH)/$(PYTHON_LIB)
2541N/A
$(CFFI):
(cd ../cffi; $(MAKE) install)
PYTHONPATH_DEP = $(PYCPARSER):$(CFFI)
COMPONENT_BUILD_ENV += PYTHONPATH=$(PYTHONPATH_DEP)
COMPONENT_INSTALL_ENV += PYTHONPATH=$(PYTHONPATH_DEP):$(PROTO_DIR)/$(PYTHON_LIB)
COMPONENT_TEST_ENV += PYTHONPATH=$(PYTHONPATH_DEP):$(PROTO_DIR)/$(PYTHON_LIB)
# The test suite wants to use some unicode filenames, which don't work in the C
# locale.
COMPONENT_TEST_ENV += LC_CTYPE=en_US.UTF-8
COMPONENT_TEST_DIR = $(@D)/tests
COMPONENT_TEST_CMD = $(PYTHON) setup.py
COMPONENT_TEST_ARGS = test
COMPONENT_POST_INSTALL_ACTION += \
(cd $(PROTO_DIR)/usr/bin; $(MV) xattr xattr-$(PYTHON_VERSION))
# Tests run under setuptools work very hard to run in the source directory
# itself, and will thus blow up with an VerificationError (wrong ELF class)
# when running 64-bit tests after 32-bit or vice-versa. So copy the source off
# to a target-specific directory and run the tests. Note that this will also
# rebuild the package, since it doesn't want to use what it should already be
# finding in PYTHONPATH.
COMPONENT_PRE_TEST_ACTION = $(CP) -r $(SOURCE_DIR) $(@D)/tests
$(BUILD_32_and_64): $(CFFI)
# common targets
build: $(BUILD_32_and_64)
install: $(INSTALL_32_and_64)
test: $(TEST_32_and_64)
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
include $(WS_TOP)/make-rules/depend.mk