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#
3321N/A# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
12N/A#
12N/A
3117N/APYTHON27 = /usr/bin/python2.7
3177N/APYTHON34 = /usr/bin/python3.4
30N/A
30N/Aall := TARGET = all
849N/Ainstall := TARGET = install
1980N/Apackages := TARGET = install
124N/Aclean := TARGET = clean
124N/Aclobber := TARGET = clobber
2339N/Alint := TARGET = lint
2339N/Aclint := TARGET = clint
2339N/Apylint := TARGET = pylint
3261N/Apep8 := TARGET = pep8
181N/Atest := TARGET = test
181N/Atest-verbose := TARGET = test-verbose
430N/Atest-generate := TARGET = test-generate
30N/A
2892N/A#
2892N/A# clear PYTHONPATH when invoking /usr/bin/pkg (we don't want to load any
2892N/A# pkg python modules from this workspace since they may be out of sync
2892N/A# with the pkg modules in the root filesystem).
2892N/A#
2892N/APYLINT_VER_CMD = PYTHONPATH= /usr/bin/pkg info pkg:/developer/python/pylint | \
2828N/A /usr/bin/grep Version | \
2828N/A /usr/bin/awk -F: '{print $$2}' | /usr/bin/sed -e 's/ //g'
2828N/A
3261N/APEP8 = /usr/bin/pep8
3339N/AJOBS = 4
3261N/A
3321N/ASUBDIRS=zoneproxy util/mkcert
859N/A
859N/Aall: $(SUBDIRS)
3117N/A $(PYTHON27) setup.py build
12N/A
859N/Aclean: $(SUBDIRS)
3177N/A $(PYTHON27) setup.py clean
1980N/A @cd pkg; pwd; make clean
20N/A
859N/Aclobber: $(SUBDIRS)
3177N/A $(PYTHON27) setup.py clobber
1980N/A @cd pkg; pwd; make clobber
859N/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#
859N/Ainstall: $(SUBDIRS)
3117N/A $(PYTHON27) setup.py install
3339N/A $(PYTHON34) setup.py install
2339N/A
2339N/Alint:
3177N/A $(PYTHON27) setup.py lint
2665N/A @cd zoneproxy; pwd; make lint
2339N/A
2339N/Aclint:
3177N/A $(PYTHON27) setup.py clint
2665N/A @cd zoneproxy; pwd; make lint
2339N/A
2693N/Apylint: install
3117N/A PYLINT_VER=$(PYLINT_VER_CMD:sh) $(PYTHON27) setup.py pylint
3253N/A PYLINT_VER=$(PYLINT_VER_CMD:sh) $(PYTHON27) setup.py pylint_py3k
33N/A
3261N/Apep8:
3261N/A $(PEP8) --statistics --count `cat tests/pep8-whitelist.txt`
3261N/A
859N/A#
859N/A# This rule propagates the current make target through all of the
859N/A# subdirectories in $SUBDIRS.
859N/A#
859N/A$(SUBDIRS): FRC
859N/A @cd $@; pwd; $(MAKE) $(TARGET)
422N/A
1984N/A# Use the bits we just built to create the packages.
3261N/Apackages: install pylint pep8
2626N/A @cd pkg; pwd; $(MAKE) $(TARGET) check \
3339N/A PATH=$$(hg root)/proto/root_$$(uname -p)/usr/bin:$$PATH
30N/A
30N/Atest:
3339N/A $(PYTHON27) tests/run.py -j ${JOBS} -v
3339N/A $(PYTHON34) tests/run.py -j ${JOBS} -v
181N/A
430N/Atest-verbose:
3177N/A $(PYTHON27) setup.py test -v
430N/A
2339N/Atest-generate:
3177N/A $(PYTHON27) setup.py test -g
448N/A
859N/AFRC: