jdk/make/common/shared/Defs.gmk
author ohair
Tue, 21 Dec 2010 18:21:26 -0800
changeset 7665 bc5dbdc44e1e
parent 7463 5ab61aa7cd89
child 8201 9e6915af34ba
permissions -rw-r--r--
6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location Reviewed-by: ksrini
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 7463
diff changeset
     2
# Copyright (c) 2005, 2010, 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: 3742
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: 3742
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: 3742
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3742
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3742
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
# Definitions for all platforms.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
# Normally the convention is that these alternate definitions of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
#   primary make variables are never defined inside the Makefiles anywhere
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
#   but are defined via environment variables or set on the make command
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#   line. So you should never see an ALT_* variable defined in any
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
#   makefiles, just used. This is the convention and there are some
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
#   exceptions, either mistakes or unusual circumstances.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
# The naming convention for the default value of one of these variables
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
#   that has an ALT_* override capability is to name the default value with a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
#   leading underscore (_). So for XXX you would have:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
#      _XXX      default value
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
#      ALT_XXX   any override the user is providing if any
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
#      XXX       the final value, either the default _XXX or the ALT_XXX value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
# On Directory names. In very rare cases should the Windows directory
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
#    names use the backslash, please use the C:/ style of windows paths.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
#    Avoid duplicating the // characters in paths, this has known to cause
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
#    strange problems with jar and other utilities, e.g. /a//b/ != /a/b/.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
#    Some of these variables have an explicit trailing / character, but in
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
#    general, they should NOT have the trailing / character.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
# Get shared system utilities macros defined
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
include $(JDK_MAKE_SHARED_DIR)/Defs-utils.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
# Assumes ARCH, PLATFORM, ARCH_VM_SUBDIR, JDK_TOPDIR, etc. have been defined.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
# Simple pwd path
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
define PwdPath
33
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
    58
$(shell $(CD) $1 2> $(DEV_NULL) && $(PWD))
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
    59
endef
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
    60
define AbsPwdPathCheck
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
    61
$(shell $(CD) .. 2> $(DEV_NULL) && $(CD) $1 2> $(DEV_NULL) && $(PWD))
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
# Checks an ALT value for spaces (should be one word), 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
#       warns and returns Check_ALT_$1 if spaces
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
define AltCheckSpaces
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
$(if $(word 2,$($1)),$(warning "WARNING: Value of $1 contains a space: '$($1)', check or set ALT_$1")Check_ALT_$1,$($1))
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
# Checks an ALT value for empty, warns and returns Check_ALT_$1 if empty
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
define AltCheckValue
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
$(if $($1),$($1),$(warning "WARNING: Value of $1 cannot be empty, check or set ALT_$1")Check_ALT_$1)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
# Checks any value for empty, warns and returns $2 if empty
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
define CheckValue
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
$(if $($1),$($1),$(warning "WARNING: Value of $1 cannot be empty, will use '$2'")$2)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
# Prefix for a utility prefix path, if empty leave alone, otherwise end with a /
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
define PrefixPath
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
$(if $1,$(subst //,/,$1/),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
# Select a directory if it exists, or the alternate 2 or the alternate 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
define DirExists
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
$(shell \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
  if [ -d "$1" ]; then  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    echo "$1"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
  elif [ -d "$2" ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
    echo "$2"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
  else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
    echo "$3"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
  fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
2806
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
    97
# Select a directory if it exists, or the alternate 2, or the alternate 3, or the alternate 4
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
    98
define DirExists4
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
    99
$(shell \
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
   100
  if [ -d "$1" ]; then  \
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
   101
    echo "$1"; \
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
   102
  elif [ -d "$2" ]; then \
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
   103
    echo "$2"; \
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
   104
  elif [ -d "$3" ]; then \
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
   105
    echo "$3"; \
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
   106
  else \
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
   107
    echo "$4"; \
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
   108
  fi)
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
   109
endef
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
   110
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
   111
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
# Select a writable directory if it exists and is writable, or the alternate
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
define WriteDirExists
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
$(shell \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
  if [ -d "$1" -a -w "$1" ]; then  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
    echo "$1"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
  else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
    echo "$2"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
  fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
# Select a file if it exists, or the alternate 1, or the alternate 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
define FileExists
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
$(shell \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
  if [ -r "$1" ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
    echo "$1"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
  elif [ -r "$2" ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
    echo "$2"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
  else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
    echo "NO_FILE_EXISTS"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
  fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
2158
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 1163
diff changeset
   134
# Given a line of text, get the version number from it
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
define GetVersion
2158
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 1163
diff changeset
   136
$(shell echo $1 | sed -e 's@[^0-9]*\([0-9][0-9]*\.[0-9][.0-9]*\).*@\1@' )
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
6310
8affde0eeeb4 6932743: Makefiles not parsing version strings with - from uname -r
ohair
parents: 5552
diff changeset
   139
# Return one part of the version numbers, watch out for non digits.
8affde0eeeb4 6932743: Makefiles not parsing version strings with - from uname -r
ohair
parents: 5552
diff changeset
   140
define VersionWord # Number Version
8affde0eeeb4 6932743: Makefiles not parsing version strings with - from uname -r
ohair
parents: 5552
diff changeset
   141
$(word $1,$(subst ., ,$(subst -, ,$2)))
8affde0eeeb4 6932743: Makefiles not parsing version strings with - from uname -r
ohair
parents: 5552
diff changeset
   142
endef
8affde0eeeb4 6932743: Makefiles not parsing version strings with - from uname -r
ohair
parents: 5552
diff changeset
   143
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
# Given a major.minor.micro version, return the major, minor, or micro number
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
define MajorVersion
6310
8affde0eeeb4 6932743: Makefiles not parsing version strings with - from uname -r
ohair
parents: 5552
diff changeset
   146
$(if $(call VersionWord,1,$1),$(call VersionWord,1,$1),0)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
define MinorVersion
6310
8affde0eeeb4 6932743: Makefiles not parsing version strings with - from uname -r
ohair
parents: 5552
diff changeset
   149
$(if $(call VersionWord,2,$1),$(call VersionWord,2,$1),0)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
define MicroVersion
6310
8affde0eeeb4 6932743: Makefiles not parsing version strings with - from uname -r
ohair
parents: 5552
diff changeset
   152
$(if $(call VersionWord,3,$1),$(call VersionWord,3,$1),0)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
# Macro that returns missing, same, newer, or older $1=version $2=required
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
define CheckVersions
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
$(shell \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
  if [ "$1" = "" -o "$2" = "" ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
    echo missing; \
2158
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 1163
diff changeset
   160
  elif [ "$1" = "$2" ]; then \
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 1163
diff changeset
   161
    echo same; \
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 1163
diff changeset
   162
  elif [ $(call MajorVersion,$1) -lt $(call MajorVersion,$2) ] ; then \
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 1163
diff changeset
   163
    echo older; \
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 1163
diff changeset
   164
  elif [ $(call MajorVersion,$1) -gt $(call MajorVersion,$2) ] ; then \
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 1163
diff changeset
   165
    echo newer; \
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 1163
diff changeset
   166
  elif [ $(call MinorVersion,$1) -lt $(call MinorVersion,$2) ]; then \
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 1163
diff changeset
   167
    echo older; \
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 1163
diff changeset
   168
  elif [ $(call MinorVersion,$1) -gt $(call MinorVersion,$2) ]; then \
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 1163
diff changeset
   169
    echo newer; \
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 1163
diff changeset
   170
  elif [ $(call MicroVersion,$1) -lt $(call MicroVersion,$2) ]; then \
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 1163
diff changeset
   171
    echo older; \
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 1163
diff changeset
   172
  elif [ $(call MicroVersion,$1) -gt $(call MicroVersion,$2) ]; then \
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 1163
diff changeset
   173
    echo newer; \
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
  else \
2158
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 1163
diff changeset
   175
    echo same; \
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
  fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
# Make sure certain variables are non-empty at this point
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
_check_values:=\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
$(call CheckValue,ARCH,),\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
$(call CheckValue,ARCH_DATA_MODEL,),\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
$(call CheckValue,ARCH_VM_SUBDIR,),\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
$(call CheckValue,JDK_TOPDIR,),\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
$(call CheckValue,JDK_MAKE_SHARED_DIR,),\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
$(call CheckValue,VARIANT,),\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
$(call CheckValue,PLATFORM,)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
# Misc common settings for all workspaces
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
#   This determines the version of the product, and the previous version or boot
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
ifndef JDK_MAJOR_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
  JDK_MAJOR_VERSION      = 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
  PREVIOUS_MAJOR_VERSION = 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
ifndef JDK_MINOR_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
  JDK_MINOR_VERSION      = 7
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
  PREVIOUS_MINOR_VERSION = 6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
ifndef JDK_MICRO_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
  JDK_MICRO_VERSION      = 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
  PREVIOUS_MICRO_VERSION = 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
ifndef MILESTONE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
  MILESTONE = internal
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
# Default names
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
  LAUNCHER_NAME = openjdk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
  PRODUCT_NAME = OpenJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
  PRODUCT_SUFFIX = Runtime Environment
847
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 312
diff changeset
   215
  JDK_RC_PLATFORM_NAME = Platform
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 312
diff changeset
   216
  COMPANY_NAME = N/A
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 312
diff changeset
   217
else
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 312
diff changeset
   218
  LAUNCHER_NAME = java
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 312
diff changeset
   219
  PRODUCT_NAME = Java(TM)
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 312
diff changeset
   220
  PRODUCT_SUFFIX = SE Runtime Environment
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 312
diff changeset
   221
  JDK_RC_PLATFORM_NAME = Platform SE
6676
c8629a8bbd7d 6946527: rebranding system properties per Oracle Requirements (vendor)
ohair
parents: 6310
diff changeset
   222
  COMPANY_NAME = Oracle Corporation
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
RUNTIME_NAME = $(PRODUCT_NAME) $(PRODUCT_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
ifndef BUILD_NUMBER
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
  JDK_BUILD_NUMBER = b00
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
  ifndef JDK_BUILD_NUMBER
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
    JDK_BUILD_NUMBER = $(BUILD_NUMBER)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
# Default variant is the optimized version of everything
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
#    can be OPT or DBG,  default is OPT
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
#    Determine the extra pattern to add to the release name for debug/fastdebug.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
#    Determine the JDK_IMPORT_VARIANT, so we get the right VM files copied over.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
#    Determine suffix for obj directory or OBJDIR, for .o files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
#    (by keeping .o files separate, just .o files, they don't clobber each
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
#     other, however, the library files will clobber each other).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
ifeq ($(VARIANT), DBG)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
  BUILD_VARIANT_RELEASE=-debug
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
  OBJDIRNAME_SUFFIX=_g
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
  BUILD_VARIANT_RELEASE=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
  OBJDIRNAME_SUFFIX=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
ifeq ($(FASTDEBUG), true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
  VARIANT=DBG
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
  BUILD_VARIANT_RELEASE=-fastdebug
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
  OBJDIRNAME_SUFFIX=_gO
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
  _JDK_IMPORT_VARIANT=/fastdebug
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
# Depending on the flavor of the build, add a -debug or -fastdebug to the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
ifdef DEBUG_NAME
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
  BUILD_VARIANT_RELEASE=-$(DEBUG_NAME)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
# These default values are redefined during a release build.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
#    CTE can set JDK_UPDATE_VERSION during the update release
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
ifdef JDK_UPDATE_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
  JDK_VERSION  = $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)_$(JDK_UPDATE_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
  MARKETING_NUMBER := $(shell \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
	$(ECHO) $(JDK_UPDATE_VERSION) | $(NAWK) '{if (substr($$0,1,1)=="0") print substr($$0, 2); else print $$0;}')
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
  MARKET_NAME= $(shell $(ECHO) " Update $(MARKETING_NUMBER)")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
  JDK_MKTG_VERSION  = $(JDK_MINOR_VERSION)u$(MARKETING_NUMBER)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
  JDK_VERSION  = $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
  JDK_MKTG_VERSION  = $(JDK_MINOR_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
  MARKET_NAME=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
JDK_UNDERSCORE_VERSION =  $(subst .,_,$(JDK_VERSION))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
JDK_MKTG_UNDERSCORE_VERSION =  $(subst .,_,$(JDK_MKTG_VERSION))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
# RELEASE is JDK_VERSION and -MILESTONE if MILESTONE is set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
ifneq ($(MILESTONE),fcs)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
  RELEASE      = $(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
  RELEASE      = $(JDK_VERSION)$(BUILD_VARIANT_RELEASE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
# FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
ifdef BUILD_NUMBER
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
  FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
  BUILD_NUMBER = b00
7463
5ab61aa7cd89 6987107: Add variable to add to but not modify non-fcs version string
ohair
parents: 6795
diff changeset
   290
  ifndef USER_RELEASE_SUFFIX
5ab61aa7cd89 6987107: Add variable to add to but not modify non-fcs version string
ohair
parents: 6795
diff changeset
   291
    BUILD_DATE := $(shell $(DATE) '+%Y_%m_%d_%H_%M')
5ab61aa7cd89 6987107: Add variable to add to but not modify non-fcs version string
ohair
parents: 6795
diff changeset
   292
    CLEAN_USERNAME := $(shell $(ECHO) "$(USER)" | $(TR) -d -c '[:alnum:]')
5ab61aa7cd89 6987107: Add variable to add to but not modify non-fcs version string
ohair
parents: 6795
diff changeset
   293
    USER_RELEASE_SUFFIX := $(shell $(ECHO) "$(CLEAN_USERNAME)_$(BUILD_DATE)" | $(TR) '[:upper:]' '[:lower:]' )
5ab61aa7cd89 6987107: Add variable to add to but not modify non-fcs version string
ohair
parents: 6795
diff changeset
   294
  endif
5ab61aa7cd89 6987107: Add variable to add to but not modify non-fcs version string
ohair
parents: 6795
diff changeset
   295
  export USER_RELEASE_SUFFIX
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
  FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
# Promoted build location
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
PROMOTED_RE_AREA = $(SLASH_JAVA)/re/jdk/$(JDK_VERSION)/promoted
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
PROMOTED_BUILD_LATEST = latest
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
PROMOTED_BUILD_BASEDIR = $(PROMOTED_RE_AREA)/$(PROMOTED_BUILD_LATEST)
3111
fefdeafb7ab9 6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents: 2660
diff changeset
   303
PROMOTED_BUILD_DISTDIR = $(PROMOTED_BUILD_BASEDIR)/dist/$(PLATFORM)-$(ARCH)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
PROMOTED_BUILD_BINARIES = $(PROMOTED_BUILD_BASEDIR)/binaries
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
# PARALLEL_COMPILE_JOBS: is the number of compiles done in parallel.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
#  If the user sets ALT_PARALLEL_COMPILE_JOBS, then COMPILE_APPROACH is set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
#  to parallel.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
#  Recommended setting: 2 seems to be ideal for single cpu machines,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
#                       2 times the number of CPU's is a basic formula, 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
#                       but probably not more than 4 if the machine is 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
#                       being shared by others, or the machine is limited 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
#                       in RAM or swap.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
ifdef ALT_PARALLEL_COMPILE_JOBS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
  PARALLEL_COMPILE_JOBS=$(ALT_PARALLEL_COMPILE_JOBS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
  PARALLEL_COMPILE_JOBS=2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
# Previous JDK release (version of BOOTDIR version)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
ifdef ALT_PREVIOUS_JDK_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
  PREVIOUS_JDK_VERSION = $(ALT_PREVIOUS_JDK_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
  PREVIOUS_JDK_VERSION  = $(PREVIOUS_MAJOR_VERSION).$(PREVIOUS_MINOR_VERSION).$(PREVIOUS_MICRO_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
export PREVIOUS_JDK_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
PREVIOUS_JDK_VERSION:=$(call AltCheckSpaces,PREVIOUS_JDK_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
PREVIOUS_JDK_VERSION:=$(call AltCheckValue,PREVIOUS_JDK_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
# Version with _ instead of . in number
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
ifeq ($(PREVIOUS_MINOR_VERSION),5)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
  PREVIOUS_JDK_UNDERSCORE_VERSION =  $(subst .,_,$(PREVIOUS_JDK_VERSION))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
  PREVIOUS_JDK_UNDERSCORE_VERSION = $(PREVIOUS_MINOR_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
# Include any private definitions for this set of workspaces
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
_PRIVATE_DEFS_FILE=$(JDK_MAKE_SHARED_DIR)/PrivateDefs.gmk
7463
5ab61aa7cd89 6987107: Add variable to add to but not modify non-fcs version string
ohair
parents: 6795
diff changeset
   341
ifeq ($(USING_PRIVATE_DEFS),)
5ab61aa7cd89 6987107: Add variable to add to but not modify non-fcs version string
ohair
parents: 6795
diff changeset
   342
  USING_PRIVATE_DEFS:=$(shell if [ -f $(_PRIVATE_DEFS_FILE) ]; then echo true; else echo false; fi)
5ab61aa7cd89 6987107: Add variable to add to but not modify non-fcs version string
ohair
parents: 6795
diff changeset
   343
endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
ifeq ($(USING_PRIVATE_DEFS),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
dummy:=$(warning "WARNING: Using definitions from $(_PRIVATE_DEFS_FILE)")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
include $(_PRIVATE_DEFS_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
6789
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   349
# OUTPUTDIR: Location of all output for the build
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   350
ifdef ALT_OUTPUTDIR
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   351
  OUTPUTDIR:=$(subst \,/,$(ALT_OUTPUTDIR))
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   352
  # Assumes this is absolute (checks later)
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   353
  ABS_OUTPUTDIR:=$(OUTPUTDIR)
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   354
else
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   355
  ifndef _OUTPUTDIR
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   356
    # Default:  Get "build" parent directory, which should always exist
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   357
    ifndef BUILD_PARENT_DIRECTORY
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   358
      BUILD_PARENT_DIRECTORY=$(BUILDDIR)/..
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   359
    endif
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   360
    ifdef OPENJDK
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   361
      _OUTPUTDIRNAME=$(PLATFORM)-$(ARCH)$(OPENJDK_SUFFIX)
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   362
    else
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   363
      _OUTPUTDIRNAME=$(PLATFORM)-$(ARCH)
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   364
    endif
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   365
    _OUTPUTDIR=$(BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME)
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   366
  endif
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   367
  OUTPUTDIR:=$(_OUTPUTDIR)
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   368
endif
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   369
# Check for spaces and null value
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   370
OUTPUTDIR:=$(call AltCheckSpaces,OUTPUTDIR)
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   371
OUTPUTDIR:=$(call AltCheckValue,OUTPUTDIR)
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   372
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
# Get platform specific settings
6789
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   374
# NB: OUTPUTDIR must be defined. Otherwise hotspot import detection will not work correctly
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   375
# On other hand this must be included early as it provides platform specific defines such as FullPath
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 7463
diff changeset
   376
include $(JDK_MAKE_SHARED_DIR)/Defs-versions.gmk
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 7463
diff changeset
   377
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 7463
diff changeset
   378
# Get platform specific settings (defines COMPILER_PATH)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
include $(JDK_MAKE_SHARED_DIR)/Defs-$(PLATFORM).gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
# Components
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
ifdef ALT_LANGTOOLS_DIST
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
  LANGTOOLS_DIST :=$(call FullPath,$(ALT_LANGTOOLS_DIST))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
  LANGTOOLS_DIST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
ifdef ALT_CORBA_DIST
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
  CORBA_DIST :=$(call FullPath,$(ALT_CORBA_DIST))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
  CORBA_DIST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
ifdef ALT_JAXP_DIST
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
  JAXP_DIST :=$(call FullPath,$(ALT_JAXP_DIST))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
  JAXP_DIST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
ifdef ALT_JAXWS_DIST
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
  JAXWS_DIST :=$(call FullPath,$(ALT_JAXWS_DIST))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
  JAXWS_DIST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
# HOTSPOT_DOCS_IMPORT_PATH: Path to hotspot docs files to import into the docs generation
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
ifdef ALT_HOTSPOT_DOCS_IMPORT_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
  HOTSPOT_DOCS_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_DOCS_IMPORT_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
  HOTSPOT_DOCS_IMPORT_PATH :=$(call DirExists,$(HOTSPOT_IMPORT_PATH)/docs,$(PROMOTED_BUILD_BASEDIR)/docs,/NO_DOCS_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
# These are the same on all platforms but require the above platform include 1st
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
# BOOTDIR: Bootstrap JDK, previous released JDK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
#   _BOOTDIR1 and _BOOTDIR2 picked by platform
2806
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
   414
#   Platform may optionally define _BOOTDIR3 as well.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
ifdef ALT_BOOTDIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
  BOOTDIR =$(ALT_BOOTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
else
2806
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
   418
  ifdef _BOOTDIR3
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
   419
    BOOTDIR  :=$(call DirExists4,$(_BOOTDIR1),$(_BOOTDIR2),$(_BOOTDIR3),/NO_BOOTDIR)
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
   420
  else
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
   421
    BOOTDIR  :=$(call DirExists,$(_BOOTDIR1),$(_BOOTDIR2),/NO_BOOTDIR)
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2660
diff changeset
   422
  endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
export BOOTDIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
BOOTDIR:=$(call AltCheckSpaces,BOOTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
BOOTDIR:=$(call AltCheckValue,BOOTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
1161
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   428
# PREVIOUS_FCS_RE_AREA: re path to where previous release binaries/bundles are
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   429
PREVIOUS_FCS_RE_AREA = $(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
# PREVIOUS_RELEASE_IMAGE: Previous install image to compare against
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
ifdef ALT_PREVIOUS_RELEASE_IMAGE
1161
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   433
  
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   434
  # Explicit image provided, no bundle access needed
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
  PREVIOUS_RELEASE_IMAGE :=$(call FullPath,$(ALT_PREVIOUS_RELEASE_IMAGE))
1161
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   436
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   437
else
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   438
  
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   439
  # PREVIOUS_RELEASE_PATH: path to where previous release bundles are
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   440
  ifdef ALT_PREVIOUS_RELEASE_PATH
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   441
    PREVIOUS_RELEASE_PATH :=$(call OptFullPath,$(ALT_PREVIOUS_RELEASE_PATH))
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   442
  else
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   443
    PREVIOUS_RELEASE_PATH := \
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   444
	$(call DirExists,$(PREVIOUS_FCS_RE_AREA)/bundles/$(PLATFORM)-$(ARCH),,)
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   445
  endif
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   446
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   447
  # Depending on if we have access to these bundles
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   448
  ifeq ($(PREVIOUS_RELEASE_PATH),)
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   449
    # Use images in re area or BOOTDIR (which is normally the previous release)
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   450
    PREVIOUS_RELEASE_IMAGE := \
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   451
         $(call DirExists,$(PREVIOUS_FCS_RE_AREA)/binaries/$(PLATFORM)-$(ARCH),$(BOOTDIR),)
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   452
  else
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   453
    # Get names of and paths to bundles
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   454
    PREVIOUS_RELEASE_PATH:=$(call AltCheckSpaces,PREVIOUS_RELEASE_PATH)
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   455
    PREVIOUS_RELEASE_PATH:=$(call AltCheckValue,PREVIOUS_RELEASE_PATH)
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   456
    export PREVIOUS_RELEASE_PATH
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   457
  
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   458
    # PREVIOUS_JDK_FILE: filename of install bundle for previous JDK
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   459
    ifdef ALT_PREVIOUS_JDK_FILE
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   460
      PREVIOUS_JDK_FILE  =$(ALT_PREVIOUS_JDK_FILE)
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   461
    else
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   462
      PREVIOUS_JDK_FILE = \
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   463
	  jdk-$(PREVIOUS_JDK_UNDERSCORE_VERSION)-$(PLATFORM)-$(ARCH)$(BUNDLE_FILE_SUFFIX)
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   464
    endif
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   465
    export PREVIOUS_JDK_FILE
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   466
    PREVIOUS_JDK_FILE:=$(call AltCheckSpaces,PREVIOUS_JDK_FILE)
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   467
    PREVIOUS_JDK_FILE:=$(call AltCheckValue,PREVIOUS_JDK_FILE)
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   468
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   469
    # PREVIOUS_JRE_FILE: filename of install bundle for previous JRE
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   470
    ifdef ALT_PREVIOUS_JRE_FILE
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   471
      PREVIOUS_JRE_FILE  =$(ALT_PREVIOUS_JRE_FILE)
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   472
    else
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   473
      PREVIOUS_JRE_FILE = \
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   474
	  jre-$(PREVIOUS_JDK_UNDERSCORE_VERSION)-$(PLATFORM)-$(ARCH)$(BUNDLE_FILE_SUFFIX)
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   475
    endif
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   476
    export PREVIOUS_JRE_FILE
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   477
    PREVIOUS_JRE_FILE:=$(call AltCheckSpaces,PREVIOUS_JRE_FILE)
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   478
    PREVIOUS_JRE_FILE:=$(call AltCheckValue,PREVIOUS_JRE_FILE)
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   479
   
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   480
    # Paths to these bundles
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   481
    PREVIOUS_JRE_BUNDLE = $(PREVIOUS_RELEASE_PATH)/$(PREVIOUS_JRE_FILE)
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   482
    PREVIOUS_JDK_BUNDLE = $(PREVIOUS_RELEASE_PATH)/$(PREVIOUS_JDK_FILE)
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   483
  endif
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   484
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   485
endif
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   486
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   487
# Indicate we are using an image comparison
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   488
ifneq ($(PREVIOUS_RELEASE_IMAGE),)
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   489
    PREVIOUS_RELEASE_PATH = USING-PREVIOUS_RELEASE_IMAGE
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   490
    PREVIOUS_JRE_BUNDLE   = USING-PREVIOUS_RELEASE_IMAGE
3a209f585a3f 6746421: Compare images logic needs to be more forgiving
ohair
parents: 919
diff changeset
   491
    PREVIOUS_JDK_BUNDLE   = USING-PREVIOUS_RELEASE_IMAGE
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
# CACERTS_FILE: if OPENJDK is false and the internal version of the file 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
#		(that is, non-empty) is available, use it, otherwise use an 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
#		empty keystore.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
# We put this variable here for sanity checks and in case another
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
# components will need to know which cacerts file is being used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
ifdef ALT_CACERTS_FILE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
  CACERTS_FILE = $(ALT_CACERTS_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
  CACERTS_EXT   = $(SHARE_SRC)/lib/security/cacerts
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
  ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
    CACERTS_FILE  :=$(CACERTS_EXT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
  else # (!OPENJDK)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
    CACERTS_INT   = $(CLOSED_SHARE_SRC)/lib/security/cacerts.internal
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
    CACERTS_FILE  :=$(call FileExists,$(CACERTS_INT),$(CACERTS_EXT))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
  endif # (OPENJDK)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
CACERTS_FILE:=$(call AltCheckSpaces,CACERTS_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
CACERTS_FILE:=$(call AltCheckValue,CACERTS_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 33
diff changeset
   515
#
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 33
diff changeset
   516
# When signing the JCE framework and provider, we could be using built
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 33
diff changeset
   517
# bits on a read-only filesystem.  If so, this test will fail and crash
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 33
diff changeset
   518
# the build.
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 33
diff changeset
   519
#
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 33
diff changeset
   520
ifndef IGNORE_WRITABLE_OUTPUTDIR_TEST
33
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   521
# Create the output directory and make sure it exists and is writable
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   522
_create_outputdir:=$(shell $(MKDIR) -p "$(OUTPUTDIR)" > $(DEV_NULL) 2>&1)
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   523
ifeq ($(call WriteDirExists,$(OUTPUTDIR),/dev/null),/dev/null)
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   524
  _outputdir_error:=$(error "ERROR: OUTPUTDIR '$(OUTPUTDIR)' not created or not writable")
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   525
endif
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 33
diff changeset
   526
endif
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 33
diff changeset
   527
33
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   528
# Define absolute path if needed and check for spaces and null value
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   529
ifndef ABS_OUTPUTDIR
6789
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   530
  ifdef _OUTPUTDIRNAME
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   531
    #Could not define this at the same time as _OUTPUTDIRNAME as FullPath is not defined at that point
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   532
    ABS_BUILD_PARENT_DIRECTORY:=$(call FullPath,$(BUILD_PARENT_DIRECTORY))
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   533
    ABS_OUTPUTDIR:=$(ABS_BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME)
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   534
  else
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   535
    ABS_OUTPUTDIR:=$(call FullPath,$(OUTPUTDIR))
7388434c2fa8 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected
igor
parents: 6310
diff changeset
   536
  endif
33
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   537
endif
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   538
ABS_OUTPUTDIR:=$(call AltCheckSpaces,ABS_OUTPUTDIR)
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   539
ABS_OUTPUTDIR:=$(call AltCheckValue,ABS_OUTPUTDIR)
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   540
# Make doubly sure this is a full path
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   541
ifeq ($(call AbsPwdPathCheck,$(ABS_OUTPUTDIR)), )
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   542
  ifdef ALT_OUTPUTDIR
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   543
    _outputdir_error:=$(error "ERROR: Trouble with the absolute path for OUTPUTDIR '$(OUTPUTDIR)', was ALT_OUTPUTDIR '$(ALT_OUTPUTDIR)' an absolute path?")
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   544
  else
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   545
    _outputdir_error:=$(error "ERROR: Trouble with the absolute path for OUTPUTDIR '$(OUTPUTDIR)'")
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   546
  endif
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   547
endif
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   548
_dir1:=$(call FullPath,$(ABS_OUTPUTDIR))
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   549
_dir2:=$(call FullPath,$(OUTPUTDIR))
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   550
ifneq ($(_dir1),$(_dir2))
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   551
  _outputdir_error:=$(error "ERROR: ABS_OUTPUTDIR '$(ABS_OUTPUTDIR)' is not the same directory as OUTPUTDIR '$(OUTPUTDIR)', '$(_dir1)'!='$(_dir2)'")
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   552
endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
# Bin directory
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
#   NOTE: ISA_DIR is usually empty, on Solaris it might be /sparcv9 or /amd64
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
BINDIR      = $(OUTPUTDIR)/bin$(ISA_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
# MOZILLA_HEADERS_PATH: path to mozilla header files for plugin
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
ifdef ALT_MOZILLA_HEADERS_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
  MOZILLA_HEADERS_PATH :=$(call FullPath,$(ALT_MOZILLA_HEADERS_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
  MOZILLA_HEADERS_PATH  =$(JDK_DEVTOOLS_DIR)/share/plugin
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
MOZILLA_HEADERS_PATH:=$(call AltCheckSpaces,MOZILLA_HEADERS_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
MOZILLA_HEADERS_PATH:=$(call AltCheckValue,MOZILLA_HEADERS_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
# CUPS_HEADERS_PATH: path to Cups headers files for Unix printing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
ifneq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
JDK_CUPS_HEADERS_PATH=$(JDK_DEVTOOLS_DIR)/share/cups/include
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
  ifdef ALT_CUPS_HEADERS_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
     CUPS_HEADERS_PATH:=$(call FullPath,$(ALT_CUPS_HEADERS_PATH))
2658
43e06bc950ec 6591875: Nimbus Swing Look and Feel
peterz
parents: 1163
diff changeset
   572
     CUPS_HEADERS_PATH:=$(call AltCheckValue,CUPS_HEADERS_PATH)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
  else 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
    CUPS_HEADERS_PATH:= \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
      $(shell if [ -d "$(JDK_CUPS_HEADERS_PATH)" ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
        echo "$(JDK_CUPS_HEADERS_PATH)"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
      else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
         echo "$(_CUPS_HEADERS_PATH)";\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
      fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
1163
0de695c3558f 6746430: Fix problems with getting 'ant -version' and the required setting of 'ANT_HOME'
ohair
parents: 1162
diff changeset
   583
# Utilities ant
0de695c3558f 6746430: Fix problems with getting 'ant -version' and the required setting of 'ANT_HOME'
ohair
parents: 1162
diff changeset
   584
ifeq ($(PLATFORM), windows)
0de695c3558f 6746430: Fix problems with getting 'ant -version' and the required setting of 'ANT_HOME'
ohair
parents: 1162
diff changeset
   585
  ifeq ($(ANT_HOME),)
0de695c3558f 6746430: Fix problems with getting 'ant -version' and the required setting of 'ANT_HOME'
ohair
parents: 1162
diff changeset
   586
    ANT_HOME := $(call DirExists,$(JDK_DEVTOOLS_DIR)/share/ant/latest,,)
0de695c3558f 6746430: Fix problems with getting 'ant -version' and the required setting of 'ANT_HOME'
ohair
parents: 1162
diff changeset
   587
  endif
140
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   588
endif
6790
0451bcf8dfa9 6982499: ant detection is fragile on windows. especially using cygwin
igor
parents: 6789
diff changeset
   589
0451bcf8dfa9 6982499: ant detection is fragile on windows. especially using cygwin
igor
parents: 6789
diff changeset
   590
# There are few problems with ant we need to workaround:
0451bcf8dfa9 6982499: ant detection is fragile on windows. especially using cygwin
igor
parents: 6789
diff changeset
   591
#  1) ant is using temporary directory java.io.tmpdir
0451bcf8dfa9 6982499: ant detection is fragile on windows. especially using cygwin
igor
parents: 6789
diff changeset
   592
#     However, this directory is not unique enough and two separate ant processes
0451bcf8dfa9 6982499: ant detection is fragile on windows. especially using cygwin
igor
parents: 6789
diff changeset
   593
#     can easily end up using the exact same temp directory. This may lead to weird build failures
0451bcf8dfa9 6982499: ant detection is fragile on windows. especially using cygwin
igor
parents: 6789
diff changeset
   594
#     To workaround this we will define tmp dir explicitly
0451bcf8dfa9 6982499: ant detection is fragile on windows. especially using cygwin
igor
parents: 6789
diff changeset
   595
#  2) ant attempts to detect JDK location based on java.exe location
0451bcf8dfa9 6982499: ant detection is fragile on windows. especially using cygwin
igor
parents: 6789
diff changeset
   596
#     This is fragile as developer may have JRE first on the PATH. 
0451bcf8dfa9 6982499: ant detection is fragile on windows. especially using cygwin
igor
parents: 6789
diff changeset
   597
#     To workaround this we will specify JAVA_HOME explicitly
0451bcf8dfa9 6982499: ant detection is fragile on windows. especially using cygwin
igor
parents: 6789
diff changeset
   598
0451bcf8dfa9 6982499: ant detection is fragile on windows. especially using cygwin
igor
parents: 6789
diff changeset
   599
ANT_TMPDIR = $(ABS_OUTPUTDIR)/tmp
0451bcf8dfa9 6982499: ant detection is fragile on windows. especially using cygwin
igor
parents: 6789
diff changeset
   600
ANT_WORKAROUNDS = ANT_OPTS=-Djava.io.tmpdir='$(ANT_TMPDIR)' JAVA_HOME='$(BOOTDIR)'
0451bcf8dfa9 6982499: ant detection is fragile on windows. especially using cygwin
igor
parents: 6789
diff changeset
   601
140
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   602
ifeq ($(ANT_HOME),)
6790
0451bcf8dfa9 6982499: ant detection is fragile on windows. especially using cygwin
igor
parents: 6789
diff changeset
   603
  ANT = $(ANT_WORKAROUNDS) ant
140
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   604
else
6790
0451bcf8dfa9 6982499: ant detection is fragile on windows. especially using cygwin
igor
parents: 6789
diff changeset
   605
  ANT = $(ANT_WORKAROUNDS) $(ANT_HOME)/bin/ant
140
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   606
endif
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   607
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   608
ifdef ALT_COPYRIGHT_YEAR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
  COPYRIGHT_YEAR = $(ALT_COPYRIGHT_YEAR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   611
  COPYRIGHT_YEAR = $(shell $(DATE) '+%Y')
90ce3da70b43 Initial load
duke
parents:
diff changeset
   612
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 7463
diff changeset
   614
# Get the compiler specific settings (will run the compiler to find out)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 7463
diff changeset
   615
#   NOTE: COMPILER_PATH must be set by this time.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 7463
diff changeset
   616
#   Up until we include this file, we don't know what specific compiler
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 7463
diff changeset
   617
#   version is actually being used (i.e. what is in PATH or COMPILER_PATH).
2188
a1417beb3de8 6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents: 2158
diff changeset
   618
include $(JDK_MAKE_SHARED_DIR)/Compiler-$(CC_VERSION).gmk
a1417beb3de8 6818565: Regression with fix 6816311: COMPILER_VERSION -> REQUIRED_COMPILER_VERSION
ohair
parents: 2158
diff changeset
   619