src/Makefile
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--
17377205 IPS should not use M2Crypto 22332625 test suite should test signing certs with unsupported extensions 16718631 pkg verify traceback "AttributeError: 'int' object has no attribute 'check__ca'"
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
     1
#
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
     2
# CDDL HEADER START
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
     3
#
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
     7
#
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
    10
# See the License for the specific language governing permissions
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
    11
# and limitations under the License.
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
    12
#
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
    18
#
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
    19
# CDDL HEADER END
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
    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
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
    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
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
    24
#
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
    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
f06ad6cb4b3f stop using flavour terminology
Stephen Hahn <sch@sun.com>
parents: 29
diff changeset
    28
f06ad6cb4b3f stop using flavour terminology
Stephen Hahn <sch@sun.com>
parents: 29
diff changeset
    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
40d571fa6ebc Revamp cli-complete test suite.
Dan Price <dp@eng.sun.com>
parents: 164
diff changeset
    38
test := TARGET = test
40d571fa6ebc Revamp cli-complete test suite.
Dan Price <dp@eng.sun.com>
parents: 164
diff changeset
    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
f06ad6cb4b3f stop using flavour terminology
Stephen Hahn <sch@sun.com>
parents: 29
diff changeset
    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
a5c1965ad78e 3821 gui build is noisy again
Dan Price <dp@eng.sun.com>
parents: 849
diff changeset
    54
a5c1965ad78e 3821 gui build is noisy again
Dan Price <dp@eng.sun.com>
parents: 849
diff changeset
    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
30ebd8d6274f sequence version now a timestamp
"Stephen Hahn <sch@sun.com>"
parents:
diff changeset
    57
859
a5c1965ad78e 3821 gui build is noisy again
Dan Price <dp@eng.sun.com>
parents: 849
diff changeset
    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
a5c1965ad78e 3821 gui build is noisy again
Dan Price <dp@eng.sun.com>
parents: 849
diff changeset
    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
a5c1965ad78e 3821 gui build is noisy again
Dan Price <dp@eng.sun.com>
parents: 849
diff changeset
    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
a5c1965ad78e 3821 gui build is noisy again
Dan Price <dp@eng.sun.com>
parents: 849
diff changeset
    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
a5c1965ad78e 3821 gui build is noisy again
Dan Price <dp@eng.sun.com>
parents: 849
diff changeset
    88
#
a5c1965ad78e 3821 gui build is noisy again
Dan Price <dp@eng.sun.com>
parents: 849
diff changeset
    89
# This rule propagates the current make target through all of the
a5c1965ad78e 3821 gui build is noisy again
Dan Price <dp@eng.sun.com>
parents: 849
diff changeset
    90
# subdirectories in $SUBDIRS.
a5c1965ad78e 3821 gui build is noisy again
Dan Price <dp@eng.sun.com>
parents: 849
diff changeset
    91
#
a5c1965ad78e 3821 gui build is noisy again
Dan Price <dp@eng.sun.com>
parents: 849
diff changeset
    92
$(SUBDIRS): FRC
a5c1965ad78e 3821 gui build is noisy again
Dan Price <dp@eng.sun.com>
parents: 849
diff changeset
    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
f06ad6cb4b3f stop using flavour terminology
Stephen Hahn <sch@sun.com>
parents: 29
diff changeset
   100
f06ad6cb4b3f stop using flavour terminology
Stephen Hahn <sch@sun.com>
parents: 29
diff changeset
   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
40d571fa6ebc Revamp cli-complete test suite.
Dan Price <dp@eng.sun.com>
parents: 164
diff changeset
   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
a5c1965ad78e 3821 gui build is noisy again
Dan Price <dp@eng.sun.com>
parents: 849
diff changeset
   110
FRC: