jdk/make/common/shared/Defs.gmk
author ohair
Wed, 30 Jul 2008 19:40:57 -0700
changeset 917 75261da60fff
parent 312 b13547d8416e
child 919 909db04edd73
permissions -rw-r--r--
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2 Reviewed-by: tbell
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 33
diff changeset
     2
# Copyright 2005-2008 Sun Microsystems, Inc.  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
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
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
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
# have any questions.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
# Select a writable directory if it exists and is writable, or the alternate
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
define WriteDirExists
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
$(shell \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
  if [ -d "$1" -a -w "$1" ]; then  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
    echo "$1"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
  else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
    echo "$2"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
  fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
# Select a file if it exists, or the alternate 1, or the alternate 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
define FileExists
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
$(shell \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
  if [ -r "$1" ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
    echo "$1"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
  elif [ -r "$2" ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
    echo "$2"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
  else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    echo "NO_FILE_EXISTS"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
  fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
# Given a line of text, get the major.minor version number from it
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
define GetVersion
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
$(shell echo $1 | sed -e 's@[^1-9]*\([1-9][0-9]*\.[0-9][0-9]*\).*@\1@' )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
# Given a major.minor.micro version, return the major, minor, or micro number
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
define MajorVersion
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
$(if $(word 1, $(subst ., ,$1)),$(word 1, $(subst ., ,$1)),0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
define MinorVersion
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
$(if $(word 2, $(subst ., ,$1)),$(word 2, $(subst ., ,$1)),0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
define MicroVersion
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
$(if $(word 3, $(subst ., ,$1)),$(word 3, $(subst ., ,$1)),0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
# Macro that returns missing, same, newer, or older $1=version $2=required
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
#  (currently does not check the micro number)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
define CheckVersions
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
$(shell \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
  if [ "$1" = "" -o "$2" = "" ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
    echo missing; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
  else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
    if [ "$1" = "$2" ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
      echo same; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
    else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
      if [ $(call MajorVersion,$1) -lt $(call MajorVersion,$2) ] ; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
        echo older; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
      else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
	if [ $(call MajorVersion,$1) -eq $(call MajorVersion,$2) -a \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
	     $(call MinorVersion,$1) -lt $(call MinorVersion,$2) ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
          echo older; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
        else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
          echo newer; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
        fi; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
      fi; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
    fi; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
  fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
# Make sure certain variables are non-empty at this point
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
_check_values:=\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
$(call CheckValue,ARCH,),\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
$(call CheckValue,ARCH_DATA_MODEL,),\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
$(call CheckValue,ARCH_VM_SUBDIR,),\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
$(call CheckValue,JDK_TOPDIR,),\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
$(call CheckValue,JDK_MAKE_SHARED_DIR,),\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
$(call CheckValue,VARIANT,),\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
$(call CheckValue,PLATFORM,)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
# Misc common settings for all workspaces
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
#   This determines the version of the product, and the previous version or boot
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
ifndef JDK_MAJOR_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
  JDK_MAJOR_VERSION      = 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
  PREVIOUS_MAJOR_VERSION = 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
ifndef JDK_MINOR_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
  JDK_MINOR_VERSION      = 7
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
  PREVIOUS_MINOR_VERSION = 6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
ifndef JDK_MICRO_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
  JDK_MICRO_VERSION      = 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
  PREVIOUS_MICRO_VERSION = 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
ifndef MILESTONE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
  MILESTONE = internal
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
# Default names
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
LAUNCHER_NAME = java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
PRODUCT_NAME = Java(TM)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
PRODUCT_SUFFIX = SE Runtime Environment
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
COMPANY_NAME = Sun Microsystems, Inc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
  LAUNCHER_NAME = openjdk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
  PRODUCT_NAME = OpenJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
  PRODUCT_SUFFIX = Runtime Environment
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
  COMPANY_NAME =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
RUNTIME_NAME = $(PRODUCT_NAME) $(PRODUCT_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
ifndef BUILD_NUMBER
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
  JDK_BUILD_NUMBER = b00
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
  ifndef JDK_BUILD_NUMBER
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
    JDK_BUILD_NUMBER = $(BUILD_NUMBER)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
# Default variant is the optimized version of everything
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
#    can be OPT or DBG,  default is OPT
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
#    Determine the extra pattern to add to the release name for debug/fastdebug.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
#    Determine the JDK_IMPORT_VARIANT, so we get the right VM files copied over.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
#    Determine suffix for obj directory or OBJDIR, for .o files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
#    (by keeping .o files separate, just .o files, they don't clobber each
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
#     other, however, the library files will clobber each other).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
ifeq ($(VARIANT), DBG)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
  BUILD_VARIANT_RELEASE=-debug
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
  OBJDIRNAME_SUFFIX=_g
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
  BUILD_VARIANT_RELEASE=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
  OBJDIRNAME_SUFFIX=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
ifeq ($(FASTDEBUG), true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
  VARIANT=DBG
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
  BUILD_VARIANT_RELEASE=-fastdebug
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
  OBJDIRNAME_SUFFIX=_gO
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
  _JDK_IMPORT_VARIANT=/fastdebug
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
# Depending on the flavor of the build, add a -debug or -fastdebug to the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
ifdef DEBUG_NAME
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
  BUILD_VARIANT_RELEASE=-$(DEBUG_NAME)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
# These default values are redefined during a release build.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
#    CTE can set JDK_UPDATE_VERSION during the update release
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
ifdef JDK_UPDATE_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
  JDK_VERSION  = $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)_$(JDK_UPDATE_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
  MARKETING_NUMBER := $(shell \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
	$(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
   246
  MARKET_NAME= $(shell $(ECHO) " Update $(MARKETING_NUMBER)")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
  JDK_MKTG_VERSION  = $(JDK_MINOR_VERSION)u$(MARKETING_NUMBER)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
  JDK_VERSION  = $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
  JDK_MKTG_VERSION  = $(JDK_MINOR_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
  MARKET_NAME=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
JDK_UNDERSCORE_VERSION =  $(subst .,_,$(JDK_VERSION))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
JDK_MKTG_UNDERSCORE_VERSION =  $(subst .,_,$(JDK_MKTG_VERSION))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
# RELEASE is JDK_VERSION and -MILESTONE if MILESTONE is set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
ifneq ($(MILESTONE),fcs)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
  RELEASE      = $(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
  RELEASE      = $(JDK_VERSION)$(BUILD_VARIANT_RELEASE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
# FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
ifdef BUILD_NUMBER
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
  FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
  BUILD_NUMBER = b00
307
18015b31ef73 6501543: Username can have non-alphanumeric characters
ohair
parents: 140
diff changeset
   268
  BUILD_DATE := $(shell $(DATE) '+%Y_%m_%d_%H_%M')
18015b31ef73 6501543: Username can have non-alphanumeric characters
ohair
parents: 140
diff changeset
   269
  CLEAN_USERNAME := $(shell $(ECHO) "$(USER)" | $(TR) -d -c '[:alnum:]')
18015b31ef73 6501543: Username can have non-alphanumeric characters
ohair
parents: 140
diff changeset
   270
  USER_RELEASE_SUFFIX := $(shell $(ECHO) "$(CLEAN_USERNAME)_$(BUILD_DATE)" | $(TR) '[:upper:]' '[:lower:]' )
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
  FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
# Promoted build location
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
PROMOTED_RE_AREA = $(SLASH_JAVA)/re/jdk/$(JDK_VERSION)/promoted
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
PROMOTED_BUILD_LATEST = latest
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
PROMOTED_BUILD_BASEDIR = $(PROMOTED_RE_AREA)/$(PROMOTED_BUILD_LATEST)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
PROMOTED_BUILD_BINARIES = $(PROMOTED_BUILD_BASEDIR)/binaries
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
# PARALLEL_COMPILE_JOBS: is the number of compiles done in parallel.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
#  If the user sets ALT_PARALLEL_COMPILE_JOBS, then COMPILE_APPROACH is set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
#  to parallel.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
#  Recommended setting: 2 seems to be ideal for single cpu machines,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
#                       2 times the number of CPU's is a basic formula, 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
#                       but probably not more than 4 if the machine is 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
#                       being shared by others, or the machine is limited 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
#                       in RAM or swap.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
ifdef ALT_PARALLEL_COMPILE_JOBS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
  PARALLEL_COMPILE_JOBS=$(ALT_PARALLEL_COMPILE_JOBS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
  PARALLEL_COMPILE_JOBS=2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
# Previous JDK release (version of BOOTDIR version)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
ifdef ALT_PREVIOUS_JDK_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
  PREVIOUS_JDK_VERSION = $(ALT_PREVIOUS_JDK_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
  PREVIOUS_JDK_VERSION  = $(PREVIOUS_MAJOR_VERSION).$(PREVIOUS_MINOR_VERSION).$(PREVIOUS_MICRO_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
export PREVIOUS_JDK_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
PREVIOUS_JDK_VERSION:=$(call AltCheckSpaces,PREVIOUS_JDK_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
PREVIOUS_JDK_VERSION:=$(call AltCheckValue,PREVIOUS_JDK_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
# Version with _ instead of . in number
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
ifeq ($(PREVIOUS_MINOR_VERSION),5)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
  PREVIOUS_JDK_UNDERSCORE_VERSION =  $(subst .,_,$(PREVIOUS_JDK_VERSION))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
  PREVIOUS_JDK_UNDERSCORE_VERSION = $(PREVIOUS_MINOR_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
# Include any private definitions for this set of workspaces
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
_PRIVATE_DEFS_FILE=$(JDK_MAKE_SHARED_DIR)/PrivateDefs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
USING_PRIVATE_DEFS:=$(shell if [ -f $(_PRIVATE_DEFS_FILE) ]; then echo true; else echo false; fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
ifeq ($(USING_PRIVATE_DEFS),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
dummy:=$(warning "WARNING: Using definitions from $(_PRIVATE_DEFS_FILE)")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
include $(_PRIVATE_DEFS_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
# Get platform specific settings
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
include $(JDK_MAKE_SHARED_DIR)/Defs-$(PLATFORM).gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
# Components
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
ifdef ALT_LANGTOOLS_DIST
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
  LANGTOOLS_DIST :=$(call FullPath,$(ALT_LANGTOOLS_DIST))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
  LANGTOOLS_DIST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
ifdef ALT_CORBA_DIST
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
  CORBA_DIST :=$(call FullPath,$(ALT_CORBA_DIST))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
  CORBA_DIST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
ifdef ALT_JAXP_DIST
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
  JAXP_DIST :=$(call FullPath,$(ALT_JAXP_DIST))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
  JAXP_DIST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
ifdef ALT_JAXWS_DIST
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
  JAXWS_DIST :=$(call FullPath,$(ALT_JAXWS_DIST))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
  JAXWS_DIST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
# HOTSPOT_DOCS_IMPORT_PATH: Path to hotspot docs files to import into the docs generation
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
ifdef ALT_HOTSPOT_DOCS_IMPORT_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
  HOTSPOT_DOCS_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_DOCS_IMPORT_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
  HOTSPOT_DOCS_IMPORT_PATH :=$(call DirExists,$(HOTSPOT_IMPORT_PATH)/docs,$(PROMOTED_BUILD_BASEDIR)/docs,/NO_DOCS_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
# PREVIOUS_JDK_FILE: filename of install bundle for previous JDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
ifdef ALT_PREVIOUS_JDK_FILE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
  PREVIOUS_JDK_FILE  =$(ALT_PREVIOUS_JDK_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
  PREVIOUS_JDK_FILE = jdk-$(PREVIOUS_JDK_UNDERSCORE_VERSION)-$(PLATFORM)-$(ARCH)$(BUNDLE_FILE_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
export PREVIOUS_JDK_FILE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
PREVIOUS_JDK_FILE:=$(call AltCheckSpaces,PREVIOUS_JDK_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
PREVIOUS_JDK_FILE:=$(call AltCheckValue,PREVIOUS_JDK_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
# PREVIOUS_JRE_FILE: filename of install bundle for previous JRE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
ifdef ALT_PREVIOUS_JRE_FILE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
  PREVIOUS_JRE_FILE  =$(ALT_PREVIOUS_JRE_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
  PREVIOUS_JRE_FILE = jre-$(PREVIOUS_JDK_UNDERSCORE_VERSION)-$(PLATFORM)-$(ARCH)$(BUNDLE_FILE_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
export PREVIOUS_JRE_FILE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
PREVIOUS_JRE_FILE:=$(call AltCheckSpaces,PREVIOUS_JRE_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
PREVIOUS_JRE_FILE:=$(call AltCheckValue,PREVIOUS_JRE_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
# Set here as shared variables
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
PREVIOUS_JRE_BUNDLE = $(PREVIOUS_RELEASE_PATH)/$(PREVIOUS_JRE_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
PREVIOUS_JDK_BUNDLE = $(PREVIOUS_RELEASE_PATH)/$(PREVIOUS_JDK_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
# These are the same on all platforms but require the above platform include 1st
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
# BOOTDIR: Bootstrap JDK, previous released JDK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
#   _BOOTDIR1 and _BOOTDIR2 picked by platform
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
ifdef ALT_BOOTDIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
  BOOTDIR =$(ALT_BOOTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
  BOOTDIR  :=$(call DirExists,$(_BOOTDIR1),$(_BOOTDIR2),/NO_BOOTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
export BOOTDIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
BOOTDIR:=$(call AltCheckSpaces,BOOTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
BOOTDIR:=$(call AltCheckValue,BOOTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
# PREVIOUS_RELEASE_PATH: path to where previous release bundles are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
ifdef ALT_PREVIOUS_RELEASE_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
  PREVIOUS_RELEASE_PATH :=$(call OptFullPath,$(ALT_PREVIOUS_RELEASE_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
  PREVIOUS_RELEASE_PATH =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/bundles/$(PLATFORM)-$(ARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
export PREVIOUS_RELEASE_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
PREVIOUS_RELEASE_PATH:=$(call AltCheckSpaces,PREVIOUS_RELEASE_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
PREVIOUS_RELEASE_PATH:=$(call AltCheckValue,PREVIOUS_RELEASE_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
# PREVIOUS_RELEASE_IMAGE: Previous install image to compare against
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
ifdef ALT_PREVIOUS_RELEASE_IMAGE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
  PREVIOUS_RELEASE_IMAGE :=$(call FullPath,$(ALT_PREVIOUS_RELEASE_IMAGE))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
# CACERTS_FILE: if OPENJDK is false and the internal version of the file 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
#		(that is, non-empty) is available, use it, otherwise use an 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
#		empty keystore.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
# We put this variable here for sanity checks and in case another
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
# components will need to know which cacerts file is being used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
ifdef ALT_CACERTS_FILE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
  CACERTS_FILE = $(ALT_CACERTS_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
  CACERTS_EXT   = $(SHARE_SRC)/lib/security/cacerts
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
  ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
    CACERTS_FILE  :=$(CACERTS_EXT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
  else # (!OPENJDK)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
    CACERTS_INT   = $(CLOSED_SHARE_SRC)/lib/security/cacerts.internal
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
    CACERTS_FILE  :=$(call FileExists,$(CACERTS_INT),$(CACERTS_EXT))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
  endif # (OPENJDK)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
CACERTS_FILE:=$(call AltCheckSpaces,CACERTS_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
CACERTS_FILE:=$(call AltCheckValue,CACERTS_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
# OUTPUTDIR: Location of all output for the build
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
ifdef ALT_OUTPUTDIR
33
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   428
  OUTPUTDIR:=$(subst \,/,$(ALT_OUTPUTDIR))
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   429
  # Assumes this is absolute (checks later)
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   430
  ABS_OUTPUTDIR:=$(OUTPUTDIR)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
  ifndef _OUTPUTDIR
33
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   433
    # Default:  Get "build" parent directory, which should always exist
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   434
    ifndef BUILD_PARENT_DIRECTORY
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   435
      BUILD_PARENT_DIRECTORY=$(BUILDDIR)/..
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   436
    endif
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   437
    ABS_BUILD_PARENT_DIRECTORY:=$(call FullPath,$(BUILD_PARENT_DIRECTORY))
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   438
    ifdef OPENJDK
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   439
      _OUTPUTDIRNAME=$(PLATFORM)-$(ARCH)$(OPENJDK_SUFFIX)
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   440
    else
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   441
      _OUTPUTDIRNAME=$(PLATFORM)-$(ARCH)
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   442
    endif
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   443
    _OUTPUTDIR=$(BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME)
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   444
    ABS_OUTPUTDIR:=$(ABS_BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
  endif
33
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   446
  OUTPUTDIR:=$(_OUTPUTDIR)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
endif
33
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   448
# Check for spaces and null value
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
OUTPUTDIR:=$(call AltCheckSpaces,OUTPUTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
OUTPUTDIR:=$(call AltCheckValue,OUTPUTDIR)
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 33
diff changeset
   451
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 33
diff changeset
   452
#
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 33
diff changeset
   453
# 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
   454
# 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
   455
# the build.
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 33
diff changeset
   456
#
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 33
diff changeset
   457
ifndef IGNORE_WRITABLE_OUTPUTDIR_TEST
33
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   458
# 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
   459
_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
   460
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
   461
  _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
   462
endif
300
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 33
diff changeset
   463
endif
d4f77ff718fd 6683078: Update JCE framework and provider builds to work on read-only filesystems
wetmore
parents: 33
diff changeset
   464
33
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   465
# 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
   466
ifndef ABS_OUTPUTDIR
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   467
  ABS_OUTPUTDIR:=$(call FullPath,$(OUTPUTDIR))
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   468
endif
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   469
ABS_OUTPUTDIR:=$(call AltCheckSpaces,ABS_OUTPUTDIR)
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   470
ABS_OUTPUTDIR:=$(call AltCheckValue,ABS_OUTPUTDIR)
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   471
# 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
   472
ifeq ($(call AbsPwdPathCheck,$(ABS_OUTPUTDIR)), )
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   473
  ifdef ALT_OUTPUTDIR
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   474
    _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
   475
  else
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   476
    _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
   477
  endif
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   478
endif
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   479
_dir1:=$(call FullPath,$(ABS_OUTPUTDIR))
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   480
_dir2:=$(call FullPath,$(OUTPUTDIR))
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   481
ifneq ($(_dir1),$(_dir2))
51a7bc3e93a0 6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents: 2
diff changeset
   482
  _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
   483
endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
# Bin directory
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
#   NOTE: ISA_DIR is usually empty, on Solaris it might be /sparcv9 or /amd64
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
BINDIR      = $(OUTPUTDIR)/bin$(ISA_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
# MOZILLA_HEADERS_PATH: path to mozilla header files for plugin
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
ifdef ALT_MOZILLA_HEADERS_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
  MOZILLA_HEADERS_PATH :=$(call FullPath,$(ALT_MOZILLA_HEADERS_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
  MOZILLA_HEADERS_PATH  =$(JDK_DEVTOOLS_DIR)/share/plugin
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
MOZILLA_HEADERS_PATH:=$(call AltCheckSpaces,MOZILLA_HEADERS_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
MOZILLA_HEADERS_PATH:=$(call AltCheckValue,MOZILLA_HEADERS_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
# CUPS_HEADERS_PATH: path to Cups headers files for Unix printing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
ifneq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
JDK_CUPS_HEADERS_PATH=$(JDK_DEVTOOLS_DIR)/share/cups/include
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
  ifdef ALT_CUPS_HEADERS_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
     CUPS_HEADERS_PATH:=$(call FullPath,$(ALT_CUPS_HEADERS_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
     CUP_HEADERS_PATH:=$(call AltCheckValue,CUPS_HEADERS_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
  else 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
    CUPS_HEADERS_PATH:= \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
      $(shell if [ -d "$(JDK_CUPS_HEADERS_PATH)" ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
        echo "$(JDK_CUPS_HEADERS_PATH)"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
      else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
         echo "$(_CUPS_HEADERS_PATH)";\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
      fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
140
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   514
# Utilities ant and findbugs
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   515
ifeq ($(ANT_HOME),)
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   516
  ANT_HOME := $(call DirExists,/usr/share/ant,$(JDK_DEVTOOLS_DIR)/share/ant/latest,)
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   517
endif
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   518
ifeq ($(ANT_HOME),)
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   519
  ANT = ant
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   520
else
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   521
  ANT = $(ANT_HOME)/bin/ant
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   522
endif
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   523
ifeq ($(FINDBUGS_HOME),)
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   524
  FINDBUGS_HOME := $(call DirExists,/usr/share/findbugs,$(JDK_DEVTOOLS_DIR)/share/findbugs/latest,)
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   525
endif
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   526
ifeq ($(FINDBUGS_HOME),)
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   527
  FINDBUGS = findbugs
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   528
else
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   529
  FINDBUGS = $(FINDBUGS_HOME)/bin/findbugs
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   530
endif
3d601b5affa3 6654458: /java/devtools findbugs doesn't work on windows
ohair
parents: 33
diff changeset
   531
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
ifdef ALT_COPYRIGHT_YEAR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
  COPYRIGHT_YEAR = $(ALT_COPYRIGHT_YEAR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
  COPYRIGHT_YEAR = $(shell $(DATE) '+%Y')
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
# Get shared compiler settings
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
include $(JDK_MAKE_SHARED_DIR)/Compiler.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540