author | Norm Jacobs <Norm.Jacobs@Sun.COM> |
Tue, 19 Oct 2010 15:39:47 -0500 | |
changeset 40 | 84267c1130e9 |
parent 38 | cd00ea74156e |
child 43 | 9f5ebe30300c |
permissions | -rw-r--r-- |
2 | 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 |
# |
|
21 |
# Copyright (c) 2010, Oracle and/or it's affiliates. All rights reserved. |
|
22 |
# |
|
23 |
||
32
280a7444e782
automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
31
diff
changeset
|
24 |
PATH=/usr/bin:/usr/gnu/bin |
280a7444e782
automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
31
diff
changeset
|
25 |
|
2 | 26 |
CONSOLIDATION = userland |
27 |
PUBLISHER = $(CONSOLIDATION)-build |
|
26
8a9f4e791832
packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
16
diff
changeset
|
28 |
|
38
cd00ea74156e
package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
34
diff
changeset
|
29 |
IS_GLOBAL_ZONE = $(shell /usr/sbin/zoneadm list | grep -c global) |
cd00ea74156e
package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
34
diff
changeset
|
30 |
ROOT = / |
cd00ea74156e
package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
34
diff
changeset
|
31 |
|
29
eb4177698749
Generate the build number from the most recent mercurial tag
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
26
diff
changeset
|
32 |
# get the most recent build number from the last mercurial tag |
eb4177698749
Generate the build number from the most recent mercurial tag
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
26
diff
changeset
|
33 |
LAST_HG_TAG = $(shell hg tags -q | head -2 | tail -1) |
eb4177698749
Generate the build number from the most recent mercurial tag
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
26
diff
changeset
|
34 |
LAST_BUILD_NUM = $(LAST_HG_TAG:build-%=%) |
eb4177698749
Generate the build number from the most recent mercurial tag
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
26
diff
changeset
|
35 |
|
26
8a9f4e791832
packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
16
diff
changeset
|
36 |
OS_VERSION = $(shell uname -r) |
8a9f4e791832
packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
16
diff
changeset
|
37 |
SOLARIS_VERSION = $(OS_VERSION:5.%=2.%) |
29
eb4177698749
Generate the build number from the most recent mercurial tag
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
26
diff
changeset
|
38 |
BUILD_NUM = 0.$(shell expr $(LAST_BUILD_NUM) + 1) |
26
8a9f4e791832
packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
16
diff
changeset
|
39 |
BUILD_VERSION = $(OS_VERSION)-$(BUILD_NUM) |
2 | 40 |
|
38
cd00ea74156e
package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
34
diff
changeset
|
41 |
|
2 | 42 |
COMPILER = studio |
6
20f80c019d73
add compiler date/time chatter reduction tools
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2
diff
changeset
|
43 |
BITS = 32 |
2 | 44 |
PYTHON_VERSION = 2.6 |
31
90e0c3ea3281
Implement support for builds with multiple versions of python.
Danek Duvall <danek.duvall@oracle.com>
parents:
29
diff
changeset
|
45 |
PYTHON_VERSIONS = 2.4 2.6 |
2 | 46 |
|
47 |
WS_LOGS = $(WS_TOP)/logs |
|
34
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset
|
48 |
WS_REPO = $(WS_TOP)/repo |
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset
|
49 |
WS_TOOLS = $(WS_TOP)/tools |
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset
|
50 |
WS_MAKE_RULES = $(WS_TOP)/make-rules |
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset
|
51 |
WS_COMPONENTS = $(WS_TOP)/components |
2 | 52 |
|
34
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset
|
53 |
BASS_O_MATIC = $(WS_TOOLS)/bass-o-matic |
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset
|
54 |
|
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset
|
55 |
PKG_REPO = file:$(WS_REPO) |
12
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
56 |
PROTO_DIR = $(shell pwd)/$(COMPONENT_SRC)/installed-prototype-$(MACH) |
2 | 57 |
|
16
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset
|
58 |
# work around _TIME, _DATE, embedded date chatter in component builds |
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset
|
59 |
# to use, set TIME_CONSTANT in the component Makefile and add $(CONSTANT_TIME) |
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset
|
60 |
# to the appropriate {CONFIGURE|BUILD|INSTALL}_ENV |
34
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset
|
61 |
CONSTANT_TIME = LD_PRELOAD_32=$(WS_TOOLS)/time-$(MACH32).so |
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset
|
62 |
CONSTANT_TIME += LD_PRELOAD_64=$(WS_TOOLS)/time-$(MACH64).so |
16
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset
|
63 |
CONSTANT_TIME += TIME_CONSTANT=$(TIME_CONSTANT) |
6
20f80c019d73
add compiler date/time chatter reduction tools
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2
diff
changeset
|
64 |
|
12
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
65 |
# set MACH from uname -p to either sparc or i386 |
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
66 |
MACH = $(shell uname -p) |
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
67 |
|
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
68 |
# set MACH32 from MACH to either sparcv7 or i86 |
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
69 |
MACH32_1 = $(MACH:sparc=sparcv7) |
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
70 |
MACH32 = $(MACH32_1:i386=i86) |
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
71 |
|
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
72 |
# set MACH64 from MACH to either sparcv9 or amd64 |
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
73 |
MACH64_1 = $(MACH:sparc=sparcv9) |
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
74 |
MACH64 = $(MACH64_1:i386=amd64) |
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
75 |
|
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
76 |
BUILD_32 = $(COMPONENT_SRC)/build-$(MACH32)/.built |
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
77 |
BUILD_64 = $(COMPONENT_SRC)/build-$(MACH64)/.built |
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
78 |
BUILD_32_and_64 = $(BUILD_32) $(BUILD_64) |
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
79 |
|
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
80 |
INSTALL_32 = $(COMPONENT_SRC)/build-$(MACH32)/.installed |
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
81 |
INSTALL_64 = $(COMPONENT_SRC)/build-$(MACH64)/.installed |
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset
|
82 |
INSTALL_32_and_64 = $(INSTALL_32) $(INSTALL_64) |
2 | 83 |
|
40
84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset
|
84 |
# BUILD_TOOLS is the root of all tools not normally installed on the system. |
84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset
|
85 |
BUILD_TOOLS = /ws/onnv-tools |
84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset
|
86 |
|
84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset
|
87 |
SPRO_ROOT = $(BUILD_TOOLS)/SUNWspro |
84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset
|
88 |
SPRO_VROOT = $(SPRO_ROOT)/SS12 |
84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset
|
89 |
|
2 | 90 |
GCC_ROOT = /usr/gnu |
91 |
||
40
84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset
|
92 |
CC.studio.32 = $(SPRO_VROOT)/bin/cc -m32 |
84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset
|
93 |
CCC.studio.32 = $(SPRO_VROOT)/bin/CC -m32 |
2 | 94 |
|
40
84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset
|
95 |
CC.studio.64 = $(SPRO_VROOT)/bin/cc -m64 |
84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset
|
96 |
CCC.studio.64 = $(SPRO_VROOT)/bin/CC -m64 |
2 | 97 |
|
98 |
CC.gcc.32 = $(GCC_ROOT)/bin/cc -m32 |
|
99 |
CCC.gcc.32 = $(GCC_ROOT)/bin/CC -m32 |
|
100 |
||
101 |
CC.gcc.64 = $(GCC_ROOT)/bin/cc -m64 |
|
102 |
CCC.gcc.64 = $(GCC_ROOT)/bin/CC -m64 |
|
103 |
||
104 |
CC = $(CC.$(COMPILER).$(BITS)) |
|
105 |
CCC = $(CCC.$(COMPILER).$(BITS)) |
|
106 |
||
16
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset
|
107 |
LD = /usr/bin/ld |
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset
|
108 |
|
2 | 109 |
PYTHON.2.4.32 = /usr/bin/python2.4 |
110 |
PYTHON.2.4.64 = /usr/bin/amd64/python2.4 |
|
111 |
||
112 |
PYTHON.2.6.32 = /usr/bin/python2.6 |
|
113 |
PYTHON.2.6.64 = /usr/bin/amd64/python2.6 |
|
114 |
||
115 |
PYTHON.32 = $(PYTHON.$(PYTHON_VERSION).$(BITS)) |
|
116 |
PYTHON.64 = $(PYTHON.$(PYTHON_VERSION).$(BITS)) |
|
117 |
||
118 |
GMAKE = /usr/gnu/bin/make |
|
119 |
GPATCH = /usr/gnu/bin/patch |
|
120 |
GPATCH_FLAGS = -p1 -b |
|
121 |
||
122 |
PKGSEND = /usr/bin/pkgsend |
|
123 |
||
124 |
TOUCH = /usr/bin/touch |
|
125 |
MKDIR = /bin/mkdir -p |
|
126 |
RM = /bin/rm -f |
|
7
d42300cb8715
add license/copyright info for ips generation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
6
diff
changeset
|
127 |
CP = /bin/cp -f |
16
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset
|
128 |
ENV = /usr/bin/env |