Makefile revision 3117
12N/A#
12N/A# CDDL HEADER START
12N/A#
12N/A# The contents of this file are subject to the terms of the
12N/A# Common Development and Distribution License (the "License").
12N/A# You may not use this file except in compliance with the License.
12N/A#
12N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12N/A# or http://www.opensolaris.org/os/licensing.
12N/A# See the License for the specific language governing permissions
12N/A# and limitations under the License.
12N/A#
12N/A# When distributing Covered Code, include this CDDL HEADER in each
12N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12N/A# If applicable, add the following below this CDDL HEADER, with the
12N/A# fields enclosed by brackets "[]" replaced with your own identifying
12N/A# information: Portions Copyright [yyyy] [name of copyright owner]
12N/A#
12N/A# CDDL HEADER END
12N/A#
1980N/A
12N/A#
2306N/A# Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
12N/A#
12N/A
1516N/APYTHON26 = /usr/bin/python2.6
30N/APYTHON27 = /usr/bin/python2.7
30N/A
849N/Aall := TARGET = all
1980N/Ainstall := TARGET = install
124N/Apackages := TARGET = install
124N/Aclean := TARGET = clean
2339N/Aclobber := TARGET = clobber
2339N/Alint := TARGET = lint
2339N/Aclint := TARGET = clint
181N/Apylint := TARGET = pylint
181N/Atest := TARGET = test
430N/Atest-verbose := TARGET = test-verbose
448N/Atest-generate := TARGET = test-generate
30N/A
2338N/A#
859N/A# clear PYTHONPATH when invoking /usr/bin/pkg (we don't want to load any
859N/A# pkg python modules from this workspace since they may be out of sync
395N/A# with the pkg modules in the root filesystem).
12N/A#
859N/APYLINT_VER_CMD = PYTHONPATH= /usr/bin/pkg info pkg:/developer/python/pylint | \
859N/A /usr/bin/grep Version | \
1980N/A /usr/bin/awk -F: '{print $$2}' | /usr/bin/sed -e 's/ //g'
20N/A
859N/ASUBDIRS=zoneproxy tsol
859N/A
1980N/Aall: $(SUBDIRS)
859N/A $(PYTHON26) setup.py build
2339N/A $(PYTHON27) setup.py build
2339N/A
2339N/Aclean: $(SUBDIRS)
2339N/A $(PYTHON26) setup.py clean
859N/A @cd pkg; pwd; make clean
859N/A
2339N/Aclobber: $(SUBDIRS)
2339N/A $(PYTHON26) setup.py clobber
2339N/A @cd pkg; pwd; make clobber
2339N/A
2339N/A#
2339N/A# run pylint as part of the install target.
2339N/A# it's the best way to ensure things stay pylint clean.
2339N/A#
2339N/Ainstall: $(SUBDIRS)
2339N/A $(PYTHON26) setup.py install
33N/A $(PYTHON27) setup.py install
859N/A
859N/Alint:
859N/A $(PYTHON26) setup.py lint
859N/A @cd zoneproxy; pwd; make lint
859N/A
859N/Aclint:
422N/A $(PYTHON26) setup.py clint
1984N/A @cd zoneproxy; pwd; make lint
422N/A
2306N/Apylint: install
1984N/A PYLINT_VER=$(PYLINT_VER_CMD:sh) $(PYTHON26) setup.py pylint
1984N/A PYLINT_VER=$(PYLINT_VER_CMD:sh) $(PYTHON27) setup.py pylint
30N/A
30N/A#
395N/A# This rule propagates the current make target through all of the
181N/A# subdirectories in $SUBDIRS.
430N/A#
430N/A$(SUBDIRS): FRC
430N/A @cd $@; pwd; $(MAKE) $(TARGET)
2339N/A
430N/A# Use the bits we just built to create the packages.
448N/Apackages: install pylint
448N/A @cd pkg; pwd; $(MAKE) $(TARGET) check \
448N/A PATH=$$(hg root)/proto/root_$$(uname -p)/usr/bin:$$PATH \
708N/A PYTHONPATH=$$(hg root)/proto/root_$$(uname -p)/usr/lib/python2.6/vendor-packages
859N/A
test:
$(PYTHON26) setup.py test
test-verbose:
$(PYTHON26) setup.py test -v
test-generate:
$(PYTHON26) setup.py test -g
FRC: