author | Norm Jacobs <Norm.Jacobs@Sun.COM> |
Wed, 10 Nov 2010 11:52:54 -0600 | |
changeset 48 | 1bb7f3eccdd6 |
parent 47 | 28ef4b1fcfb1 |
child 49 | 13d31a6d756e |
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 |
|
43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset
|
58 |
SFWBIN = /usr/sfw/bin |
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset
|
59 |
SFWLIB = /usr/sfw/lib |
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset
|
60 |
PROTOSFWBIN = $(PROTO_DIR)/$(SFWBIN) |
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset
|
61 |
PROTOSFWLIB = $(PROTO_DIR)/$(SFWLIB) |
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset
|
62 |
|
16
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset
|
63 |
# 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
|
64 |
# 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
|
65 |
# 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
|
66 |
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
|
67 |
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
|
68 |
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
|
69 |
|
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
|
70 |
# 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
|
71 |
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
|
72 |
|
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 |
# 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
|
74 |
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
|
75 |
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
|
76 |
|
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 |
# 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
|
78 |
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
|
79 |
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
|
80 |
|
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 |
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
|
82 |
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
|
83 |
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
|
84 |
|
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
|
85 |
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
|
86 |
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
|
87 |
INSTALL_32_and_64 = $(INSTALL_32) $(INSTALL_64) |
2 | 88 |
|
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
|
89 |
# 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
|
90 |
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
|
91 |
|
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 |
SPRO_ROOT = $(BUILD_TOOLS)/SUNWspro |
43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset
|
93 |
SPRO_VROOT = $(SPRO_ROOT)/sunstudio12.1 |
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
|
94 |
|
2 | 95 |
GCC_ROOT = /usr/gnu |
96 |
||
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
|
97 |
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
|
98 |
CCC.studio.32 = $(SPRO_VROOT)/bin/CC -m32 |
2 | 99 |
|
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
|
100 |
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
|
101 |
CCC.studio.64 = $(SPRO_VROOT)/bin/CC -m64 |
2 | 102 |
|
103 |
CC.gcc.32 = $(GCC_ROOT)/bin/cc -m32 |
|
104 |
CCC.gcc.32 = $(GCC_ROOT)/bin/CC -m32 |
|
105 |
||
106 |
CC.gcc.64 = $(GCC_ROOT)/bin/cc -m64 |
|
107 |
CCC.gcc.64 = $(GCC_ROOT)/bin/CC -m64 |
|
108 |
||
109 |
CC = $(CC.$(COMPILER).$(BITS)) |
|
110 |
CCC = $(CCC.$(COMPILER).$(BITS)) |
|
111 |
||
16
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset
|
112 |
LD = /usr/bin/ld |
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset
|
113 |
|
2 | 114 |
PYTHON.2.4.32 = /usr/bin/python2.4 |
47
28ef4b1fcfb1
64-bit python should use $(MACH64), not amd64
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
43
diff
changeset
|
115 |
PYTHON.2.4.64 = /usr/bin/$(MACH64)/python2.4 |
2 | 116 |
|
117 |
PYTHON.2.6.32 = /usr/bin/python2.6 |
|
47
28ef4b1fcfb1
64-bit python should use $(MACH64), not amd64
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
43
diff
changeset
|
118 |
PYTHON.2.6.64 = /usr/bin/$(MACH64)/python2.6 |
2 | 119 |
|
120 |
PYTHON.32 = $(PYTHON.$(PYTHON_VERSION).$(BITS)) |
|
121 |
PYTHON.64 = $(PYTHON.$(PYTHON_VERSION).$(BITS)) |
|
122 |
||
123 |
GMAKE = /usr/gnu/bin/make |
|
124 |
GPATCH = /usr/gnu/bin/patch |
|
125 |
GPATCH_FLAGS = -p1 -b |
|
126 |
||
127 |
PKGSEND = /usr/bin/pkgsend |
|
128 |
||
129 |
TOUCH = /usr/bin/touch |
|
130 |
MKDIR = /bin/mkdir -p |
|
131 |
RM = /bin/rm -f |
|
7
d42300cb8715
add license/copyright info for ips generation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
6
diff
changeset
|
132 |
CP = /bin/cp -f |
43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset
|
133 |
LN = /bin/ln |
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset
|
134 |
SYMLINK = /bin/ln -s |
16
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset
|
135 |
ENV = /usr/bin/env |
43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset
|
136 |
INSTALL = /usr/bin/ginstall |