author | Yiteng Zhang <yiteng.zhang@oracle.com> |
Wed, 09 Mar 2016 11:27:23 -0800 | |
changeset 3321 | 52e8eec3014c |
parent 3261 | f3806842a096 |
child 3339 | c88573eb98ea |
permissions | -rw-r--r-- |
12 | 1 |
# |
2 |
# CDDL HEADER START |
|
3 |
# |
|
4 |
# The contents of this file are subject to the terms of the |
|
5 |
# Common Development and Distribution License (the "License"). |
|
6 |
# You may not use this file except in compliance with the License. |
|
7 |
# |
|
8 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
9 |
# or http://www.opensolaris.org/os/licensing. |
|
10 |
# See the License for the specific language governing permissions |
|
11 |
# and limitations under the License. |
|
12 |
# |
|
13 |
# When distributing Covered Code, include this CDDL HEADER in each |
|
14 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
15 |
# If applicable, add the following below this CDDL HEADER, with the |
|
16 |
# fields enclosed by brackets "[]" replaced with your own identifying |
|
17 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
|
18 |
# |
|
19 |
# CDDL HEADER END |
|
20 |
# |
|
1980
b3eac2be24bb
15728 pkg(5) gate should build IPS packages by default
Danek Duvall <danek.duvall@oracle.com>
parents:
1516
diff
changeset
|
21 |
|
12 | 22 |
# |
3321
52e8eec3014c
17377205 IPS should not use M2Crypto
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
3261
diff
changeset
|
23 |
# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. |
12 | 24 |
# |
25 |
||
3117
d588c32cf5e6
18735378 pkg should also deliver python 2.7 versions of modules
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
2892
diff
changeset
|
26 |
PYTHON27 = /usr/bin/python2.7 |
3177
173c3b46334b
18735388 pkg utilities should switch to Python 2.7
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
3117
diff
changeset
|
27 |
PYTHON34 = /usr/bin/python3.4 |
30 | 28 |
|
29 |
all := TARGET = all |
|
849
5fd94ce78823
3813 pkg build needs to fail when sub-builds fail
Dan Price <dp@eng.sun.com>
parents:
708
diff
changeset
|
30 |
install := TARGET = install |
1980
b3eac2be24bb
15728 pkg(5) gate should build IPS packages by default
Danek Duvall <danek.duvall@oracle.com>
parents:
1516
diff
changeset
|
31 |
packages := TARGET = install |
124
99d3dd6ad07c
clean up installation and other makefile targets
Danek Duvall <danek.duvall@sun.com>
parents:
120
diff
changeset
|
32 |
clean := TARGET = clean |
99d3dd6ad07c
clean up installation and other makefile targets
Danek Duvall <danek.duvall@sun.com>
parents:
120
diff
changeset
|
33 |
clobber := TARGET = clobber |
2339
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
34 |
lint := TARGET = lint |
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
35 |
clint := TARGET = clint |
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
36 |
pylint := TARGET = pylint |
3261
f3806842a096
21699681 use cffi to rewrite C extension modules for Python 3 migration
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
3253
diff
changeset
|
37 |
pep8 := TARGET = pep8 |
181 | 38 |
test := TARGET = test |
39 |
test-verbose := TARGET = test-verbose |
|
430
3fb945d3bff3
2627 Test suite should have support for baselining
Brad Hall <bhall@eng.sun.com>
parents:
424
diff
changeset
|
40 |
test-generate := TARGET = test-generate |
30 | 41 |
|
2892
ab4b61eb9b57
15824872 SUNBT7206345 pkg update on machine with a NGZ fails
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2828
diff
changeset
|
42 |
# |
ab4b61eb9b57
15824872 SUNBT7206345 pkg update on machine with a NGZ fails
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2828
diff
changeset
|
43 |
# clear PYTHONPATH when invoking /usr/bin/pkg (we don't want to load any |
ab4b61eb9b57
15824872 SUNBT7206345 pkg update on machine with a NGZ fails
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2828
diff
changeset
|
44 |
# pkg python modules from this workspace since they may be out of sync |
ab4b61eb9b57
15824872 SUNBT7206345 pkg update on machine with a NGZ fails
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2828
diff
changeset
|
45 |
# with the pkg modules in the root filesystem). |
ab4b61eb9b57
15824872 SUNBT7206345 pkg update on machine with a NGZ fails
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2828
diff
changeset
|
46 |
# |
ab4b61eb9b57
15824872 SUNBT7206345 pkg update on machine with a NGZ fails
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2828
diff
changeset
|
47 |
PYLINT_VER_CMD = PYTHONPATH= /usr/bin/pkg info pkg:/developer/python/pylint | \ |
2828
d1d4d120c4c5
15875724 pylint update broke the build
Tim Foster <tim.s.foster@oracle.com>
parents:
2727
diff
changeset
|
48 |
/usr/bin/grep Version | \ |
d1d4d120c4c5
15875724 pylint update broke the build
Tim Foster <tim.s.foster@oracle.com>
parents:
2727
diff
changeset
|
49 |
/usr/bin/awk -F: '{print $$2}' | /usr/bin/sed -e 's/ //g' |
d1d4d120c4c5
15875724 pylint update broke the build
Tim Foster <tim.s.foster@oracle.com>
parents:
2727
diff
changeset
|
50 |
|
3261
f3806842a096
21699681 use cffi to rewrite C extension modules for Python 3 migration
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
3253
diff
changeset
|
51 |
PEP8 = /usr/bin/pep8 |
f3806842a096
21699681 use cffi to rewrite C extension modules for Python 3 migration
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
3253
diff
changeset
|
52 |
|
3321
52e8eec3014c
17377205 IPS should not use M2Crypto
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
3261
diff
changeset
|
53 |
SUBDIRS=zoneproxy util/mkcert |
859 | 54 |
|
55 |
all: $(SUBDIRS) |
|
3117
d588c32cf5e6
18735378 pkg should also deliver python 2.7 versions of modules
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
2892
diff
changeset
|
56 |
$(PYTHON27) setup.py build |
12 | 57 |
|
859 | 58 |
clean: $(SUBDIRS) |
3177
173c3b46334b
18735388 pkg utilities should switch to Python 2.7
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
3117
diff
changeset
|
59 |
$(PYTHON27) setup.py clean |
1980
b3eac2be24bb
15728 pkg(5) gate should build IPS packages by default
Danek Duvall <danek.duvall@oracle.com>
parents:
1516
diff
changeset
|
60 |
@cd pkg; pwd; make clean |
20
e5e53bc1c4d1
Cleaned up the build and install process. Turn the pkg directory into a
Danek Duvall <danek.duvall@sun.com>
parents:
12
diff
changeset
|
61 |
|
859 | 62 |
clobber: $(SUBDIRS) |
3177
173c3b46334b
18735388 pkg utilities should switch to Python 2.7
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
3117
diff
changeset
|
63 |
$(PYTHON27) setup.py clobber |
1980
b3eac2be24bb
15728 pkg(5) gate should build IPS packages by default
Danek Duvall <danek.duvall@oracle.com>
parents:
1516
diff
changeset
|
64 |
@cd pkg; pwd; make clobber |
859 | 65 |
|
2339
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
66 |
# |
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
67 |
# run pylint as part of the install target. |
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
68 |
# it's the best way to ensure things stay pylint clean. |
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
69 |
# |
859 | 70 |
install: $(SUBDIRS) |
3117
d588c32cf5e6
18735378 pkg should also deliver python 2.7 versions of modules
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
2892
diff
changeset
|
71 |
$(PYTHON27) setup.py install |
2339
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
72 |
|
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
73 |
lint: |
3177
173c3b46334b
18735388 pkg utilities should switch to Python 2.7
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
3117
diff
changeset
|
74 |
$(PYTHON27) setup.py lint |
2665
f9e0ba0b8e32
7161948 zoneproxy utilities are not lint clean
Danek Duvall <danek.duvall@oracle.com>
parents:
2626
diff
changeset
|
75 |
@cd zoneproxy; pwd; make lint |
2339
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
76 |
|
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
77 |
clint: |
3177
173c3b46334b
18735388 pkg utilities should switch to Python 2.7
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
3117
diff
changeset
|
78 |
$(PYTHON27) setup.py clint |
2665
f9e0ba0b8e32
7161948 zoneproxy utilities are not lint clean
Danek Duvall <danek.duvall@oracle.com>
parents:
2626
diff
changeset
|
79 |
@cd zoneproxy; pwd; make lint |
2339
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
80 |
|
2693
cfee571ea6d5
7154388 Progress tracking API and functionality improvements
Dan Price <daniel.price@oracle.com>
parents:
2665
diff
changeset
|
81 |
pylint: install |
3117
d588c32cf5e6
18735378 pkg should also deliver python 2.7 versions of modules
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
2892
diff
changeset
|
82 |
PYLINT_VER=$(PYLINT_VER_CMD:sh) $(PYTHON27) setup.py pylint |
3253
a4cdd6047bbd
21744189 fix build failure due to pylint update
yiteng <yiteng.zhang@oracle.com>
parents:
3217
diff
changeset
|
83 |
PYLINT_VER=$(PYLINT_VER_CMD:sh) $(PYTHON27) setup.py pylint_py3k |
33
c475e7f3eab8
actually include elf.c; move pkg-modules to just modules; hoist utility modules
Stephen Hahn <sch@sun.com>
parents:
30
diff
changeset
|
84 |
|
3261
f3806842a096
21699681 use cffi to rewrite C extension modules for Python 3 migration
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
3253
diff
changeset
|
85 |
pep8: |
f3806842a096
21699681 use cffi to rewrite C extension modules for Python 3 migration
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
3253
diff
changeset
|
86 |
$(PEP8) --statistics --count `cat tests/pep8-whitelist.txt` |
f3806842a096
21699681 use cffi to rewrite C extension modules for Python 3 migration
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
3253
diff
changeset
|
87 |
|
859 | 88 |
# |
89 |
# This rule propagates the current make target through all of the |
|
90 |
# subdirectories in $SUBDIRS. |
|
91 |
# |
|
92 |
$(SUBDIRS): FRC |
|
93 |
@cd $@; pwd; $(MAKE) $(TARGET) |
|
422
c69607a5bdce
2554 make install could stand to be quieter
Danek Duvall <danek.duvall@sun.com>
parents:
395
diff
changeset
|
94 |
|
1984
bb30566b95e9
16626 package build fails prior to build 143
Danek Duvall <danek.duvall@oracle.com>
parents:
1980
diff
changeset
|
95 |
# Use the bits we just built to create the packages. |
3261
f3806842a096
21699681 use cffi to rewrite C extension modules for Python 3 migration
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
3253
diff
changeset
|
96 |
packages: install pylint pep8 |
2626
7a066efa240e
7137237 importer: exit stage left (fix package build)
Danek Duvall <danek.duvall@oracle.com>
parents:
2535
diff
changeset
|
97 |
@cd pkg; pwd; $(MAKE) $(TARGET) check \ |
1984
bb30566b95e9
16626 package build fails prior to build 143
Danek Duvall <danek.duvall@oracle.com>
parents:
1980
diff
changeset
|
98 |
PATH=$$(hg root)/proto/root_$$(uname -p)/usr/bin:$$PATH \ |
3177
173c3b46334b
18735388 pkg utilities should switch to Python 2.7
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
3117
diff
changeset
|
99 |
PYTHONPATH=$$(hg root)/proto/root_$$(uname -p)/usr/lib/python2.7/vendor-packages |
30 | 100 |
|
101 |
test: |
|
3177
173c3b46334b
18735388 pkg utilities should switch to Python 2.7
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
3117
diff
changeset
|
102 |
$(PYTHON27) setup.py test |
181 | 103 |
|
430
3fb945d3bff3
2627 Test suite should have support for baselining
Brad Hall <bhall@eng.sun.com>
parents:
424
diff
changeset
|
104 |
test-verbose: |
3177
173c3b46334b
18735388 pkg utilities should switch to Python 2.7
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
3117
diff
changeset
|
105 |
$(PYTHON27) setup.py test -v |
430
3fb945d3bff3
2627 Test suite should have support for baselining
Brad Hall <bhall@eng.sun.com>
parents:
424
diff
changeset
|
106 |
|
2339
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
107 |
test-generate: |
3177
173c3b46334b
18735388 pkg utilities should switch to Python 2.7
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
3117
diff
changeset
|
108 |
$(PYTHON27) setup.py test -g |
448
bcfa99ac18b0
2664 test suite baseline enhancements
Brad Hall <bhall@eng.sun.com>
parents:
430
diff
changeset
|
109 |
|
859 | 110 |
FRC: |