Print this page
*** NO COMMENTS ***
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/tools/Makefile.python
+++ new/usr/src/tools/Makefile.python
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21
22 22 #
23 23 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24 24 #
25 25
26 26 #
27 27 # This Makefile provides a framework for building the onbld python
28 28 # modules with multiple versions of python.
29 29 #
30 30 # It expects as input:
31 31 #
32 32 # PYSRCS - List of python source files, these are also delivered as
33 33 # build product.
34 34 #
35 35 # PYOBJS - List of compiled python (.pyc) files, with no directory prefix
36 36 #
37 37 # PYTOPDIR - Absolute (including $(ROOT)) path to which files will
38 38 # be installed, up until the version specific component.
39 39 #
40 40 # PYMODDIR - Relative path to which files will be installed, below
41 41 # the version specific component.
42 42 #
43 43 # For example, to install to /opt/onbld/lib/onbld/python*/bar/
44 44 #
45 45 # PYTOPDIR = $(ROOTONBLDLIB)
46 46 # PYMODDIR = bar
47 47 #
48 48 #
49 49 # It provides as output:
50 50 #
51 51 # ROOTPYFILES - The list of $(ROOT)-relative paths to which python
52 52 # source and binary files will be installed. Your
53 53 # Makefile's 'install' target should depend upon
54 54 # this.
55 55 #
↓ open down ↓ |
55 lines elided |
↑ open up ↑ |
56 56 # PYVERSOBJS - The list of paths to compiled python build products,
57 57 # including their subdirectory.
58 58 #
59 59 # pyclobber - A target on which 'clobber' should depend, which
60 60 # removes the per-version python directories and the
61 61 # output within them.
62 62 #
63 63
64 64 PYFILES = $(PYSRCS) $(PYOBJS)
65 65
66 -ROOTPYDIR_24 = $(PYTOPDIR)/python2.4/$(PYMODDIR)
67 -ROOTPYFILES_24 = $(PYFILES:%=$(ROOTPYDIR_24)/%)
68 -
69 66 ROOTPYDIR_26 = $(PYTOPDIR)/python2.6/$(PYMODDIR)
70 67 ROOTPYFILES_26 = $(PYFILES:%=$(ROOTPYDIR_26)/%)
71 68
72 -ROOTPYFILES = $(ROOTPYFILES_24) $(ROOTPYFILES_26)
69 +ROOTPYFILES = $(ROOTPYFILES_26)
73 70 $(ROOTPYFILES) := FILEMODE = 0444
74 71
75 -PYVERSDIRS = python2.4 python2.6
72 +PYVERSDIRS = python2.6
76 73
77 -PY24OBJS = $(PYOBJS:%=python2.4/%)
78 -$(PY24OBJS) := PYTHON = $(PYTHON_24)
79 -
80 74 PY26OBJS = $(PYOBJS:%=python2.6/%)
81 75 $(PY26OBJS) := PYTHON = $(PYTHON_26)
82 76
83 -PYVERSOBJS = $(PY24OBJS) $(PY26OBJS)
77 +PYVERSOBJS = $(PY26OBJS)
84 78
85 79 CLOBBERFILES += $(PYVERSOBJS)
86 80 CLOBBERDIRS += $(PYVERSDIRS)
87 81
88 82 .KEEP_STATE:
89 83
90 -python2.4/%.pyc python2.6/%.pyc: %.py
84 +python2.6/%.pyc: %.py
91 85 @[ -d $(@D) ] || mkdir $(@D)
92 86 $(RM) $@
93 87 $(PYTHON) -mpy_compile $<
94 88 $(MV) $(*).pyc $@
95 89
96 -$(ROOTPYDIR_24)/%.pyc: python2.4/%.pyc
97 - $(INS.pyfile)
98 -
99 90 $(ROOTPYDIR_26)/%.pyc: python2.6/%.pyc
100 91 $(INS.pyfile)
101 92
102 -$(ROOTPYDIR_24)/%.py $(ROOTPYDIR_26)/%.py: %.py
93 +$(ROOTPYDIR_26)/%.py: %.py
103 94 $(INS.pyfile)
104 95
105 96 pyclobber:
106 97 $(RM) $(CLOBBERFILES)
107 98 $(RM) -rf $(CLOBBERDIRS)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX