author | ohair |
Tue, 09 Sep 2008 15:46:54 -0700 | |
changeset 1196 | 8004ddea3ea2 |
parent 4 | 02bb8761fcce |
child 2192 | 7e916cf3102a |
permissions | -rw-r--r-- |
4 | 1 |
# |
1196
8004ddea3ea2
6746424: Remove build dependency on findbugs and FINDBUGS_HOME
ohair
parents:
4
diff
changeset
|
2 |
# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. |
4 | 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 |
|
7 |
# published by the Free Software Foundation. Sun designates this |
|
8 |
# particular file as subject to the "Classpath" exception as provided |
|
9 |
# by Sun in the LICENSE file that accompanied this code. |
|
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 |
# |
|
21 |
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
22 |
# CA 95054 USA or visit www.sun.com if you need additional information or |
|
23 |
# have any questions. |
|
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 |
|
75 |
CAT = $(UTILS_COMMAND_PATH)cat |
|
76 |
CHMOD = $(UTILS_COMMAND_PATH)chmod |
|
77 |
CMP = $(UTILS_USR_BIN_PATH)cmp |
|
78 |
COMM = $(UTILS_USR_BIN_PATH)comm |
|
79 |
COMPRESS = $(UTILS_USR_BIN_PATH)compress |
|
80 |
CP = $(UTILS_COMMAND_PATH)cp |
|
81 |
CPIO = $(UTILS_COMMAND_PATH)cpio |
|
82 |
CUT = $(UTILS_USR_BIN_PATH)cut |
|
83 |
DATE = $(UTILS_COMMAND_PATH)date |
|
84 |
DF = $(UTILS_COMMAND_PATH)df |
|
85 |
DIFF = $(UTILS_USR_BIN_PATH)diff |
|
86 |
DIRNAME = $(UTILS_USR_BIN_PATH)dirname |
|
87 |
ECHO = $(UTILS_COMMAND_PATH)echo |
|
88 |
EGREP = $(UTILS_COMMAND_PATH)egrep |
|
89 |
EXPR = $(UTILS_USR_BIN_PATH)expr |
|
90 |
FILE = $(UTILS_USR_BIN_PATH)file |
|
91 |
FIND = $(UTILS_USR_BIN_PATH)find |
|
92 |
FMT = $(UTILS_COMMAND_PATH)fmt |
|
93 |
GDB = $(UTILS_USR_BIN_PATH)gdb |
|
94 |
GREP = $(UTILS_COMMAND_PATH)grep |
|
95 |
GUNZIP = $(UTILS_COMMAND_PATH)gunzip |
|
96 |
HEAD = $(UTILS_USR_BIN_PATH)head |
|
97 |
ID = $(UTILS_COMMAND_PATH)id |
|
98 |
ISAINFO = $(UTILS_COMMAND_PATH)isainfo |
|
99 |
KSH = $(UTILS_COMMAND_PATH)ksh |
|
100 |
LD = $(UTILS_CCS_BIN_PATH)ld |
|
101 |
LEX = $(UTILS_CCS_BIN_PATH)lex |
|
102 |
LN = $(UTILS_COMMAND_PATH)ln |
|
103 |
LS = $(UTILS_COMMAND_PATH)ls |
|
104 |
MCS = $(UTILS_CCS_BIN_PATH)mcs |
|
105 |
M4 = $(UTILS_CCS_BIN_PATH)m4 |
|
106 |
MKDIR = $(UTILS_COMMAND_PATH)mkdir |
|
107 |
MKSINFO = $(UTILS_COMMAND_PATH)mksinfo |
|
108 |
MSGFMT = $(UTILS_USR_BIN_PATH)msgfmt |
|
109 |
MV = $(UTILS_COMMAND_PATH)mv |
|
110 |
NAWK = $(UTILS_USR_BIN_PATH)nawk |
|
111 |
NM = $(UTILS_CCS_BIN_PATH)nm |
|
112 |
PKGMK = $(UTILS_COMMAND_PATH)pkgmk |
|
113 |
PRINTF = $(UTILS_USR_BIN_PATH)printf |
|
114 |
PWD = $(UTILS_COMMAND_PATH)pwd |
|
115 |
RC = $(UTILS_COMMAND_PATH)rc |
|
116 |
RMDIR = $(UTILS_COMMAND_PATH)rmdir |
|
117 |
RPM = $(UTILS_COMMAND_PATH)rpm |
|
118 |
RPMBUILD = $(UTILS_COMMAND_PATH)rpmbuild |
|
119 |
SCCS = $(UTILS_CCS_BIN_PATH)sccs |
|
120 |
SED = $(UTILS_COMMAND_PATH)sed |
|
121 |
SH = $(UTILS_COMMAND_PATH)sh |
|
122 |
SHOWREV = $(UTILS_USR_BIN_PATH)showrev |
|
123 |
SORT = $(UTILS_COMMAND_PATH)sort |
|
124 |
STRIP = $(UTILS_CCS_BIN_PATH)strip |
|
125 |
TAIL = $(UTILS_USR_BIN_PATH)tail |
|
126 |
TAR = $(UTILS_COMMAND_PATH)tar |
|
127 |
TEST = $(UTILS_USR_BIN_PATH)test |
|
128 |
TOUCH = $(UTILS_COMMAND_PATH)touch |
|
129 |
TR = $(UTILS_USR_BIN_PATH)tr |
|
130 |
TRUE = $(UTILS_COMMAND_PATH)true |
|
131 |
UNAME = $(UTILS_COMMAND_PATH)uname |
|
132 |
UNIQ = $(UTILS_USR_BIN_PATH)uniq |
|
133 |
UNZIP = $(UTILS_USR_BIN_PATH)unzip |
|
134 |
UNZIPSFX = $(UTILS_DEVTOOL_PATH)unzipsfx |
|
135 |
WC = $(UTILS_USR_BIN_PATH)wc |
|
136 |
WHICH = $(UTILS_USR_BIN_PATH)which |
|
137 |
YACC = $(UTILS_CCS_BIN_PATH)yacc |
|
138 |
ZIPEXE = $(UTILS_DEVTOOL_PATH)zip |
|
139 |
||
140 |
# Special cases |
|
141 |
#RM is defined by GNU Make as 'rm -f' |
|
142 |
CD = cd # intrinsic unix command |
|
143 |
||
144 |
# Windows specific |
|
145 |
ifeq ($(PLATFORM),windows) |
|
146 |
ifdef USING_CYGWIN |
|
147 |
# Intrinsic unix command, with backslash-escaped character interpretation |
|
148 |
ECHO = $(UNIXCOMMAND_PATH)echo -e |
|
149 |
ZIPEXE = $(UNIXCOMMAND_PATH)zip |
|
150 |
UNZIP = $(UNIXCOMMAND_PATH)unzip |
|
151 |
else |
|
152 |
ZIPEXE = $(UTILS_DEVTOOL_PATH)zip |
|
153 |
UNZIP = $(UTILS_DEVTOOL_PATH)unzip |
|
154 |
endif |
|
155 |
# Re-define some utilities |
|
156 |
LEX =# override GNU Make intrinsic: no lex on windows |
|
157 |
NAWK = $(UNIXCOMMAND_PATH)awk |
|
158 |
endif |
|
159 |
||
160 |
# Linux specific |
|
161 |
ifeq ($(PLATFORM),linux) |
|
162 |
# A few redefines |
|
163 |
# Allows for builds on Debian GNU Linux, basename is in a different place |
|
164 |
BASENAME=$(firstword $(wildcard $(UTILS_COMMAND_PATH)basename) \ |
|
165 |
$(wildcard $(UTILS_USR_BIN_PATH)basename)) |
|
166 |
# RPM 4 has replaced "rpm -b" with an entirely new utility "rpmbuild". |
|
167 |
# Also, some distribution (Ubuntu, Debian, others?) place the rpm command |
|
168 |
# itself in /usr/bin rather than it's traditional home in /bin. |
|
169 |
RPM=$(firstword $(wildcard $(UTILS_COMMAND_PATH)rpm) \ |
|
170 |
$(wildcard $(UTILS_USR_BIN_PATH)rpm)) |
|
171 |
RPMBUILD=$(firstword $(wildcard $(UTILS_COMMAND_PATH)rpmbuild) \ |
|
172 |
$(wildcard $(UTILS_USR_BIN_PATH)rpmbuild) \ |
|
173 |
$(wildcard $(UTILS_COMMAND_PATH)rpm) \ |
|
174 |
$(wildcard $(UTILS_USR_BIN_PATH)rpm)) |
|
175 |
# Most Linux distros have "sort" in /bin. Ubuntu, Debian and perhaps |
|
176 |
# others have it in /usr/bin. |
|
177 |
SORT=$(firstword $(wildcard $(UTILS_COMMAND_PATH)sort) \ |
|
178 |
$(wildcard $(UTILS_USR_BIN_PATH)sort)) |
|
179 |
NAWK = $(USRBIN_PATH)gawk |
|
180 |
# Intrinsic unix command, with backslash-escaped character interpretation |
|
181 |
ECHO = /bin/echo -e |
|
182 |
# These are really in UTILS_USR_BIN_PATH on Linux (only sccs is not) |
|
183 |
AR = $(UTILS_USR_BIN_PATH)ar |
|
184 |
AS = $(UTILS_USR_BIN_PATH)as |
|
185 |
LD = $(UTILS_USR_BIN_PATH)ld |
|
186 |
LEX = $(UTILS_USR_BIN_PATH)lex |
|
187 |
MCS = $(UTILS_USR_BIN_PATH)mcs |
|
188 |
M4 = $(UTILS_USR_BIN_PATH)m4 |
|
189 |
NM = $(UTILS_USR_BIN_PATH)nm |
|
190 |
STRIP = $(UTILS_USR_BIN_PATH)strip |
|
191 |
YACC = $(UTILS_USR_BIN_PATH)yacc |
|
192 |
endif |
|
193 |
||
194 |
# Solaris specific |
|
195 |
ifeq ($(PLATFORM),solaris) |
|
196 |
# Intrinsic unix command, with backslash-escaped character interpretation |
|
197 |
# (not using -e will cause build failure when using /bin/bash) |
|
198 |
# (using -e breaks something else) |
|
199 |
ECHO = /usr/bin/echo |
|
200 |
endif |
|
201 |