jdk/make/common/shared/Defs-utils.gmk
author alanb
Fri, 02 Nov 2012 15:50:11 +0000
changeset 14342 8435a30053c1
parent 14091 e5c8662f325d
child 15825 cbb8bc2c35da
permissions -rw-r--r--
7197491: update copyright year to match last edit in jdk8 jdk repository Reviewed-by: chegar, ksrini
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
14342
8435a30053c1 7197491: update copyright year to match last edit in jdk8 jdk repository
alanb
parents: 14091
diff changeset
     2
# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3111
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3111
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
#
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3111
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3111
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3111
diff changeset
    23
# questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
# Shared variables for standard unix utilties on all platforms.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
# Assumes Platform.gmk has been included before this file.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
# These input UTILS_* variables can be defined at anytime, ideally once.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#         Unix Commands: Normally /bin/, /usr/bin/. or C:/mksnt/mksnt/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
#            UTILS_COMMAND_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
#         /usr/bin/ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    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
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
#            UTILS_CCS_BIN_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
#         Dev Tools: zip, unzip, etc that we may have special versions of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
#            UTILS_DEVTOOL_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
# WARNING:  This file cannot assume that any of these utilties are available
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
#           to be run via their variable names defined here.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
#           The paths inside the UTILS_* variables may not be defined yet.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
# Note: There is no guarantee that all these exist on all platforms.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
#       Some only make sense for one platform, but are harmless.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
ifeq ($(PLATFORM),linux)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
  UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
  UTILS_USR_BIN_PATH=$(USRBIN_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
  UTILS_CCS_BIN_PATH=$(USRBIN_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
  UTILS_DEVTOOL_PATH=$(USRBIN_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
ifeq ($(PLATFORM),solaris)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
  UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
  UTILS_USR_BIN_PATH=$(UNIXCOMMAND_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
  UTILS_CCS_BIN_PATH=$(UNIXCCS_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
  UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
ifeq ($(PLATFORM),windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
  UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
  UTILS_USR_BIN_PATH=$(UNIXCOMMAND_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
  UTILS_CCS_BIN_PATH=$(UNIXCOMMAND_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
  UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
    70
ifeq ($(PLATFORM),macosx)
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
    71
  UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH)
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
    72
  UTILS_USR_BIN_PATH=$(USRBIN_PATH)
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
    73
  UTILS_CCS_BIN_PATH=$(USRBIN_PATH)
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
    74
  UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH)
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
    75
endif
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
    76
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
# 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
    78
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
    79
  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
    80
  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
    81
  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
    82
  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
    83
  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
    84
  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
    85
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
    86
  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
    87
  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
    88
  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
    89
  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
    90
  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
    91
  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
    92
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
    93
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
ADB            = $(UTILS_COMMAND_PATH)adb
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
BASENAME       = $(UTILS_COMMAND_PATH)basename
3111
fefdeafb7ab9 6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents: 715
diff changeset
    96
BZIP2          = $(UTILS_COMMAND_PATH)bzip2
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
CAT            = $(UTILS_COMMAND_PATH)cat
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
CHMOD          = $(UTILS_COMMAND_PATH)chmod
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
CMP            = $(UTILS_USR_BIN_PATH)cmp
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
COMM           = $(UTILS_USR_BIN_PATH)comm
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
COMPRESS       = $(UTILS_USR_BIN_PATH)compress
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
CP             = $(UTILS_COMMAND_PATH)cp
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
CPIO           = $(UTILS_COMMAND_PATH)cpio
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
CUT            = $(UTILS_USR_BIN_PATH)cut
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
DATE           = $(UTILS_COMMAND_PATH)date
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
DF             = $(UTILS_COMMAND_PATH)df
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
DIFF           = $(UTILS_USR_BIN_PATH)diff
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
DIRNAME        = $(UTILS_USR_BIN_PATH)dirname
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7668
diff changeset
   109
DUMP           = $(UTILS_CCS_BIN_PATH)dump
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
ECHO           = $(UTILS_COMMAND_PATH)echo
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
EGREP          = $(UTILS_COMMAND_PATH)egrep
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
EXPR           = $(UTILS_USR_BIN_PATH)expr
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
FILE           = $(UTILS_USR_BIN_PATH)file
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
FIND           = $(UTILS_USR_BIN_PATH)find
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
FMT            = $(UTILS_COMMAND_PATH)fmt
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
GDB            = $(UTILS_USR_BIN_PATH)gdb
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
GREP           = $(UTILS_COMMAND_PATH)grep
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
GUNZIP         = $(UTILS_COMMAND_PATH)gunzip
9456
bd61a5644705 7026163: gzip tar files
cl
parents: 9359
diff changeset
   119
# GZIP is used for solaris. Linux and windows use tar czf
bd61a5644705 7026163: gzip tar files
cl
parents: 9359
diff changeset
   120
GZIP           = $(UTILS_COMMAND_PATH)gzip
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
HEAD           = $(UTILS_USR_BIN_PATH)head
9359
71368169c69d 6631003: Add hg tip changeset to build image
ohair
parents: 8796
diff changeset
   122
HG             = hg
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
ID             = $(UTILS_COMMAND_PATH)id
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
ISAINFO        = $(UTILS_COMMAND_PATH)isainfo
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
KSH            = $(UTILS_COMMAND_PATH)ksh
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7668
diff changeset
   126
LDD            = $(UTILS_USR_BIN_PATH)ldd
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
LEX            = $(UTILS_CCS_BIN_PATH)lex
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
LN             = $(UTILS_COMMAND_PATH)ln
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
LS             = $(UTILS_COMMAND_PATH)ls
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
M4             = $(UTILS_CCS_BIN_PATH)m4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
MKDIR          = $(UTILS_COMMAND_PATH)mkdir
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
MKSINFO        = $(UTILS_COMMAND_PATH)mksinfo
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
MSGFMT         = $(UTILS_USR_BIN_PATH)msgfmt
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
MV             = $(UTILS_COMMAND_PATH)mv
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
NAWK           = $(UTILS_USR_BIN_PATH)nawk
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   136
OTOOL          = $(UTILS_USR_BIN_PATH)otool
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
PKGMK          = $(UTILS_COMMAND_PATH)pkgmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
PRINTF         = $(UTILS_USR_BIN_PATH)printf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
PWD            = $(UTILS_COMMAND_PATH)pwd
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7668
diff changeset
   140
READELF        = $(UTILS_USR_BIN_PATH)readelf
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
RMDIR          = $(UTILS_COMMAND_PATH)rmdir
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
RPM            = $(UTILS_COMMAND_PATH)rpm
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
RPMBUILD       = $(UTILS_COMMAND_PATH)rpmbuild
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
SED            = $(UTILS_COMMAND_PATH)sed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
SH             = $(UTILS_COMMAND_PATH)sh
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
SHOWREV        = $(UTILS_USR_BIN_PATH)showrev
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
SORT           = $(UTILS_COMMAND_PATH)sort
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
TAIL           = $(UTILS_USR_BIN_PATH)tail
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
TAR            = $(UTILS_COMMAND_PATH)tar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
TEST           = $(UTILS_USR_BIN_PATH)test
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
TOUCH          = $(UTILS_COMMAND_PATH)touch
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
TR             = $(UTILS_USR_BIN_PATH)tr
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
TRUE           = $(UTILS_COMMAND_PATH)true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
UNAME          = $(UTILS_COMMAND_PATH)uname
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
UNIQ           = $(UTILS_USR_BIN_PATH)uniq
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
UNZIP          = $(UTILS_USR_BIN_PATH)unzip
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
UNZIPSFX       = $(UTILS_DEVTOOL_PATH)unzipsfx
8456
1ca6360372d5 7021753: Add a build times report
ohrstrom
parents: 8008
diff changeset
   158
XARGS          = $(UTILS_USR_BIN_PATH)xargs
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
WC             = $(UTILS_USR_BIN_PATH)wc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
WHICH          = $(UTILS_USR_BIN_PATH)which
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
YACC           = $(UTILS_CCS_BIN_PATH)yacc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
ZIPEXE         = $(UTILS_DEVTOOL_PATH)zip
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
# Special cases
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
#RM   is defined by GNU Make as 'rm -f'
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
CD             = cd # intrinsic unix command
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
# Windows specific
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
ifeq ($(PLATFORM),windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
  ifdef USING_CYGWIN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
    # Intrinsic unix command, with backslash-escaped character interpretation
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12047
diff changeset
   172
    ECHO     = $(UNIXCOMMAND_PATH)echo -e
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12047
diff changeset
   173
    ZIPEXE   = $(UNIXCOMMAND_PATH)zip
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12047
diff changeset
   174
    UNZIP    = $(UNIXCOMMAND_PATH)unzip
530
dbf0077bad01 6590549: Cygwin build of OpenJDK has problems and not very well documented
ohair
parents: 140
diff changeset
   175
    # Some CYGWIN nawk versions require BINMODE=w for proper '\r' interpretation
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12047
diff changeset
   176
    NAWK     = $(UNIXCOMMAND_PATH)awk -v BINMODE=w
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
    ZIPEXE = $(UTILS_DEVTOOL_PATH)zip
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
    UNZIP  = $(UTILS_DEVTOOL_PATH)unzip
530
dbf0077bad01 6590549: Cygwin build of OpenJDK has problems and not very well documented
ohair
parents: 140
diff changeset
   180
    NAWK   = $(UNIXCOMMAND_PATH)awk
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12047
diff changeset
   181
    ifdef USING_MSYS
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12047
diff changeset
   182
      ECHO   = $(UTILS_COMMAND_PATH)echo -e
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12047
diff changeset
   183
      AR     = $(UTILS_DEVTOOL_PATH)ar
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12047
diff changeset
   184
    endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
  # Re-define some utilities
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
  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
   188
  SHA1SUM        = $(UNIXCOMMAND_PATH)openssl sha1
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
# Linux specific
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
ifeq ($(PLATFORM),linux)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
  # A few redefines
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
  # Allows for builds on Debian GNU Linux, basename is in a different place
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
  BASENAME=$(firstword $(wildcard $(UTILS_COMMAND_PATH)basename) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
                       $(wildcard $(UTILS_USR_BIN_PATH)basename))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
  # RPM 4 has replaced "rpm -b" with an entirely new utility "rpmbuild".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
  # Also, some distribution (Ubuntu, Debian, others?) place the rpm command
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
  # itself in /usr/bin rather than it's traditional home in /bin.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
  RPM=$(firstword $(wildcard $(UTILS_COMMAND_PATH)rpm) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
		  $(wildcard $(UTILS_USR_BIN_PATH)rpm))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
  RPMBUILD=$(firstword $(wildcard $(UTILS_COMMAND_PATH)rpmbuild) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
		       $(wildcard $(UTILS_USR_BIN_PATH)rpmbuild) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
		       $(wildcard $(UTILS_COMMAND_PATH)rpm) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
		       $(wildcard $(UTILS_USR_BIN_PATH)rpm))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
  # Most Linux distros have "sort" in /bin.  Ubuntu, Debian and perhaps
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
  # others have it in /usr/bin.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
  SORT=$(firstword $(wildcard $(UTILS_COMMAND_PATH)sort) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
		   $(wildcard $(UTILS_USR_BIN_PATH)sort))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
  NAWK           = $(USRBIN_PATH)gawk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
  # Intrinsic unix command, with backslash-escaped character interpretation
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
  ECHO           = /bin/echo -e
6681
e721d11e4826 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5506
diff changeset
   213
  # 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
   214
  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
   215
    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
   216
    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
   217
    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
   218
    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
   219
    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
   220
    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
   221
  endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
  LEX            = $(UTILS_USR_BIN_PATH)lex
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
  M4             = $(UTILS_USR_BIN_PATH)m4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
  YACC           = $(UTILS_USR_BIN_PATH)yacc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
# Solaris specific
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
ifeq ($(PLATFORM),solaris)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
  # Intrinsic unix command, with backslash-escaped character interpretation
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
  #   (not using -e  will cause build failure when using /bin/bash)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
  #   (using -e breaks something else)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
  ECHO           = /usr/bin/echo
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   235
ifeq ($(PLATFORM), macosx) 
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   236
  BASENAME     = $(UTILS_USR_BIN_PATH)basename
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   237
  EGREP        = $(UTILS_USR_BIN_PATH)egrep
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   238
  EXPR         = $(UTILS_COMMAND_PATH)expr
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   239
  FMT          = $(UTILS_USR_BIN_PATH)fmt
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   240
  GREP         = $(UTILS_USR_BIN_PATH)grep
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   241
  GUNZIP       = $(UTILS_USR_BIN_PATH)gunzip
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   242
  ID           = $(UTILS_USR_BIN_PATH)id
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   243
  MSGFMT       = $(UTILS_DEVTOOL_PATH)msgfmt
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   244
  SED          = $(UTILS_USR_BIN_PATH)sed
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   245
  SORT         = $(UTILS_USR_BIN_PATH)sort
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   246
  TEST         = $(UTILS_COMMAND_PATH)test
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   247
  TOUCH        = $(UTILS_USR_BIN_PATH)touch
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   248
  TRUE         = $(UTILS_USR_BIN_PATH)true
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   249
  UNAME        = $(UTILS_USR_BIN_PATH)uname
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   250
  NAWK         = $(UTILS_USR_BIN_PATH)awk
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   251
  UNZIPSFX     = $(UTILS_USR_BIN_PATH)unzipsfx
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   252
  ZIPEXE       = $(UTILS_USR_BIN_PATH)zip
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   253
  CPIO         = $(UTILS_USR_BIN_PATH)cpio
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   254
  TAR          = $(UTILS_USR_BIN_PATH)tar
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   255
  # Builtin shell command, no -e option needed
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   256
  ECHO         = echo
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 9456
diff changeset
   257
endif