author | never |
Mon, 12 Jul 2010 22:27:18 -0700 | |
changeset 5926 | a36f90d986b6 |
parent 5506 | 202f599c92aa |
child 6681 | e721d11e4826 |
permissions | -rw-r--r-- |
2 | 1 |
# |
5506 | 2 |
# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
# |
|
5 |
# This code is free software; you can redistribute it and/or modify it |
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
2 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
# |
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
# accompanied this code). |
|
16 |
# |
|
17 |
# You should have received a copy of the GNU General Public License version |
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
# |
|
5506 | 21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
# or visit www.oracle.com if you need additional information or have any |
|
23 |
# questions. |
|
2 | 24 |
# |
25 |
||
26 |
# |
|
27 |
# Shared variables for standard unix utilties on all platforms. |
|
28 |
# |
|
29 |
# Assumes Platform.gmk has been included before this file. |
|
30 |
# |
|
31 |
# These input UTILS_* variables can be defined at anytime, ideally once. |
|
32 |
# Unix Commands: Normally /bin/, /usr/bin/. or C:/mksnt/mksnt/ |
|
33 |
# UTILS_COMMAND_PATH |
|
34 |
# /usr/bin/ |
|
35 |
# UTILS_USR_BIN_PATH |
|
36 |
# /usr/ccs/bin/ (sccs, m4, lex, yacc, as, ar, strip, mcs) |
|
37 |
# UTILS_CCS_BIN_PATH |
|
38 |
# Dev Tools: zip, unzip, etc that we may have special versions of |
|
39 |
# UTILS_DEVTOOL_PATH |
|
40 |
# |
|
41 |
# WARNING: This file cannot assume that any of these utilties are available |
|
42 |
# to be run via their variable names defined here. |
|
43 |
# The paths inside the UTILS_* variables may not be defined yet. |
|
44 |
# |
|
45 |
# Note: There is no guarantee that all these exist on all platforms. |
|
46 |
# Some only make sense for one platform, but are harmless. |
|
47 |
# |
|
48 |
||
49 |
ifeq ($(PLATFORM),linux) |
|
50 |
UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH) |
|
51 |
UTILS_USR_BIN_PATH=$(USRBIN_PATH) |
|
52 |
UTILS_CCS_BIN_PATH=$(USRBIN_PATH) |
|
53 |
UTILS_DEVTOOL_PATH=$(USRBIN_PATH) |
|
54 |
endif |
|
55 |
||
56 |
ifeq ($(PLATFORM),solaris) |
|
57 |
UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH) |
|
58 |
UTILS_USR_BIN_PATH=$(UNIXCOMMAND_PATH) |
|
59 |
UTILS_CCS_BIN_PATH=$(UNIXCCS_PATH) |
|
60 |
UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH) |
|
61 |
endif |
|
62 |
||
63 |
ifeq ($(PLATFORM),windows) |
|
64 |
UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH) |
|
65 |
UTILS_USR_BIN_PATH=$(UNIXCOMMAND_PATH) |
|
66 |
UTILS_CCS_BIN_PATH=$(UNIXCOMMAND_PATH) |
|
67 |
UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH) |
|
68 |
endif |
|
69 |
||
70 |
# Utilities |
|
71 |
ADB = $(UTILS_COMMAND_PATH)adb |
|
72 |
AR = $(UTILS_CCS_BIN_PATH)ar |
|
73 |
AS = $(UTILS_CCS_BIN_PATH)as |
|
74 |
BASENAME = $(UTILS_COMMAND_PATH)basename |
|
3111
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
715
diff
changeset
|
75 |
BZIP2 = $(UTILS_COMMAND_PATH)bzip2 |
2 | 76 |
CAT = $(UTILS_COMMAND_PATH)cat |
77 |
CHMOD = $(UTILS_COMMAND_PATH)chmod |
|
78 |
CMP = $(UTILS_USR_BIN_PATH)cmp |
|
79 |
COMM = $(UTILS_USR_BIN_PATH)comm |
|
80 |
COMPRESS = $(UTILS_USR_BIN_PATH)compress |
|
81 |
CP = $(UTILS_COMMAND_PATH)cp |
|
82 |
CPIO = $(UTILS_COMMAND_PATH)cpio |
|
83 |
CUT = $(UTILS_USR_BIN_PATH)cut |
|
84 |
DATE = $(UTILS_COMMAND_PATH)date |
|
85 |
DF = $(UTILS_COMMAND_PATH)df |
|
86 |
DIFF = $(UTILS_USR_BIN_PATH)diff |
|
87 |
DIRNAME = $(UTILS_USR_BIN_PATH)dirname |
|
88 |
ECHO = $(UTILS_COMMAND_PATH)echo |
|
89 |
EGREP = $(UTILS_COMMAND_PATH)egrep |
|
90 |
EXPR = $(UTILS_USR_BIN_PATH)expr |
|
91 |
FILE = $(UTILS_USR_BIN_PATH)file |
|
92 |
FIND = $(UTILS_USR_BIN_PATH)find |
|
93 |
FMT = $(UTILS_COMMAND_PATH)fmt |
|
94 |
GDB = $(UTILS_USR_BIN_PATH)gdb |
|
95 |
GREP = $(UTILS_COMMAND_PATH)grep |
|
96 |
GUNZIP = $(UTILS_COMMAND_PATH)gunzip |
|
97 |
HEAD = $(UTILS_USR_BIN_PATH)head |
|
98 |
ID = $(UTILS_COMMAND_PATH)id |
|
99 |
ISAINFO = $(UTILS_COMMAND_PATH)isainfo |
|
100 |
KSH = $(UTILS_COMMAND_PATH)ksh |
|
101 |
LD = $(UTILS_CCS_BIN_PATH)ld |
|
102 |
LEX = $(UTILS_CCS_BIN_PATH)lex |
|
103 |
LN = $(UTILS_COMMAND_PATH)ln |
|
104 |
LS = $(UTILS_COMMAND_PATH)ls |
|
105 |
MCS = $(UTILS_CCS_BIN_PATH)mcs |
|
106 |
M4 = $(UTILS_CCS_BIN_PATH)m4 |
|
107 |
MKDIR = $(UTILS_COMMAND_PATH)mkdir |
|
108 |
MKSINFO = $(UTILS_COMMAND_PATH)mksinfo |
|
109 |
MSGFMT = $(UTILS_USR_BIN_PATH)msgfmt |
|
110 |
MV = $(UTILS_COMMAND_PATH)mv |
|
111 |
NAWK = $(UTILS_USR_BIN_PATH)nawk |
|
112 |
NM = $(UTILS_CCS_BIN_PATH)nm |
|
113 |
PKGMK = $(UTILS_COMMAND_PATH)pkgmk |
|
114 |
PRINTF = $(UTILS_USR_BIN_PATH)printf |
|
115 |
PWD = $(UTILS_COMMAND_PATH)pwd |
|
116 |
RC = $(UTILS_COMMAND_PATH)rc |
|
117 |
RMDIR = $(UTILS_COMMAND_PATH)rmdir |
|
118 |
RPM = $(UTILS_COMMAND_PATH)rpm |
|
119 |
RPMBUILD = $(UTILS_COMMAND_PATH)rpmbuild |
|
120 |
SCCS = $(UTILS_CCS_BIN_PATH)sccs |
|
121 |
SED = $(UTILS_COMMAND_PATH)sed |
|
122 |
SH = $(UTILS_COMMAND_PATH)sh |
|
123 |
SHOWREV = $(UTILS_USR_BIN_PATH)showrev |
|
124 |
SORT = $(UTILS_COMMAND_PATH)sort |
|
125 |
STRIP = $(UTILS_CCS_BIN_PATH)strip |
|
126 |
TAIL = $(UTILS_USR_BIN_PATH)tail |
|
127 |
TAR = $(UTILS_COMMAND_PATH)tar |
|
128 |
TEST = $(UTILS_USR_BIN_PATH)test |
|
129 |
TOUCH = $(UTILS_COMMAND_PATH)touch |
|
130 |
TR = $(UTILS_USR_BIN_PATH)tr |
|
131 |
TRUE = $(UTILS_COMMAND_PATH)true |
|
132 |
UNAME = $(UTILS_COMMAND_PATH)uname |
|
133 |
UNIQ = $(UTILS_USR_BIN_PATH)uniq |
|
134 |
UNZIP = $(UTILS_USR_BIN_PATH)unzip |
|
135 |
UNZIPSFX = $(UTILS_DEVTOOL_PATH)unzipsfx |
|
136 |
WC = $(UTILS_USR_BIN_PATH)wc |
|
137 |
WHICH = $(UTILS_USR_BIN_PATH)which |
|
138 |
YACC = $(UTILS_CCS_BIN_PATH)yacc |
|
139 |
ZIPEXE = $(UTILS_DEVTOOL_PATH)zip |
|
140 |
||
141 |
# Special cases |
|
142 |
#RM is defined by GNU Make as 'rm -f' |
|
143 |
CD = cd # intrinsic unix command |
|
144 |
||
145 |
# Windows specific |
|
146 |
ifeq ($(PLATFORM),windows) |
|
147 |
ifdef USING_CYGWIN |
|
148 |
# Intrinsic unix command, with backslash-escaped character interpretation |
|
149 |
ECHO = $(UNIXCOMMAND_PATH)echo -e |
|
150 |
ZIPEXE = $(UNIXCOMMAND_PATH)zip |
|
151 |
UNZIP = $(UNIXCOMMAND_PATH)unzip |
|
530
dbf0077bad01
6590549: Cygwin build of OpenJDK has problems and not very well documented
ohair
parents:
140
diff
changeset
|
152 |
# Some CYGWIN nawk versions require BINMODE=w for proper '\r' interpretation |
dbf0077bad01
6590549: Cygwin build of OpenJDK has problems and not very well documented
ohair
parents:
140
diff
changeset
|
153 |
NAWK = $(UNIXCOMMAND_PATH)awk -v BINMODE=w |
2 | 154 |
else |
155 |
ZIPEXE = $(UTILS_DEVTOOL_PATH)zip |
|
156 |
UNZIP = $(UTILS_DEVTOOL_PATH)unzip |
|
530
dbf0077bad01
6590549: Cygwin build of OpenJDK has problems and not very well documented
ohair
parents:
140
diff
changeset
|
157 |
NAWK = $(UNIXCOMMAND_PATH)awk |
2 | 158 |
endif |
159 |
# Re-define some utilities |
|
160 |
LEX =# override GNU Make intrinsic: no lex on windows |
|
3111
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
715
diff
changeset
|
161 |
SHA1SUM = $(UNIXCOMMAND_PATH)openssl sha1 |
2 | 162 |
endif |
163 |
||
164 |
# Linux specific |
|
165 |
ifeq ($(PLATFORM),linux) |
|
166 |
# A few redefines |
|
167 |
# Allows for builds on Debian GNU Linux, basename is in a different place |
|
168 |
BASENAME=$(firstword $(wildcard $(UTILS_COMMAND_PATH)basename) \ |
|
169 |
$(wildcard $(UTILS_USR_BIN_PATH)basename)) |
|
170 |
# RPM 4 has replaced "rpm -b" with an entirely new utility "rpmbuild". |
|
171 |
# Also, some distribution (Ubuntu, Debian, others?) place the rpm command |
|
172 |
# itself in /usr/bin rather than it's traditional home in /bin. |
|
173 |
RPM=$(firstword $(wildcard $(UTILS_COMMAND_PATH)rpm) \ |
|
174 |
$(wildcard $(UTILS_USR_BIN_PATH)rpm)) |
|
175 |
RPMBUILD=$(firstword $(wildcard $(UTILS_COMMAND_PATH)rpmbuild) \ |
|
176 |
$(wildcard $(UTILS_USR_BIN_PATH)rpmbuild) \ |
|
177 |
$(wildcard $(UTILS_COMMAND_PATH)rpm) \ |
|
178 |
$(wildcard $(UTILS_USR_BIN_PATH)rpm)) |
|
179 |
# Most Linux distros have "sort" in /bin. Ubuntu, Debian and perhaps |
|
180 |
# others have it in /usr/bin. |
|
181 |
SORT=$(firstword $(wildcard $(UTILS_COMMAND_PATH)sort) \ |
|
182 |
$(wildcard $(UTILS_USR_BIN_PATH)sort)) |
|
183 |
NAWK = $(USRBIN_PATH)gawk |
|
184 |
# Intrinsic unix command, with backslash-escaped character interpretation |
|
185 |
ECHO = /bin/echo -e |
|
186 |
# These are really in UTILS_USR_BIN_PATH on Linux (only sccs is not) |
|
187 |
AR = $(UTILS_USR_BIN_PATH)ar |
|
188 |
AS = $(UTILS_USR_BIN_PATH)as |
|
189 |
LD = $(UTILS_USR_BIN_PATH)ld |
|
190 |
LEX = $(UTILS_USR_BIN_PATH)lex |
|
191 |
MCS = $(UTILS_USR_BIN_PATH)mcs |
|
192 |
M4 = $(UTILS_USR_BIN_PATH)m4 |
|
193 |
NM = $(UTILS_USR_BIN_PATH)nm |
|
194 |
STRIP = $(UTILS_USR_BIN_PATH)strip |
|
195 |
YACC = $(UTILS_USR_BIN_PATH)yacc |
|
196 |
endif |
|
197 |
||
198 |
# Solaris specific |
|
199 |
ifeq ($(PLATFORM),solaris) |
|
200 |
# Intrinsic unix command, with backslash-escaped character interpretation |
|
201 |
# (not using -e will cause build failure when using /bin/bash) |
|
202 |
# (using -e breaks something else) |
|
203 |
ECHO = /usr/bin/echo |
|
204 |
endif |
|
205 |