author  Norm Jacobs <Norm.Jacobs@Sun.COM> 
Fri, 26 Nov 2010 14:46:14 0600  
changeset 49  13d31a6d756e 
parent 47  28ef4b1fcfb1 
child 53  e398cb2c4b45 
permissions  rwrr 
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)/makerules 
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

51 
WS_COMPONENTS = $(WS_TOP)/components 
49  52 
WS_INCORPORATIONS = $(WS_TOP)/incorporations 
2  53 

34
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

54 
BASS_O_MATIC = $(WS_TOOLS)/bassomatic 
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

55 

d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

56 
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

57 
PROTO_DIR = $(shell pwd)/$(COMPONENT_SRC)/installedprototype$(MACH) 
2  58 

43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

59 
SFWBIN = /usr/sfw/bin 
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

60 
SFWLIB = /usr/sfw/lib 
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

61 
PROTOSFWBIN = $(PROTO_DIR)/$(SFWBIN) 
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

62 
PROTOSFWLIB = $(PROTO_DIR)/$(SFWLIB) 
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

63 

16
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset

64 
# 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

65 
# 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

66 
# to the appropriate {CONFIGUREBUILDINSTALL}_ENV 
34
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

67 
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

68 
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

69 
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

70 

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

71 
# 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

72 
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

73 

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 
# 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

75 
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

76 
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

77 

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 
# 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

79 
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

80 
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

81 

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_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

83 
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

84 
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

85 

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_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

87 
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

88 
INSTALL_32_and_64 = $(INSTALL_32) $(INSTALL_64) 
2  89 

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

90 
# 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

91 
BUILD_TOOLS = /ws/onnvtools 
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 

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 
SPRO_ROOT = $(BUILD_TOOLS)/SUNWspro 
43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

94 
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

95 

2  96 
GCC_ROOT = /usr/gnu 
97 

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

98 
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

99 
CCC.studio.32 = $(SPRO_VROOT)/bin/CC m32 
2  100 

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

101 
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

102 
CCC.studio.64 = $(SPRO_VROOT)/bin/CC m64 
2  103 

104 
CC.gcc.32 = $(GCC_ROOT)/bin/cc m32 

105 
CCC.gcc.32 = $(GCC_ROOT)/bin/CC m32 

106 

107 
CC.gcc.64 = $(GCC_ROOT)/bin/cc m64 

108 
CCC.gcc.64 = $(GCC_ROOT)/bin/CC m64 

109 

110 
CC = $(CC.$(COMPILER).$(BITS)) 

111 
CCC = $(CCC.$(COMPILER).$(BITS)) 

112 

16
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset

113 
LD = /usr/bin/ld 
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset

114 

2  115 
PYTHON.2.4.32 = /usr/bin/python2.4 
47
28ef4b1fcfb1
64bit python should use $(MACH64), not amd64
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
43
diff
changeset

116 
PYTHON.2.4.64 = /usr/bin/$(MACH64)/python2.4 
2  117 

118 
PYTHON.2.6.32 = /usr/bin/python2.6 

47
28ef4b1fcfb1
64bit python should use $(MACH64), not amd64
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
43
diff
changeset

119 
PYTHON.2.6.64 = /usr/bin/$(MACH64)/python2.6 
2  120 

121 
PYTHON.32 = $(PYTHON.$(PYTHON_VERSION).$(BITS)) 

122 
PYTHON.64 = $(PYTHON.$(PYTHON_VERSION).$(BITS)) 

123 

124 
GMAKE = /usr/gnu/bin/make 

125 
GPATCH = /usr/gnu/bin/patch 

126 
GPATCH_FLAGS = p1 b 

127 

128 
PKGSEND = /usr/bin/pkgsend 

129 

130 
TOUCH = /usr/bin/touch 

131 
MKDIR = /bin/mkdir p 

132 
RM = /bin/rm f 

7
d42300cb8715
add license/copyright info for ips generation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
6
diff
changeset

133 
CP = /bin/cp f 
43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

134 
LN = /bin/ln 
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

135 
SYMLINK = /bin/ln s 
16
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset

136 
ENV = /usr/bin/env 
43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

137 
INSTALL = /usr/bin/ginstall 