jdk/make/common/shared/Defs.gmk
author kvn
Wed, 05 Mar 2008 11:33:31 -0800
changeset 210 6da234892f4a
parent 2 90ce3da70b43
child 33 51a7bc3e93a0
permissions -rw-r--r--
6671250: In Parse::do_if() old Cmp node 'c' should be replaced with new one after BoolNode transformation Summary: In Parse::do_if() 'c' (CmpNode) node may be changed during BoolNode transformation so 'c' may became dead but the node is referenced later in the code. Reviewed-by: never
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
# Copyright 2005-2007 Sun Microsystems, Inc.  All Rights Reserved.
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
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
$(shell cd $1 2> $(DEV_NULL) && pwd)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
# Checks an ALT value for spaces (should be one word), 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
#       warns and returns Check_ALT_$1 if spaces
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
define AltCheckSpaces
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
$(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
    65
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
# Checks an ALT value for empty, warns and returns Check_ALT_$1 if empty
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
define AltCheckValue
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
$(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
    70
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
# Checks any value for empty, warns and returns $2 if empty
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
define CheckValue
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
$(if $($1),$($1),$(warning "WARNING: Value of $1 cannot be empty, will use '$2'")$2)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
# Prefix for a utility prefix path, if empty leave alone, otherwise end with a /
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
define PrefixPath
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
$(if $1,$(subst //,/,$1/),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
# Select a directory if it exists, or the alternate 2 or the alternate 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
define DirExists
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
$(shell \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
  if [ -d "$1" ]; then  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
    echo "$1"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
  elif [ -d "$2" ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
    echo "$2"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
  else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
    echo "$3"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
  fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
# Select a writable directory if it exists and is writable, or the alternate
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
define WriteDirExists
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
$(shell \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
  if [ -d "$1" -a -w "$1" ]; then  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
    echo "$1"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
  else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
    echo "$2"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
  fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
# Select a file if it exists, or the alternate 1, or the alternate 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
define FileExists
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
$(shell \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
  if [ -r "$1" ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
    echo "$1"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
  elif [ -r "$2" ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
    echo "$2"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
  else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    echo "NO_FILE_EXISTS"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
  fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
# Given a line of text, get the major.minor version number from it
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
define GetVersion
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
$(shell echo $1 | sed -e 's@[^1-9]*\([1-9][0-9]*\.[0-9][0-9]*\).*@\1@' )
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
# Given a major.minor.micro version, return the major, minor, or micro number
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
define MajorVersion
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
$(if $(word 1, $(subst ., ,$1)),$(word 1, $(subst ., ,$1)),0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
define MinorVersion
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
$(if $(word 2, $(subst ., ,$1)),$(word 2, $(subst ., ,$1)),0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
define MicroVersion
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
$(if $(word 3, $(subst ., ,$1)),$(word 3, $(subst ., ,$1)),0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
# Macro that returns missing, same, newer, or older $1=version $2=required
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
#  (currently does not check the micro number)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
define CheckVersions
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
$(shell \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
  if [ "$1" = "" -o "$2" = "" ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
    echo missing; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
  else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
    if [ "$1" = "$2" ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
      echo same; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
    else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
      if [ $(call MajorVersion,$1) -lt $(call MajorVersion,$2) ] ; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
        echo older; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
      else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
	if [ $(call MajorVersion,$1) -eq $(call MajorVersion,$2) -a \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
	     $(call MinorVersion,$1) -lt $(call MinorVersion,$2) ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
          echo older; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
        else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
          echo newer; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
        fi; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
      fi; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
    fi; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
  fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
# Make sure certain variables are non-empty at this point
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
_check_values:=\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
$(call CheckValue,ARCH,),\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
$(call CheckValue,ARCH_DATA_MODEL,),\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
$(call CheckValue,ARCH_VM_SUBDIR,),\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
$(call CheckValue,JDK_TOPDIR,),\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
$(call CheckValue,JDK_MAKE_SHARED_DIR,),\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
$(call CheckValue,VARIANT,),\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
$(call CheckValue,PLATFORM,)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
# Misc common settings for all workspaces
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
#   This determines the version of the product, and the previous version or boot
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
ifndef JDK_MAJOR_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
  JDK_MAJOR_VERSION      = 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
  PREVIOUS_MAJOR_VERSION = 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
ifndef JDK_MINOR_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
  JDK_MINOR_VERSION      = 7
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
  PREVIOUS_MINOR_VERSION = 6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
ifndef JDK_MICRO_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
  JDK_MICRO_VERSION      = 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
  PREVIOUS_MICRO_VERSION = 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
ifndef MILESTONE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
  MILESTONE = internal
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
# Default names
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
LAUNCHER_NAME = java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
PRODUCT_NAME = Java(TM)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
PRODUCT_SUFFIX = SE Runtime Environment
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
COMPANY_NAME = Sun Microsystems, Inc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
  LAUNCHER_NAME = openjdk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
  PRODUCT_NAME = OpenJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
  PRODUCT_SUFFIX = Runtime Environment
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
  COMPANY_NAME =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
RUNTIME_NAME = $(PRODUCT_NAME) $(PRODUCT_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
ifndef BUILD_NUMBER
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
  JDK_BUILD_NUMBER = b00
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
  ifndef JDK_BUILD_NUMBER
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
    JDK_BUILD_NUMBER = $(BUILD_NUMBER)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
  endif
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 variant is the optimized version of everything
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
#    can be OPT or DBG,  default is OPT
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
#    Determine the extra pattern to add to the release name for debug/fastdebug.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
#    Determine the JDK_IMPORT_VARIANT, so we get the right VM files copied over.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
#    Determine suffix for obj directory or OBJDIR, for .o files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
#    (by keeping .o files separate, just .o files, they don't clobber each
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
#     other, however, the library files will clobber each other).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
ifeq ($(VARIANT), DBG)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
  BUILD_VARIANT_RELEASE=-debug
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
  OBJDIRNAME_SUFFIX=_g
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
  BUILD_VARIANT_RELEASE=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
  OBJDIRNAME_SUFFIX=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
ifeq ($(FASTDEBUG), true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
  VARIANT=DBG
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
  BUILD_VARIANT_RELEASE=-fastdebug
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
  OBJDIRNAME_SUFFIX=_gO
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
  _JDK_IMPORT_VARIANT=/fastdebug
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
# Depending on the flavor of the build, add a -debug or -fastdebug to the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
ifdef DEBUG_NAME
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
  BUILD_VARIANT_RELEASE=-$(DEBUG_NAME)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
# These default values are redefined during a release build.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
#    CTE can set JDK_UPDATE_VERSION during the update release
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
ifdef JDK_UPDATE_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
  JDK_VERSION  = $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)_$(JDK_UPDATE_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
  MARKETING_NUMBER := $(shell \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
	$(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
   243
  MARKET_NAME= $(shell $(ECHO) " Update $(MARKETING_NUMBER)")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
  JDK_MKTG_VERSION  = $(JDK_MINOR_VERSION)u$(MARKETING_NUMBER)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
  JDK_VERSION  = $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
  JDK_MKTG_VERSION  = $(JDK_MINOR_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
  MARKET_NAME=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
JDK_UNDERSCORE_VERSION =  $(subst .,_,$(JDK_VERSION))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
JDK_MKTG_UNDERSCORE_VERSION =  $(subst .,_,$(JDK_MKTG_VERSION))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
# RELEASE is JDK_VERSION and -MILESTONE if MILESTONE is set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
ifneq ($(MILESTONE),fcs)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
  RELEASE      = $(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
  RELEASE      = $(JDK_VERSION)$(BUILD_VARIANT_RELEASE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
# FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
ifdef BUILD_NUMBER
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
  FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
  BUILD_NUMBER = b00
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
  USER_RELEASE_SUFFIX := $(shell echo $(USER)_`date '+%d_%b_%Y_%H_%M' | tr "A-Z" "a-z"`)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
  FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
# Promoted build location
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
PROMOTED_RE_AREA = $(SLASH_JAVA)/re/jdk/$(JDK_VERSION)/promoted
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
PROMOTED_BUILD_LATEST = latest
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
PROMOTED_BUILD_BASEDIR = $(PROMOTED_RE_AREA)/$(PROMOTED_BUILD_LATEST)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
PROMOTED_BUILD_BINARIES = $(PROMOTED_BUILD_BASEDIR)/binaries
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
# OPT: Changes what the optimizations settings (in _OPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
POPT = $(_OPT$(ALT_OPT))$(ALT_OPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
# PARALLEL_COMPILE_JOBS: is the number of compiles done in parallel.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
#  If the user sets ALT_PARALLEL_COMPILE_JOBS, then COMPILE_APPROACH is set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
#  to parallel.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
#  Recommended setting: 2 seems to be ideal for single cpu machines,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
#                       2 times the number of CPU's is a basic formula, 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
#                       but probably not more than 4 if the machine is 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
#                       being shared by others, or the machine is limited 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
#                       in RAM or swap.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
ifdef ALT_PARALLEL_COMPILE_JOBS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
  PARALLEL_COMPILE_JOBS=$(ALT_PARALLEL_COMPILE_JOBS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
  PARALLEL_COMPILE_JOBS=2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
# Previous JDK release (version of BOOTDIR version)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
ifdef ALT_PREVIOUS_JDK_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
  PREVIOUS_JDK_VERSION = $(ALT_PREVIOUS_JDK_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
  PREVIOUS_JDK_VERSION  = $(PREVIOUS_MAJOR_VERSION).$(PREVIOUS_MINOR_VERSION).$(PREVIOUS_MICRO_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
export PREVIOUS_JDK_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
PREVIOUS_JDK_VERSION:=$(call AltCheckSpaces,PREVIOUS_JDK_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
PREVIOUS_JDK_VERSION:=$(call AltCheckValue,PREVIOUS_JDK_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
# Version with _ instead of . in number
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
ifeq ($(PREVIOUS_MINOR_VERSION),5)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
  PREVIOUS_JDK_UNDERSCORE_VERSION =  $(subst .,_,$(PREVIOUS_JDK_VERSION))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
  PREVIOUS_JDK_UNDERSCORE_VERSION = $(PREVIOUS_MINOR_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
# Include any private definitions for this set of workspaces
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
_PRIVATE_DEFS_FILE=$(JDK_MAKE_SHARED_DIR)/PrivateDefs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
USING_PRIVATE_DEFS:=$(shell if [ -f $(_PRIVATE_DEFS_FILE) ]; then echo true; else echo false; fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
ifeq ($(USING_PRIVATE_DEFS),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
dummy:=$(warning "WARNING: Using definitions from $(_PRIVATE_DEFS_FILE)")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
include $(_PRIVATE_DEFS_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
# Get platform specific settings
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
include $(JDK_MAKE_SHARED_DIR)/Defs-$(PLATFORM).gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
# Components
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
ifdef ALT_LANGTOOLS_DIST
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
  LANGTOOLS_DIST :=$(call FullPath,$(ALT_LANGTOOLS_DIST))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
  LANGTOOLS_DIST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
ifdef ALT_CORBA_DIST
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
  CORBA_DIST :=$(call FullPath,$(ALT_CORBA_DIST))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
  CORBA_DIST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
ifdef ALT_JAXP_DIST
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
  JAXP_DIST :=$(call FullPath,$(ALT_JAXP_DIST))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
  JAXP_DIST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
ifdef ALT_JAXWS_DIST
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
  JAXWS_DIST :=$(call FullPath,$(ALT_JAXWS_DIST))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
  JAXWS_DIST =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
# HOTSPOT_DOCS_IMPORT_PATH: Path to hotspot docs files to import into the docs generation
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
ifdef ALT_HOTSPOT_DOCS_IMPORT_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
  HOTSPOT_DOCS_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_DOCS_IMPORT_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
  HOTSPOT_DOCS_IMPORT_PATH :=$(call DirExists,$(HOTSPOT_IMPORT_PATH)/docs,$(PROMOTED_BUILD_BASEDIR)/docs,/NO_DOCS_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
# PREVIOUS_JDK_FILE: filename of install bundle for previous JDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
ifdef ALT_PREVIOUS_JDK_FILE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
  PREVIOUS_JDK_FILE  =$(ALT_PREVIOUS_JDK_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
  PREVIOUS_JDK_FILE = jdk-$(PREVIOUS_JDK_UNDERSCORE_VERSION)-$(PLATFORM)-$(ARCH)$(BUNDLE_FILE_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
export PREVIOUS_JDK_FILE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
PREVIOUS_JDK_FILE:=$(call AltCheckSpaces,PREVIOUS_JDK_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
PREVIOUS_JDK_FILE:=$(call AltCheckValue,PREVIOUS_JDK_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
# PREVIOUS_JRE_FILE: filename of install bundle for previous JRE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
ifdef ALT_PREVIOUS_JRE_FILE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
  PREVIOUS_JRE_FILE  =$(ALT_PREVIOUS_JRE_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
  PREVIOUS_JRE_FILE = jre-$(PREVIOUS_JDK_UNDERSCORE_VERSION)-$(PLATFORM)-$(ARCH)$(BUNDLE_FILE_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
export PREVIOUS_JRE_FILE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
PREVIOUS_JRE_FILE:=$(call AltCheckSpaces,PREVIOUS_JRE_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
PREVIOUS_JRE_FILE:=$(call AltCheckValue,PREVIOUS_JRE_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
# Set here as shared variables
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
PREVIOUS_JRE_BUNDLE = $(PREVIOUS_RELEASE_PATH)/$(PREVIOUS_JRE_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
PREVIOUS_JDK_BUNDLE = $(PREVIOUS_RELEASE_PATH)/$(PREVIOUS_JDK_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
# These are the same on all platforms but require the above platform include 1st
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
# BOOTDIR: Bootstrap JDK, previous released JDK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
#   _BOOTDIR1 and _BOOTDIR2 picked by platform
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
ifdef ALT_BOOTDIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
  BOOTDIR =$(ALT_BOOTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
  BOOTDIR  :=$(call DirExists,$(_BOOTDIR1),$(_BOOTDIR2),/NO_BOOTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
export BOOTDIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
BOOTDIR:=$(call AltCheckSpaces,BOOTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
BOOTDIR:=$(call AltCheckValue,BOOTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
# PREVIOUS_RELEASE_PATH: path to where previous release bundles are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
ifdef ALT_PREVIOUS_RELEASE_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
  PREVIOUS_RELEASE_PATH :=$(call OptFullPath,$(ALT_PREVIOUS_RELEASE_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
  PREVIOUS_RELEASE_PATH =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/bundles/$(PLATFORM)-$(ARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
export PREVIOUS_RELEASE_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
PREVIOUS_RELEASE_PATH:=$(call AltCheckSpaces,PREVIOUS_RELEASE_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
PREVIOUS_RELEASE_PATH:=$(call AltCheckValue,PREVIOUS_RELEASE_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
# PREVIOUS_RELEASE_IMAGE: Previous install image to compare against
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
ifdef ALT_PREVIOUS_RELEASE_IMAGE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
  PREVIOUS_RELEASE_IMAGE :=$(call FullPath,$(ALT_PREVIOUS_RELEASE_IMAGE))
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
# CACERTS_FILE: if OPENJDK is false and the internal version of the file 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
#		(that is, non-empty) is available, use it, otherwise use an 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
#		empty keystore.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
# We put this variable here for sanity checks and in case another
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
# components will need to know which cacerts file is being used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
ifdef ALT_CACERTS_FILE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
  CACERTS_FILE = $(ALT_CACERTS_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
  CACERTS_EXT   = $(SHARE_SRC)/lib/security/cacerts
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
  ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
    CACERTS_FILE  :=$(CACERTS_EXT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
  else # (!OPENJDK)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
    CACERTS_INT   = $(CLOSED_SHARE_SRC)/lib/security/cacerts.internal
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
    CACERTS_FILE  :=$(call FileExists,$(CACERTS_INT),$(CACERTS_EXT))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
  endif # (OPENJDK)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
CACERTS_FILE:=$(call AltCheckSpaces,CACERTS_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
CACERTS_FILE:=$(call AltCheckValue,CACERTS_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
# OUTPUTDIR: Location of all output for the build
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
_BACKUP_OUTPUTDIR = $(TEMP_DISK)/$(USER)/jdk-outputdir
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
ifdef ALT_OUTPUTDIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
  _POSSIBLE_OUTPUTDIR =$(subst \,/,$(ALT_OUTPUTDIR))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
  ifndef _OUTPUTDIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
    _OUTPUTDIR = $(_BACKUP_OUTPUTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
  _POSSIBLE_OUTPUTDIR =$(_OUTPUTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
_create_outputdir1:=$(shell mkdir -p $(_POSSIBLE_OUTPUTDIR) > $(DEV_NULL) 2>&1)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
OUTPUTDIR:=$(call WriteDirExists,$(_POSSIBLE_OUTPUTDIR),$(_BACKUP_OUTPUTDIR))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
_create_outputdir2:=$(shell mkdir -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
ifeq "$(OUTPUTDIR)" "$(_BACKUP_OUTPUTDIR)"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
  _outputdir_warning:=$(warning "WARNING: OUTPUTDIR '$(_POSSIBLE_OUTPUTDIR)' not writable, will use '$(_BACKUP_OUTPUTDIR)'")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
OUTPUTDIR:=$(call AltCheckSpaces,OUTPUTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
OUTPUTDIR:=$(call AltCheckValue,OUTPUTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
# Bin directory
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
#   NOTE: ISA_DIR is usually empty, on Solaris it might be /sparcv9 or /amd64
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
BINDIR      = $(OUTPUTDIR)/bin$(ISA_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
# MOZILLA_HEADERS_PATH: path to mozilla header files for plugin
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
ifdef ALT_MOZILLA_HEADERS_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
  MOZILLA_HEADERS_PATH :=$(call FullPath,$(ALT_MOZILLA_HEADERS_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
  MOZILLA_HEADERS_PATH  =$(JDK_DEVTOOLS_DIR)/share/plugin
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
MOZILLA_HEADERS_PATH:=$(call AltCheckSpaces,MOZILLA_HEADERS_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
MOZILLA_HEADERS_PATH:=$(call AltCheckValue,MOZILLA_HEADERS_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
# CUPS_HEADERS_PATH: path to Cups headers files for Unix printing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
ifneq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
JDK_CUPS_HEADERS_PATH=$(JDK_DEVTOOLS_DIR)/share/cups/include
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
  ifdef ALT_CUPS_HEADERS_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
     CUPS_HEADERS_PATH:=$(call FullPath,$(ALT_CUPS_HEADERS_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
     CUP_HEADERS_PATH:=$(call AltCheckValue,CUPS_HEADERS_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
  else 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
    CUPS_HEADERS_PATH:= \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
      $(shell if [ -d "$(JDK_CUPS_HEADERS_PATH)" ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
        echo "$(JDK_CUPS_HEADERS_PATH)"; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
      else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
         echo "$(_CUPS_HEADERS_PATH)";\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
      fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
ifdef ALT_COPYRIGHT_YEAR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
  COPYRIGHT_YEAR = $(ALT_COPYRIGHT_YEAR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
  COPYRIGHT_YEAR = $(shell $(DATE) '+%Y')
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
# Absolute path to output directory
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
ABS_OUTPUTDIR:=$(call FullPath,$(OUTPUTDIR))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
# Get shared compiler settings
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
include $(JDK_MAKE_SHARED_DIR)/Compiler.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483