Makefile revision 1273
6ca0e6973c8176100f4a426444823ae5e777e28fsascha#
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# CDDL HEADER START
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz#
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# The contents of this file are subject to the terms of the
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# Common Development and Distribution License (the "License").
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# You may not use this file except in compliance with the License.
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz#
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# or http://www.opensolaris.org/os/licensing.
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# See the License for the specific language governing permissions
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# and limitations under the License.
6ca0e6973c8176100f4a426444823ae5e777e28fsascha#
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# When distributing Covered Code, include this CDDL HEADER in each
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# If applicable, add the following below this CDDL HEADER, with the
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# fields enclosed by brackets "[]" replaced with your own identifying
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# information: Portions Copyright [yyyy] [name of copyright owner]
6ca0e6973c8176100f4a426444823ae5e777e28fsascha#
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# CDDL HEADER END
6ca0e6973c8176100f4a426444823ae5e777e28fsascha
6ca0e6973c8176100f4a426444823ae5e777e28fsascha#
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3a47c2ef905c3b6483279637fb8054ca67c5b6ddsascha#
3a47c2ef905c3b6483279637fb8054ca67c5b6ddsascha
3a47c2ef905c3b6483279637fb8054ca67c5b6ddsaschainclude ../../make-rules/shared-macros.mk
6ca0e6973c8176100f4a426444823ae5e777e28fsascha
6ca0e6973c8176100f4a426444823ae5e777e28fsaschaCOMPONENT_NAME= pylint
e50587e6b2ff25bdcbe29410be5bf8f4792016eegregamesCOMPONENT_VERSION= 0.25.2
6ca0e6973c8176100f4a426444823ae5e777e28fsaschaCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
0d9c389e9c63d02edb068917d49af2fa8012af91marcCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
6ca0e6973c8176100f4a426444823ae5e777e28fsaschaCOMPONENT_ARCHIVE_HASH= \
dadf206a4cf1eccf5c13b64bd9678610dd763868rbb sha256:757f2b97071a87fb7e4d017fc7c9eb74f26dcf412e683b614d3c5d54b217212d
dadf206a4cf1eccf5c13b64bd9678610dd763868rbbCOMPONENT_ARCHIVE_URL= http://download.logilab.org/pub/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
a773226ea345018b49d45cf2e076ff2452eead5arbbCOMPONENT_PROJECT_URL= http://www.logilab.org/project/pylint/
f9e54e16ac4952a85bb00b8043c1d1e0f495eefbgregamesCOMPONENT_BUGDB= utility/pylint
6ca0e6973c8176100f4a426444823ae5e777e28fsascha
6ca0e6973c8176100f4a426444823ae5e777e28fsaschainclude $(WS_TOP)/make-rules/prep.mk
ec9b5c4854a4055d00f5459dbbd879d517f1531dmartininclude $(WS_TOP)/make-rules/ips.mk
6ca0e6973c8176100f4a426444823ae5e777e28fsaschainclude $(WS_TOP)/make-rules/setup.py.mk
5181b311fbd45b65a34b3fddb3ace5fab85f36e4wrowe
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# There are several pylint documentation files that setup.py isn't installing
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# but are present in the pylint package on other distributions. Copy them into
4cbb3bcf66a6788196bcc7244e4e36705acfbb57rbb# the proto area "manually", so they can be included in the package.
a91a466a0d812a522d492c3c182163f73591ca20aaronPDOC = $(PROTO_DIR)/usr/share/doc
a91a466a0d812a522d492c3c182163f73591ca20aaronPDOC_PYLINT = $(PDOC)/pylint
5f69f46ccdf50afd8f0a23f134746e6066185e89rbbPDOC_PYLINT_EXAMPLES = $(PDOC_PYLINT)/examples
12b0070d002520b81a273ae892b9ea08e810b123rbb
6ca0e6973c8176100f4a426444823ae5e777e28fsaschaCOMPONENT_POST_INSTALL_ACTION += \
886cd69ebf69e990dbc365be87ff8ea7cd681904rbb $(MKDIR) $(PDOC_PYLINT) ;
6ca0e6973c8176100f4a426444823ae5e777e28fsaschaCOMPONENT_POST_INSTALL_ACTION += \
305a68a1a5db3cc264077d89b3caa6f923257150fielding $(CP) $(COMPONENT_SRC)/doc/beginner_pylint_tutorial.txt $(PDOC_PYLINT) ;
7bfe076b680e6e591add6cdc754ce9a6910682a2saschaCOMPONENT_POST_INSTALL_ACTION += \
105475009f541187ba7a14a367547d9404c578befielding $(CP) $(COMPONENT_SRC)/doc/FAQ.txt $(PDOC_PYLINT) ;
105475009f541187ba7a14a367547d9404c578befieldingCOMPONENT_POST_INSTALL_ACTION += \
7bfe076b680e6e591add6cdc754ce9a6910682a2sascha $(CP) $(COMPONENT_SRC)/doc/features.txt $(PDOC_PYLINT) ;
f07a80771bc5d30b1e0cfcb7256c1a302da77675rbbCOMPONENT_POST_INSTALL_ACTION += \
6ca0e6973c8176100f4a426444823ae5e777e28fsascha $(CP) $(COMPONENT_SRC)/doc/manual.txt $(PDOC_PYLINT) ;
80e9324586de2fa55e2da4df409e6a85885ea659fieldingCOMPONENT_POST_INSTALL_ACTION += \
9022fa73d4ac101553e7c36a1457ead52a73333borlikowski $(CP) $(COMPONENT_SRC)/doc/quickstart.txt $(PDOC_PYLINT) ;
9022fa73d4ac101553e7c36a1457ead52a73333borlikowskiCOMPONENT_POST_INSTALL_ACTION += \
38d37e90b45f2a735e7aecf702c76159e0b9f58ftrawick $(CP) $(COMPONENT_SRC)/README $(PDOC_PYLINT) ;
105475009f541187ba7a14a367547d9404c578befielding
6ca0e6973c8176100f4a426444823ae5e777e28fsaschaCOMPONENT_POST_INSTALL_ACTION += \
105475009f541187ba7a14a367547d9404c578befielding $(MKDIR) $(PDOC_PYLINT_EXAMPLES) ;
105475009f541187ba7a14a367547d9404c578befieldingCOMPONENT_POST_INSTALL_ACTION += \
105475009f541187ba7a14a367547d9404c578befielding $(CP) $(COMPONENT_SRC)/examples/custom.py $(PDOC_PYLINT_EXAMPLES) ;
105475009f541187ba7a14a367547d9404c578befieldingCOMPONENT_POST_INSTALL_ACTION += \
105475009f541187ba7a14a367547d9404c578befielding $(CP) $(COMPONENT_SRC)/examples/custom_raw.py $(PDOC_PYLINT_EXAMPLES) ;
105475009f541187ba7a14a367547d9404c578befieldingCOMPONENT_POST_INSTALL_ACTION += \
105475009f541187ba7a14a367547d9404c578befielding $(CP) $(COMPONENT_SRC)/elisp/pylint.el $(PDOC_PYLINT_EXAMPLES) ;
105475009f541187ba7a14a367547d9404c578befieldingCOMPONENT_POST_INSTALL_ACTION += \
105475009f541187ba7a14a367547d9404c578befielding $(CP) $(COMPONENT_SRC)/examples/pylintrc_camelcase $(PDOC_PYLINT_EXAMPLES) ;
105475009f541187ba7a14a367547d9404c578befieldingCOMPONENT_POST_INSTALL_ACTION += \
105475009f541187ba7a14a367547d9404c578befielding $(CP) $(COMPONENT_SRC)/examples/pylintrc $(PDOC_PYLINT_EXAMPLES) ;
105475009f541187ba7a14a367547d9404c578befieldingCOMPONENT_POST_INSTALL_ACTION += \
6ca0e6973c8176100f4a426444823ae5e777e28fsascha (cd $(PROTO_DIR)/usr/bin; $(MV) epylint epylint-$(PYTHON_VERSION)) ;
6ca0e6973c8176100f4a426444823ae5e777e28fsaschaCOMPONENT_POST_INSTALL_ACTION += \
6ca0e6973c8176100f4a426444823ae5e777e28fsascha (cd $(PROTO_DIR)/usr/bin; $(MV) pylint pylint-$(PYTHON_VERSION)) ;
cb5d3f2f217d457dada4883addb1dc9f3f17bb85fieldingCOMPONENT_POST_INSTALL_ACTION += \
6a1c919219ae7e3382fb22f1c4cf89f11b4becffcoar (cd $(PROTO_DIR)/usr/bin; $(MV) pylint-gui pylint-gui-$(PYTHON_VERSION)) ;
95d00ea81131488769296fa5765ed745cbf45207trawickCOMPONENT_POST_INSTALL_ACTION += \
95d00ea81131488769296fa5765ed745cbf45207trawick (cd $(PROTO_DIR)/usr/bin; $(MV) pyreverse pyreverse-$(PYTHON_VERSION)) ;
ce8d7a0627c0f246376cccd980463f8250a6a97ebjhCOMPONENT_POST_INSTALL_ACTION += \
ce8d7a0627c0f246376cccd980463f8250a6a97ebjh (cd $(PROTO_DIR)/usr/bin; $(MV) symilar symilar-$(PYTHON_VERSION)) ;
20bca6c9617ad7d0268203c21039424e99acdd91bjh
ce8d7a0627c0f246376cccd980463f8250a6a97ebjh
ce8d7a0627c0f246376cccd980463f8250a6a97ebjh# common targets
11c8f1b409a02814693ec75cbe7f69f3ef994fbajerenkrantz
cdb58be93a9cbeaba1ebc759b48aa8ed519675a9bjhbuild: $(BUILD_32)
7dfed2b71c9c4223996cbd7c5c0c85c7c8fef2a4rbb
5d5073be0470140d32914de8e74d869ee4145bffjerenkrantzinstall: $(INSTALL_32)
6552de06c3d34e6ecfad4c93a6604531b52caf63wsanchez
5d5073be0470140d32914de8e74d869ee4145bffjerenkrantz# The tests are run using python 2.7 only and require that
6552de06c3d34e6ecfad4c93a6604531b52caf63wsanchez# the python-27 package is installed (does not have to be the default python).
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# Testing using python-26 is done manually, since it requires
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# downloading and installing the unittest2 component (not part of Solaris),
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# which provides python 2.7 functionality to the unittest python library
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# in the python2.6 package.
a736bac16e58d5e96945f35ee3c43a2cd2f5d37ejerenkrantz
88ecd979f1112454432371f55a1420240fae3743trawick# Use the python 2.7 libraries for testing.
6ca0e6973c8176100f4a426444823ae5e777e28fsaschatest: PYTHON_VERSION=2.7
88ecd979f1112454432371f55a1420240fae3743trawick
6ca0e6973c8176100f4a426444823ae5e777e28fsascha# logilab-common and logilab-astng are runtime dependencies of pylint,
3a47c2ef905c3b6483279637fb8054ca67c5b6ddsascha# and we need to use their latest versions from this workspace.
3a47c2ef905c3b6483279637fb8054ca67c5b6ddsascha# We can't just add their install targets as dependencies here,
3a47c2ef905c3b6483279637fb8054ca67c5b6ddsascha# so just "gmake install" in the logilab-common and logilab-astng
3a47c2ef905c3b6483279637fb8054ca67c5b6ddsascha# component directories before running the pylint tests.
3a47c2ef905c3b6483279637fb8054ca67c5b6ddsaschaCOMPONENT_PRE_TEST_ACTION = ($(GMAKE) -C \
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha $(COMPONENT_DIR)/../logilab-common install; \
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj $(GMAKE) -C $(COMPONENT_DIR)/../logilab-astng install )
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanojCOMPONENT_TEST_ENV = PYTHONPATH=$(COMPONENT_DIR)/../logilab-common/build/prototype/$(MACH)$(PYTHON_VENDOR_PACKAGES):$(COMPONENT_DIR)/../logilab-astng/build/prototype/$(MACH)$(PYTHON_VENDOR_PACKAGES):$(PROTO_DIR)$(PYTHON_VENDOR_PACKAGES)
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj# Run pytest-2.7 from logilab-common's proto area for now, until the
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj# new version of logilab-common containing pytest is in CBE.
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj# Then we can change it to /usr/bin/pytest-$(PYTHON_VERSION).
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanojCOMPONENT_TEST_CMD = $(COMPONENT_DIR)/../logilab-common/build/prototype/$(MACH)/usr/bin/pytest-$(PYTHON_VERSION)
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanojCOMPONENT_TEST_ARGS =
aa811cad2eb3fc01d17a5c8eba274b915ab8cd20manoj
b90c64e517df3fe1c97806830f84a30362187f0afielding# Expected failures for test target:
aa811cad2eb3fc01d17a5c8eba274b915ab8cd20manoj# 799 test cases, 4 errors, 6 failures, 4 skipped
aa811cad2eb3fc01d17a5c8eba274b915ab8cd20manoj# 9 modules OK (2 failed)
aa811cad2eb3fc01d17a5c8eba274b915ab8cd20manoj# failures: smoketest [7/14], unittest_lint [3/21]
b90c64e517df3fe1c97806830f84a30362187f0afielding
aa811cad2eb3fc01d17a5c8eba274b915ab8cd20manojtest: $(TEST_32)
e6b0215ca481b00d658a0adfea378c36a67aa088trawick
e6b0215ca481b00d658a0adfea378c36a67aa088trawickBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
e6b0215ca481b00d658a0adfea378c36a67aa088trawick
e6b0215ca481b00d658a0adfea378c36a67aa088trawickinclude $(WS_TOP)/make-rules/depend.mk
e6b0215ca481b00d658a0adfea378c36a67aa088trawick