### view jdk/make/common/shared/Defs-utils.gmk @ 14091:e5c8662f325d

7152336: Enable builds on Windows with MinGW/MSYS Summary: Minimal makefile changes to enable building OpenJDK using MSYS on Windows7 Reviewed-by: ohair, tbell Contributed-by: volker.simonis@gmail.com
author tbell Tue, 23 Oct 2012 10:10:23 -0700 320a714614e9 8435a30053c1
line wrap: on
line source
```#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# or visit www.oracle.com if you need additional information or have any
# questions.
#

#
# Shared variables for standard unix utilties on all platforms.
#
# Assumes Platform.gmk has been included before this file.
#
# These input UTILS_* variables can be defined at anytime, ideally once.
#         Unix Commands: Normally /bin/, /usr/bin/. or C:/mksnt/mksnt/
#            UTILS_COMMAND_PATH
#         /usr/bin/
#            UTILS_USR_BIN_PATH
#         /usr/ccs/bin/ (m4, lex, yacc, as, ar, strip, mcs)
#            UTILS_CCS_BIN_PATH
#         Dev Tools: zip, unzip, etc that we may have special versions of
#            UTILS_DEVTOOL_PATH
#
# WARNING:  This file cannot assume that any of these utilties are available
#           to be run via their variable names defined here.
#           The paths inside the UTILS_* variables may not be defined yet.
#
# Note: There is no guarantee that all these exist on all platforms.
#       Some only make sense for one platform, but are harmless.
#

ifeq (\$(PLATFORM),linux)
UTILS_COMMAND_PATH=\$(UNIXCOMMAND_PATH)
UTILS_USR_BIN_PATH=\$(USRBIN_PATH)
UTILS_CCS_BIN_PATH=\$(USRBIN_PATH)
UTILS_DEVTOOL_PATH=\$(USRBIN_PATH)
endif

ifeq (\$(PLATFORM),solaris)
UTILS_COMMAND_PATH=\$(UNIXCOMMAND_PATH)
UTILS_USR_BIN_PATH=\$(UNIXCOMMAND_PATH)
UTILS_CCS_BIN_PATH=\$(UNIXCCS_PATH)
UTILS_DEVTOOL_PATH=\$(DEVTOOLS_PATH)
endif

ifeq (\$(PLATFORM),windows)
UTILS_COMMAND_PATH=\$(UNIXCOMMAND_PATH)
UTILS_USR_BIN_PATH=\$(UNIXCOMMAND_PATH)
UTILS_CCS_BIN_PATH=\$(UNIXCOMMAND_PATH)
UTILS_DEVTOOL_PATH=\$(DEVTOOLS_PATH)
endif

ifeq (\$(PLATFORM),macosx)
UTILS_COMMAND_PATH=\$(UNIXCOMMAND_PATH)
UTILS_USR_BIN_PATH=\$(USRBIN_PATH)
UTILS_CCS_BIN_PATH=\$(USRBIN_PATH)
UTILS_DEVTOOL_PATH=\$(DEVTOOLS_PATH)
endif

# Utilities
ifdef CROSS_COMPILE_ARCH
AR             = \$(COMPILER_PATH)ar
AS             = \$(COMPILER_PATH)as
LD             = \$(COMPILER_PATH)ld
MCS            = \$(COMPILER_PATH)mcs
NM             = \$(COMPILER_PATH)nm
STRIP          = \$(COMPILER_PATH)strip
else
AR             = \$(UTILS_CCS_BIN_PATH)ar
AS             = \$(UTILS_CCS_BIN_PATH)as
LD             = \$(UTILS_CCS_BIN_PATH)ld
MCS            = \$(UTILS_CCS_BIN_PATH)mcs
NM             = \$(UTILS_CCS_BIN_PATH)nm
STRIP          = \$(UTILS_CCS_BIN_PATH)strip
endif

BASENAME       = \$(UTILS_COMMAND_PATH)basename
BZIP2          = \$(UTILS_COMMAND_PATH)bzip2
CAT            = \$(UTILS_COMMAND_PATH)cat
CHMOD          = \$(UTILS_COMMAND_PATH)chmod
CMP            = \$(UTILS_USR_BIN_PATH)cmp
COMM           = \$(UTILS_USR_BIN_PATH)comm
COMPRESS       = \$(UTILS_USR_BIN_PATH)compress
CP             = \$(UTILS_COMMAND_PATH)cp
CPIO           = \$(UTILS_COMMAND_PATH)cpio
CUT            = \$(UTILS_USR_BIN_PATH)cut
DATE           = \$(UTILS_COMMAND_PATH)date
DF             = \$(UTILS_COMMAND_PATH)df
DIFF           = \$(UTILS_USR_BIN_PATH)diff
DIRNAME        = \$(UTILS_USR_BIN_PATH)dirname
DUMP           = \$(UTILS_CCS_BIN_PATH)dump
ECHO           = \$(UTILS_COMMAND_PATH)echo
EGREP          = \$(UTILS_COMMAND_PATH)egrep
EXPR           = \$(UTILS_USR_BIN_PATH)expr
FILE           = \$(UTILS_USR_BIN_PATH)file
FIND           = \$(UTILS_USR_BIN_PATH)find
FMT            = \$(UTILS_COMMAND_PATH)fmt
GDB            = \$(UTILS_USR_BIN_PATH)gdb
GREP           = \$(UTILS_COMMAND_PATH)grep
GUNZIP         = \$(UTILS_COMMAND_PATH)gunzip
# GZIP is used for solaris. Linux and windows use tar czf
GZIP           = \$(UTILS_COMMAND_PATH)gzip
HG             = hg
ID             = \$(UTILS_COMMAND_PATH)id
ISAINFO        = \$(UTILS_COMMAND_PATH)isainfo
KSH            = \$(UTILS_COMMAND_PATH)ksh
LDD            = \$(UTILS_USR_BIN_PATH)ldd
LEX            = \$(UTILS_CCS_BIN_PATH)lex
LN             = \$(UTILS_COMMAND_PATH)ln
LS             = \$(UTILS_COMMAND_PATH)ls
M4             = \$(UTILS_CCS_BIN_PATH)m4
MKDIR          = \$(UTILS_COMMAND_PATH)mkdir
MKSINFO        = \$(UTILS_COMMAND_PATH)mksinfo
MSGFMT         = \$(UTILS_USR_BIN_PATH)msgfmt
MV             = \$(UTILS_COMMAND_PATH)mv
NAWK           = \$(UTILS_USR_BIN_PATH)nawk
OTOOL          = \$(UTILS_USR_BIN_PATH)otool
PKGMK          = \$(UTILS_COMMAND_PATH)pkgmk
PRINTF         = \$(UTILS_USR_BIN_PATH)printf
PWD            = \$(UTILS_COMMAND_PATH)pwd
RMDIR          = \$(UTILS_COMMAND_PATH)rmdir
RPM            = \$(UTILS_COMMAND_PATH)rpm
RPMBUILD       = \$(UTILS_COMMAND_PATH)rpmbuild
SED            = \$(UTILS_COMMAND_PATH)sed
SH             = \$(UTILS_COMMAND_PATH)sh
SHOWREV        = \$(UTILS_USR_BIN_PATH)showrev
SORT           = \$(UTILS_COMMAND_PATH)sort
TAIL           = \$(UTILS_USR_BIN_PATH)tail
TAR            = \$(UTILS_COMMAND_PATH)tar
TEST           = \$(UTILS_USR_BIN_PATH)test
TOUCH          = \$(UTILS_COMMAND_PATH)touch
TR             = \$(UTILS_USR_BIN_PATH)tr
TRUE           = \$(UTILS_COMMAND_PATH)true
UNAME          = \$(UTILS_COMMAND_PATH)uname
UNIQ           = \$(UTILS_USR_BIN_PATH)uniq
UNZIP          = \$(UTILS_USR_BIN_PATH)unzip
UNZIPSFX       = \$(UTILS_DEVTOOL_PATH)unzipsfx
XARGS          = \$(UTILS_USR_BIN_PATH)xargs
WC             = \$(UTILS_USR_BIN_PATH)wc
WHICH          = \$(UTILS_USR_BIN_PATH)which
YACC           = \$(UTILS_CCS_BIN_PATH)yacc
ZIPEXE         = \$(UTILS_DEVTOOL_PATH)zip

# Special cases
#RM   is defined by GNU Make as 'rm -f'
CD             = cd # intrinsic unix command

# Windows specific
ifeq (\$(PLATFORM),windows)
ifdef USING_CYGWIN
# Intrinsic unix command, with backslash-escaped character interpretation
ECHO     = \$(UNIXCOMMAND_PATH)echo -e
ZIPEXE   = \$(UNIXCOMMAND_PATH)zip
UNZIP    = \$(UNIXCOMMAND_PATH)unzip
# Some CYGWIN nawk versions require BINMODE=w for proper '\r' interpretation
NAWK     = \$(UNIXCOMMAND_PATH)awk -v BINMODE=w
else
ZIPEXE = \$(UTILS_DEVTOOL_PATH)zip
UNZIP  = \$(UTILS_DEVTOOL_PATH)unzip
NAWK   = \$(UNIXCOMMAND_PATH)awk
ifdef USING_MSYS
ECHO   = \$(UTILS_COMMAND_PATH)echo -e
AR     = \$(UTILS_DEVTOOL_PATH)ar
endif
endif
# Re-define some utilities
LEX            =# override GNU Make intrinsic: no lex on windows
SHA1SUM        = \$(UNIXCOMMAND_PATH)openssl sha1
endif

# Linux specific
ifeq (\$(PLATFORM),linux)
# A few redefines
# Allows for builds on Debian GNU Linux, basename is in a different place
BASENAME=\$(firstword \$(wildcard \$(UTILS_COMMAND_PATH)basename) \
\$(wildcard \$(UTILS_USR_BIN_PATH)basename))
# RPM 4 has replaced "rpm -b" with an entirely new utility "rpmbuild".
# Also, some distribution (Ubuntu, Debian, others?) place the rpm command
# itself in /usr/bin rather than it's traditional home in /bin.
RPM=\$(firstword \$(wildcard \$(UTILS_COMMAND_PATH)rpm) \
\$(wildcard \$(UTILS_USR_BIN_PATH)rpm))
RPMBUILD=\$(firstword \$(wildcard \$(UTILS_COMMAND_PATH)rpmbuild) \
\$(wildcard \$(UTILS_USR_BIN_PATH)rpmbuild) \
\$(wildcard \$(UTILS_COMMAND_PATH)rpm) \
\$(wildcard \$(UTILS_USR_BIN_PATH)rpm))
# Most Linux distros have "sort" in /bin.  Ubuntu, Debian and perhaps
# others have it in /usr/bin.
SORT=\$(firstword \$(wildcard \$(UTILS_COMMAND_PATH)sort) \
\$(wildcard \$(UTILS_USR_BIN_PATH)sort))
NAWK           = \$(USRBIN_PATH)gawk
# Intrinsic unix command, with backslash-escaped character interpretation
ECHO           = /bin/echo -e
# These are really in UTILS_USR_BIN_PATH on Linux
ifndef CROSS_COMPILE_ARCH
AR             = \$(UTILS_USR_BIN_PATH)ar
AS             = \$(UTILS_USR_BIN_PATH)as
LD             = \$(UTILS_USR_BIN_PATH)ld
MCS            = \$(UTILS_USR_BIN_PATH)mcs
NM             = \$(UTILS_USR_BIN_PATH)nm
STRIP          = \$(UTILS_USR_BIN_PATH)strip
endif
LEX            = \$(UTILS_USR_BIN_PATH)lex
M4             = \$(UTILS_USR_BIN_PATH)m4
YACC           = \$(UTILS_USR_BIN_PATH)yacc
endif

# Solaris specific
ifeq (\$(PLATFORM),solaris)
# Intrinsic unix command, with backslash-escaped character interpretation
#   (not using -e  will cause build failure when using /bin/bash)
#   (using -e breaks something else)
ECHO           = /usr/bin/echo
endif

ifeq (\$(PLATFORM), macosx)
BASENAME     = \$(UTILS_USR_BIN_PATH)basename
EGREP        = \$(UTILS_USR_BIN_PATH)egrep
EXPR         = \$(UTILS_COMMAND_PATH)expr
FMT          = \$(UTILS_USR_BIN_PATH)fmt
GREP         = \$(UTILS_USR_BIN_PATH)grep
GUNZIP       = \$(UTILS_USR_BIN_PATH)gunzip
ID           = \$(UTILS_USR_BIN_PATH)id
MSGFMT       = \$(UTILS_DEVTOOL_PATH)msgfmt
SED          = \$(UTILS_USR_BIN_PATH)sed
SORT         = \$(UTILS_USR_BIN_PATH)sort
TEST         = \$(UTILS_COMMAND_PATH)test
TOUCH        = \$(UTILS_USR_BIN_PATH)touch
TRUE         = \$(UTILS_USR_BIN_PATH)true
UNAME        = \$(UTILS_USR_BIN_PATH)uname
NAWK         = \$(UTILS_USR_BIN_PATH)awk
UNZIPSFX     = \$(UTILS_USR_BIN_PATH)unzipsfx
ZIPEXE       = \$(UTILS_USR_BIN_PATH)zip
CPIO         = \$(UTILS_USR_BIN_PATH)cpio
TAR          = \$(UTILS_USR_BIN_PATH)tar
# Builtin shell command, no -e option needed
ECHO         = echo
endif```
{"ft_lang_label":"__label__en","ft_lang_prob":0.5382011,"math_prob":0.851617,"size":8973,"snap":"2019-43-2019-47","text_gpt3_token_len":2659,"char_repetition_ratio":0.33470845,"word_repetition_ratio":0.027724665,"special_character_ratio":0.27348712,"punctuation_ratio":0.079435125,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.97712743,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-11-19T10:47:52Z\",\"WARC-Record-ID\":\"<urn:uuid:6c21dee2-c441-4837-8f80-55421be4067a>\",\"Content-Length\":\"25455\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3d28dbaf-8192-45d1-ae7f-a0d84ce5750f>\",\"WARC-Concurrent-To\":\"<urn:uuid:dd61e48f-dcdd-413c-9045-79d3ff79134e>\",\"WARC-IP-Address\":\"137.254.56.63\",\"WARC-Target-URI\":\"http://hg.openjdk.java.net/jdk/jdk12/file/e5c8662f325d/jdk/make/common/shared/Defs-utils.gmk\",\"WARC-Payload-Digest\":\"sha1:QAQYNMPCJHADUU4NNFRXFO6CES6WCFOG\",\"WARC-Block-Digest\":\"sha1:VIX26VCWOVJITOP6IBQNHILEIA3AJMFC\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-47/CC-MAIN-2019-47_segments_1573496670135.29_warc_CC-MAIN-20191119093744-20191119121744-00537.warc.gz\"}"}