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