author | ohair |
Tue, 26 Apr 2011 16:27:40 -0700 | |
changeset 9359 | 71368169c69d |
parent 8796 | 604a43386301 |
child 9456 | bd61a5644705 |
permissions | -rw-r--r-- |
2 | 1 |
# |
8796
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
2 |
# Copyright (c) 2005, 2011, 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 |
|
6681
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
36 |
# /usr/ccs/bin/ (m4, lex, yacc, as, ar, strip, mcs) |
2 | 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 |
|
8796
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
71 |
ifdef CROSS_COMPILE_ARCH |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
72 |
AR = $(COMPILER_PATH)ar |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
73 |
AS = $(COMPILER_PATH)as |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
74 |
LD = $(COMPILER_PATH)ld |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
75 |
MCS = $(COMPILER_PATH)mcs |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
76 |
NM = $(COMPILER_PATH)nm |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
77 |
STRIP = $(COMPILER_PATH)strip |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
78 |
else |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
79 |
AR = $(UTILS_CCS_BIN_PATH)ar |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
80 |
AS = $(UTILS_CCS_BIN_PATH)as |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
81 |
LD = $(UTILS_CCS_BIN_PATH)ld |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
82 |
MCS = $(UTILS_CCS_BIN_PATH)mcs |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
83 |
NM = $(UTILS_CCS_BIN_PATH)nm |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
84 |
STRIP = $(UTILS_CCS_BIN_PATH)strip |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
85 |
endif |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
86 |
|
2 | 87 |
ADB = $(UTILS_COMMAND_PATH)adb |
88 |
BASENAME = $(UTILS_COMMAND_PATH)basename |
|
3111
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
715
diff
changeset
|
89 |
BZIP2 = $(UTILS_COMMAND_PATH)bzip2 |
2 | 90 |
CAT = $(UTILS_COMMAND_PATH)cat |
91 |
CHMOD = $(UTILS_COMMAND_PATH)chmod |
|
92 |
CMP = $(UTILS_USR_BIN_PATH)cmp |
|
93 |
COMM = $(UTILS_USR_BIN_PATH)comm |
|
94 |
COMPRESS = $(UTILS_USR_BIN_PATH)compress |
|
95 |
CP = $(UTILS_COMMAND_PATH)cp |
|
96 |
CPIO = $(UTILS_COMMAND_PATH)cpio |
|
97 |
CUT = $(UTILS_USR_BIN_PATH)cut |
|
98 |
DATE = $(UTILS_COMMAND_PATH)date |
|
99 |
DF = $(UTILS_COMMAND_PATH)df |
|
100 |
DIFF = $(UTILS_USR_BIN_PATH)diff |
|
101 |
DIRNAME = $(UTILS_USR_BIN_PATH)dirname |
|
8008
753c38f4af83
6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents:
7668
diff
changeset
|
102 |
DUMP = $(UTILS_CCS_BIN_PATH)dump |
2 | 103 |
ECHO = $(UTILS_COMMAND_PATH)echo |
104 |
EGREP = $(UTILS_COMMAND_PATH)egrep |
|
105 |
EXPR = $(UTILS_USR_BIN_PATH)expr |
|
106 |
FILE = $(UTILS_USR_BIN_PATH)file |
|
107 |
FIND = $(UTILS_USR_BIN_PATH)find |
|
108 |
FMT = $(UTILS_COMMAND_PATH)fmt |
|
109 |
GDB = $(UTILS_USR_BIN_PATH)gdb |
|
110 |
GREP = $(UTILS_COMMAND_PATH)grep |
|
111 |
GUNZIP = $(UTILS_COMMAND_PATH)gunzip |
|
112 |
HEAD = $(UTILS_USR_BIN_PATH)head |
|
9359 | 113 |
HG = hg |
2 | 114 |
ID = $(UTILS_COMMAND_PATH)id |
115 |
ISAINFO = $(UTILS_COMMAND_PATH)isainfo |
|
116 |
KSH = $(UTILS_COMMAND_PATH)ksh |
|
8008
753c38f4af83
6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents:
7668
diff
changeset
|
117 |
LDD = $(UTILS_USR_BIN_PATH)ldd |
2 | 118 |
LEX = $(UTILS_CCS_BIN_PATH)lex |
119 |
LN = $(UTILS_COMMAND_PATH)ln |
|
120 |
LS = $(UTILS_COMMAND_PATH)ls |
|
121 |
M4 = $(UTILS_CCS_BIN_PATH)m4 |
|
122 |
MKDIR = $(UTILS_COMMAND_PATH)mkdir |
|
123 |
MKSINFO = $(UTILS_COMMAND_PATH)mksinfo |
|
124 |
MSGFMT = $(UTILS_USR_BIN_PATH)msgfmt |
|
125 |
MV = $(UTILS_COMMAND_PATH)mv |
|
126 |
NAWK = $(UTILS_USR_BIN_PATH)nawk |
|
127 |
PKGMK = $(UTILS_COMMAND_PATH)pkgmk |
|
128 |
PRINTF = $(UTILS_USR_BIN_PATH)printf |
|
129 |
PWD = $(UTILS_COMMAND_PATH)pwd |
|
8008
753c38f4af83
6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents:
7668
diff
changeset
|
130 |
READELF = $(UTILS_USR_BIN_PATH)readelf |
2 | 131 |
RMDIR = $(UTILS_COMMAND_PATH)rmdir |
132 |
RPM = $(UTILS_COMMAND_PATH)rpm |
|
133 |
RPMBUILD = $(UTILS_COMMAND_PATH)rpmbuild |
|
134 |
SED = $(UTILS_COMMAND_PATH)sed |
|
135 |
SH = $(UTILS_COMMAND_PATH)sh |
|
136 |
SHOWREV = $(UTILS_USR_BIN_PATH)showrev |
|
137 |
SORT = $(UTILS_COMMAND_PATH)sort |
|
138 |
TAIL = $(UTILS_USR_BIN_PATH)tail |
|
139 |
TAR = $(UTILS_COMMAND_PATH)tar |
|
140 |
TEST = $(UTILS_USR_BIN_PATH)test |
|
141 |
TOUCH = $(UTILS_COMMAND_PATH)touch |
|
142 |
TR = $(UTILS_USR_BIN_PATH)tr |
|
143 |
TRUE = $(UTILS_COMMAND_PATH)true |
|
144 |
UNAME = $(UTILS_COMMAND_PATH)uname |
|
145 |
UNIQ = $(UTILS_USR_BIN_PATH)uniq |
|
146 |
UNZIP = $(UTILS_USR_BIN_PATH)unzip |
|
147 |
UNZIPSFX = $(UTILS_DEVTOOL_PATH)unzipsfx |
|
8456 | 148 |
XARGS = $(UTILS_USR_BIN_PATH)xargs |
2 | 149 |
WC = $(UTILS_USR_BIN_PATH)wc |
150 |
WHICH = $(UTILS_USR_BIN_PATH)which |
|
151 |
YACC = $(UTILS_CCS_BIN_PATH)yacc |
|
152 |
ZIPEXE = $(UTILS_DEVTOOL_PATH)zip |
|
153 |
||
154 |
# Special cases |
|
155 |
#RM is defined by GNU Make as 'rm -f' |
|
156 |
CD = cd # intrinsic unix command |
|
157 |
||
158 |
# Windows specific |
|
159 |
ifeq ($(PLATFORM),windows) |
|
160 |
ifdef USING_CYGWIN |
|
161 |
# Intrinsic unix command, with backslash-escaped character interpretation |
|
162 |
ECHO = $(UNIXCOMMAND_PATH)echo -e |
|
163 |
ZIPEXE = $(UNIXCOMMAND_PATH)zip |
|
164 |
UNZIP = $(UNIXCOMMAND_PATH)unzip |
|
530
dbf0077bad01
6590549: Cygwin build of OpenJDK has problems and not very well documented
ohair
parents:
140
diff
changeset
|
165 |
# 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
|
166 |
NAWK = $(UNIXCOMMAND_PATH)awk -v BINMODE=w |
2 | 167 |
else |
168 |
ZIPEXE = $(UTILS_DEVTOOL_PATH)zip |
|
169 |
UNZIP = $(UTILS_DEVTOOL_PATH)unzip |
|
530
dbf0077bad01
6590549: Cygwin build of OpenJDK has problems and not very well documented
ohair
parents:
140
diff
changeset
|
170 |
NAWK = $(UNIXCOMMAND_PATH)awk |
2 | 171 |
endif |
172 |
# Re-define some utilities |
|
173 |
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
|
174 |
SHA1SUM = $(UNIXCOMMAND_PATH)openssl sha1 |
2 | 175 |
endif |
176 |
||
177 |
# Linux specific |
|
178 |
ifeq ($(PLATFORM),linux) |
|
179 |
# A few redefines |
|
180 |
# Allows for builds on Debian GNU Linux, basename is in a different place |
|
181 |
BASENAME=$(firstword $(wildcard $(UTILS_COMMAND_PATH)basename) \ |
|
182 |
$(wildcard $(UTILS_USR_BIN_PATH)basename)) |
|
183 |
# RPM 4 has replaced "rpm -b" with an entirely new utility "rpmbuild". |
|
184 |
# Also, some distribution (Ubuntu, Debian, others?) place the rpm command |
|
185 |
# itself in /usr/bin rather than it's traditional home in /bin. |
|
186 |
RPM=$(firstword $(wildcard $(UTILS_COMMAND_PATH)rpm) \ |
|
187 |
$(wildcard $(UTILS_USR_BIN_PATH)rpm)) |
|
188 |
RPMBUILD=$(firstword $(wildcard $(UTILS_COMMAND_PATH)rpmbuild) \ |
|
189 |
$(wildcard $(UTILS_USR_BIN_PATH)rpmbuild) \ |
|
190 |
$(wildcard $(UTILS_COMMAND_PATH)rpm) \ |
|
191 |
$(wildcard $(UTILS_USR_BIN_PATH)rpm)) |
|
192 |
# Most Linux distros have "sort" in /bin. Ubuntu, Debian and perhaps |
|
193 |
# others have it in /usr/bin. |
|
194 |
SORT=$(firstword $(wildcard $(UTILS_COMMAND_PATH)sort) \ |
|
195 |
$(wildcard $(UTILS_USR_BIN_PATH)sort)) |
|
196 |
NAWK = $(USRBIN_PATH)gawk |
|
197 |
# Intrinsic unix command, with backslash-escaped character interpretation |
|
198 |
ECHO = /bin/echo -e |
|
6681
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
199 |
# These are really in UTILS_USR_BIN_PATH on Linux |
8796
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
200 |
ifndef CROSS_COMPILE_ARCH |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
201 |
AR = $(UTILS_USR_BIN_PATH)ar |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
202 |
AS = $(UTILS_USR_BIN_PATH)as |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
203 |
LD = $(UTILS_USR_BIN_PATH)ld |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
204 |
MCS = $(UTILS_USR_BIN_PATH)mcs |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
205 |
NM = $(UTILS_USR_BIN_PATH)nm |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
206 |
STRIP = $(UTILS_USR_BIN_PATH)strip |
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8458
diff
changeset
|
207 |
endif |
2 | 208 |
LEX = $(UTILS_USR_BIN_PATH)lex |
209 |
M4 = $(UTILS_USR_BIN_PATH)m4 |
|
210 |
YACC = $(UTILS_USR_BIN_PATH)yacc |
|
211 |
endif |
|
212 |
||
213 |
# Solaris specific |
|
214 |
ifeq ($(PLATFORM),solaris) |
|
215 |
# Intrinsic unix command, with backslash-escaped character interpretation |
|
216 |
# (not using -e will cause build failure when using /bin/bash) |
|
217 |
# (using -e breaks something else) |
|
218 |
ECHO = /usr/bin/echo |
|
219 |
endif |
|
220 |