author | Yiteng Zhang <yiteng.zhang@oracle.com> |
Mon, 09 Sep 2013 10:52:27 -0700 | |
changeset 2942 | 17aad7c202b0 |
parent 2892 | ab4b61eb9b57 |
child 3117 | d588c32cf5e6 |
child 3220 | a57f735c208a |
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 |
# |
2892
ab4b61eb9b57
15824872 SUNBT7206345 pkg update on machine with a NGZ fails
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2828
diff
changeset
|
23 |
# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. |
12 | 24 |
# |
25 |
||
1516
8c950a3b4171
10485 move pkg(5) to Python 2.6
Rich Burridge <rich.burridge@sun.com>
parents:
1513
diff
changeset
|
26 |
PYTHON = /usr/bin/python2.6 |
30 | 27 |
|
28 |
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
|
29 |
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
|
30 |
packages := TARGET = install |
124
99d3dd6ad07c
clean up installation and other makefile targets
Danek Duvall <danek.duvall@sun.com>
parents:
120
diff
changeset
|
31 |
clean := TARGET = clean |
99d3dd6ad07c
clean up installation and other makefile targets
Danek Duvall <danek.duvall@sun.com>
parents:
120
diff
changeset
|
32 |
clobber := TARGET = clobber |
2339
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
33 |
lint := TARGET = lint |
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
34 |
clint := TARGET = clint |
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
35 |
pylint := TARGET = pylint |
181 | 36 |
test := TARGET = test |
37 |
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
|
38 |
test-generate := TARGET = test-generate |
30 | 39 |
|
2892
ab4b61eb9b57
15824872 SUNBT7206345 pkg update on machine with a NGZ fails
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2828
diff
changeset
|
40 |
# |
ab4b61eb9b57
15824872 SUNBT7206345 pkg update on machine with a NGZ fails
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2828
diff
changeset
|
41 |
# 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
|
42 |
# 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
|
43 |
# 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
|
44 |
# |
ab4b61eb9b57
15824872 SUNBT7206345 pkg update on machine with a NGZ fails
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2828
diff
changeset
|
45 |
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
|
46 |
/usr/bin/grep Version | \ |
d1d4d120c4c5
15875724 pylint update broke the build
Tim Foster <tim.s.foster@oracle.com>
parents:
2727
diff
changeset
|
47 |
/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
|
48 |
|
2535
8dca919216c6
18768 need to remove CDDL from installed files
Danek Duvall <danek.duvall@oracle.com>
parents:
2510
diff
changeset
|
49 |
SUBDIRS=zoneproxy tsol |
859 | 50 |
|
51 |
all: $(SUBDIRS) |
|
395
0ae5e72ba7ee
1958 Modify setup.py to handle pkgrecv
Tom Mueller <Tom.Mueller@sun.com>
parents:
382
diff
changeset
|
52 |
$(PYTHON) setup.py build |
12 | 53 |
|
859 | 54 |
clean: $(SUBDIRS) |
55 |
$(PYTHON) 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
|
56 |
@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
|
57 |
|
859 | 58 |
clobber: $(SUBDIRS) |
59 |
$(PYTHON) 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
|
60 |
@cd pkg; pwd; make clobber |
859 | 61 |
|
2339
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
62 |
# |
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
63 |
# 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
|
64 |
# 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
|
65 |
# |
859 | 66 |
install: $(SUBDIRS) |
67 |
$(PYTHON) setup.py install |
|
2339
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
68 |
|
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
69 |
lint: |
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
70 |
$(PYTHON) setup.py lint |
2665
f9e0ba0b8e32
7161948 zoneproxy utilities are not lint clean
Danek Duvall <danek.duvall@oracle.com>
parents:
2626
diff
changeset
|
71 |
@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
|
72 |
|
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
73 |
clint: |
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
74 |
$(PYTHON) setup.py clint |
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 |
|
2693
cfee571ea6d5
7154388 Progress tracking API and functionality improvements
Dan Price <daniel.price@oracle.com>
parents:
2665
diff
changeset
|
77 |
pylint: install |
2828
d1d4d120c4c5
15875724 pylint update broke the build
Tim Foster <tim.s.foster@oracle.com>
parents:
2727
diff
changeset
|
78 |
PYLINT_VER=$(PYLINT_VER_CMD:sh) $(PYTHON) setup.py pylint |
33
c475e7f3eab8
actually include elf.c; move pkg-modules to just modules; hoist utility modules
Stephen Hahn <sch@sun.com>
parents:
30
diff
changeset
|
79 |
|
859 | 80 |
# |
81 |
# This rule propagates the current make target through all of the |
|
82 |
# subdirectories in $SUBDIRS. |
|
83 |
# |
|
84 |
$(SUBDIRS): FRC |
|
85 |
@cd $@; pwd; $(MAKE) $(TARGET) |
|
422
c69607a5bdce
2554 make install could stand to be quieter
Danek Duvall <danek.duvall@sun.com>
parents:
395
diff
changeset
|
86 |
|
1984
bb30566b95e9
16626 package build fails prior to build 143
Danek Duvall <danek.duvall@oracle.com>
parents:
1980
diff
changeset
|
87 |
# Use the bits we just built to create the packages. |
2510
f48530fd135d
18440 pkgrepo should be able to list packages
Shawn Walker <shawn.walker@oracle.com>
parents:
2490
diff
changeset
|
88 |
packages: install pylint |
2626
7a066efa240e
7137237 importer: exit stage left (fix package build)
Danek Duvall <danek.duvall@oracle.com>
parents:
2535
diff
changeset
|
89 |
@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
|
90 |
PATH=$$(hg root)/proto/root_$$(uname -p)/usr/bin:$$PATH \ |
bb30566b95e9
16626 package build fails prior to build 143
Danek Duvall <danek.duvall@oracle.com>
parents:
1980
diff
changeset
|
91 |
PYTHONPATH=$$(hg root)/proto/root_$$(uname -p)/usr/lib/python2.6/vendor-packages |
30 | 92 |
|
93 |
test: |
|
395
0ae5e72ba7ee
1958 Modify setup.py to handle pkgrecv
Tom Mueller <Tom.Mueller@sun.com>
parents:
382
diff
changeset
|
94 |
$(PYTHON) setup.py test |
181 | 95 |
|
430
3fb945d3bff3
2627 Test suite should have support for baselining
Brad Hall <bhall@eng.sun.com>
parents:
424
diff
changeset
|
96 |
test-verbose: |
3fb945d3bff3
2627 Test suite should have support for baselining
Brad Hall <bhall@eng.sun.com>
parents:
424
diff
changeset
|
97 |
$(PYTHON) setup.py test -v |
3fb945d3bff3
2627 Test suite should have support for baselining
Brad Hall <bhall@eng.sun.com>
parents:
424
diff
changeset
|
98 |
|
2339
aa5954c06b9d
16148 need linked image support for zones, phase 1
Edward Pilatowicz <edward.pilatowicz@oracle.com>
parents:
2338
diff
changeset
|
99 |
test-generate: |
430
3fb945d3bff3
2627 Test suite should have support for baselining
Brad Hall <bhall@eng.sun.com>
parents:
424
diff
changeset
|
100 |
$(PYTHON) setup.py test -g |
448
bcfa99ac18b0
2664 test suite baseline enhancements
Brad Hall <bhall@eng.sun.com>
parents:
430
diff
changeset
|
101 |
|
859 | 102 |
FRC: |