jdk/make/common/shared/Defs-java.gmk
author jlaskey
Tue, 19 Feb 2013 09:47:02 -0400
changeset 16248 e4bcc4b4f897
parent 14406 0c65c125ff9d
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
12684
f438283ab987 7163470: Build fails if javax.crypto src files not present
coffeys
parents: 12047
diff changeset
     2
# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4717
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4717
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
#
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4717
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4717
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4717
diff changeset
    23
# questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
# Common java/javac/jdk variables used by all the Java makefiles.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
# This file should not contain rules.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
# WARNING: This file is shared with other workspaces.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#          So when it includes other files, it must use JDK_TOPDIR.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
# Memory related -J flags that all uses of java tools should use.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
JAVA_MEM_FLAGS   = -Xmx$(MAX_VM_MEMORY)m
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
ifeq ($(ARCH), ia64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
  # Special flags for javac on ia64 to work around a VM problem with
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
  #   bad code generation during inlining (what version had this problem?):
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
  #   Suspect this may not be needed anymore.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
  JAVA_MEM_FLAGS   += -Xms$(MAX_VM_MEMORY)m -XX:-Inline
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
  JAVA_MEM_FLAGS   += -Xms$(MIN_VM_MEMORY)m -XX:PermSize=32m -XX:MaxPermSize=160m
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
8546
ded72ac070ec 6844879: Source distribution should be more robustly built without the security source distribution
wetmore
parents: 7817
diff changeset
    48
#
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
# All java tools (javac, javah, and javadoc) run faster with certain java
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
#    options, this macro should be used with all these tools.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
#    In particular, the client VM makes these tools run faster when
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
#    it's available.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
ADD_CLIENT_VM_OPTION = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
ifeq ($(PLATFORM), solaris)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
  ADD_CLIENT_VM_OPTION = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
  ifeq ($(ARCH_DATA_MODEL), 32)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    ADD_CLIENT_VM_OPTION = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
endif
2399
8152d21ae245 6745361: Add -XX options to prevent stdout/stderr pollution using fastdebug/debug bootjdk
ohair
parents: 2169
diff changeset
    62
8152d21ae245 6745361: Add -XX options to prevent stdout/stderr pollution using fastdebug/debug bootjdk
ohair
parents: 2169
diff changeset
    63
# Options for hotspot to turn off printing of options with fastdebug version
8152d21ae245 6745361: Add -XX options to prevent stdout/stderr pollution using fastdebug/debug bootjdk
ohair
parents: 2169
diff changeset
    64
#   and creating the hotspot.log file.
8152d21ae245 6745361: Add -XX options to prevent stdout/stderr pollution using fastdebug/debug bootjdk
ohair
parents: 2169
diff changeset
    65
JAVA_HOTSPOT_DISABLE_PRINT_VMOPTIONS = \
8152d21ae245 6745361: Add -XX options to prevent stdout/stderr pollution using fastdebug/debug bootjdk
ohair
parents: 2169
diff changeset
    66
   -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput
8152d21ae245 6745361: Add -XX options to prevent stdout/stderr pollution using fastdebug/debug bootjdk
ohair
parents: 2169
diff changeset
    67
8152d21ae245 6745361: Add -XX options to prevent stdout/stderr pollution using fastdebug/debug bootjdk
ohair
parents: 2169
diff changeset
    68
# JVM options
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10115
diff changeset
    69
ifeq ($(PLATFORM), macosx)
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10115
diff changeset
    70
  JAVA_JVM_FLAGS = $(JAVA_HOTSPOT_DISABLE_PRINT_VMOPTIONS) -Djava.awt.headless=true
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10115
diff changeset
    71
else
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10115
diff changeset
    72
  JAVA_JVM_FLAGS = $(JAVA_HOTSPOT_DISABLE_PRINT_VMOPTIONS)
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10115
diff changeset
    73
endif
2399
8152d21ae245 6745361: Add -XX options to prevent stdout/stderr pollution using fastdebug/debug bootjdk
ohair
parents: 2169
diff changeset
    74
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
ifeq ($(ADD_CLIENT_VM_OPTION), true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
  JAVA_JVM_FLAGS += -client
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
ifdef USE_HOTSPOT_INTERPRETER_MODE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
  JAVA_JVM_FLAGS += -Xint
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
# Various VM flags
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
JAVA_TOOLS_FLAGS  = $(JAVA_JVM_FLAGS) $(JAVA_MEM_FLAGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
# The VM flags for javac
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
JAVAC_JVM_FLAGS =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
# 64-bit builds require a larger thread stack size.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
ifeq ($(ARCH_DATA_MODEL), 32)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
  JAVAC_JVM_FLAGS    += -J-XX:ThreadStackSize=768
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
  JAVAC_JVM_FLAGS    += -J-XX:ThreadStackSize=1536
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
JAVAC_JVM_FLAGS    += $(JAVA_TOOLS_FLAGS:%=-J%)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
# The jar -J options are special, must be added at the end of the command line
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
JAR_JFLAGS       = $(JAVA_TOOLS_FLAGS:%=-J%)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
# JAVA_TOOLS_DIR is the default location to find Java tools to run, if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
#    langtools is not available.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
#    This should be the latest promoted JDK javac.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
ifndef JAVA_TOOLS_DIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
  JAVA_TOOLS_DIR = $(JDK_IMPORT_PATH)/bin
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
# Invoking the Java compiler.   In leaf makefiles, choose as follows:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
#  -- Use JAVAC if you want to take full control of what options get
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
#     passed to javac.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
#  -- Use JAVAC_CMD if you want to take the defaults given to you.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
ifndef DEBUG_CLASSFILES
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
  ifeq ($(VARIANT), DBG)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    DEBUG_CLASSFILES = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
JAVACFLAGS =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
ifeq ($(DEBUG_CLASSFILES),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
  JAVACFLAGS += -g
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
endif
849
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 2
diff changeset
   122
ifeq ($(JAVAC_MAX_WARNINGS), true)
10115
eb08d08c7ef7 7060849: Eliminate pack200 build warnings
ksrini
parents: 10109
diff changeset
   123
  JAVAC_LINT_OPTIONS += -Xlint:all
849
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 2
diff changeset
   124
endif
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 2
diff changeset
   125
ifeq ($(JAVAC_WARNINGS_FATAL), true)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
  JAVACFLAGS  += -Werror
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
10115
eb08d08c7ef7 7060849: Eliminate pack200 build warnings
ksrini
parents: 10109
diff changeset
   129
# TODO: Workaround for CR 7063027. Remove -path eventually.
eb08d08c7ef7 7060849: Eliminate pack200 build warnings
ksrini
parents: 10109
diff changeset
   130
JAVAC_LINT_OPTIONS += -Xlint:-path
eb08d08c7ef7 7060849: Eliminate pack200 build warnings
ksrini
parents: 10109
diff changeset
   131
eb08d08c7ef7 7060849: Eliminate pack200 build warnings
ksrini
parents: 10109
diff changeset
   132
JAVACFLAGS += $(JAVAC_LINT_OPTIONS)
eb08d08c7ef7 7060849: Eliminate pack200 build warnings
ksrini
parents: 10109
diff changeset
   133
8546
ded72ac070ec 6844879: Source distribution should be more robustly built without the security source distribution
wetmore
parents: 7817
diff changeset
   134
#
ded72ac070ec 6844879: Source distribution should be more robustly built without the security source distribution
wetmore
parents: 7817
diff changeset
   135
# Some licensees do not get the Security Source bundles.  We will
ded72ac070ec 6844879: Source distribution should be more robustly built without the security source distribution
wetmore
parents: 7817
diff changeset
   136
# fall back on the prebuilt jce.jar so that we can do a best
ded72ac070ec 6844879: Source distribution should be more robustly built without the security source distribution
wetmore
parents: 7817
diff changeset
   137
# attempt at building.  If sources exist, we always want to
ded72ac070ec 6844879: Source distribution should be more robustly built without the security source distribution
wetmore
parents: 7817
diff changeset
   138
# build/use the most recent source instead of an older jce.jar, whether
ded72ac070ec 6844879: Source distribution should be more robustly built without the security source distribution
wetmore
parents: 7817
diff changeset
   139
# built implicitly/explicitly.
ded72ac070ec 6844879: Source distribution should be more robustly built without the security source distribution
wetmore
parents: 7817
diff changeset
   140
#
ded72ac070ec 6844879: Source distribution should be more robustly built without the security source distribution
wetmore
parents: 7817
diff changeset
   141
ifeq ($(wildcard $(SHARE_SRC)/classes/javax/crypto/Cipher.java),)
12684
f438283ab987 7163470: Build fails if javax.crypto src files not present
coffeys
parents: 12047
diff changeset
   142
  JCE_PATH = $(CLASSPATH_SEPARATOR)$(LIBDIR)/jce.jar
8546
ded72ac070ec 6844879: Source distribution should be more robustly built without the security source distribution
wetmore
parents: 7817
diff changeset
   143
endif
ded72ac070ec 6844879: Source distribution should be more robustly built without the security source distribution
wetmore
parents: 7817
diff changeset
   144
3329
51166c6dca11 6854244: change source/target used to compile JDK to 7
jjg
parents: 2920
diff changeset
   145
# Add the source level
14406
0c65c125ff9d 8001191: use -source 8 -target 8 when compiling the JDK
ksrini
parents: 13570
diff changeset
   146
SOURCE_LANGUAGE_VERSION = 8
2920
345857eb0f3b 6827026: Change javac source and target default to 7
jjg
parents: 2399
diff changeset
   147
LANGUAGE_VERSION = -source $(SOURCE_LANGUAGE_VERSION)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
JAVACFLAGS  += $(LANGUAGE_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
3329
51166c6dca11 6854244: change source/target used to compile JDK to 7
jjg
parents: 2920
diff changeset
   150
# Add the class version we want
14406
0c65c125ff9d 8001191: use -source 8 -target 8 when compiling the JDK
ksrini
parents: 13570
diff changeset
   151
TARGET_CLASS_VERSION = 8
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
CLASS_VERSION = -target $(TARGET_CLASS_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
JAVACFLAGS  += $(CLASS_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
JAVACFLAGS  += -encoding ascii
12684
f438283ab987 7163470: Build fails if javax.crypto src files not present
coffeys
parents: 12047
diff changeset
   155
JAVACFLAGS  += "-Xbootclasspath:$(CLASSBINDIR)$(JCE_PATH)"
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
JAVACFLAGS  += $(OTHER_JAVACFLAGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
# Needed for javah
12684
f438283ab987 7163470: Build fails if javax.crypto src files not present
coffeys
parents: 12047
diff changeset
   159
JAVAHFLAGS += -bootclasspath "$(CLASSBINDIR)$(JCE_PATH)"
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
4717
075c601c3de6 6917466: Should set bootclasspath for javadoc in jdk build
andrew
parents: 4060
diff changeset
   161
# Needed for javadoc to ensure it builds documentation
075c601c3de6 6917466: Should set bootclasspath for javadoc in jdk build
andrew
parents: 4060
diff changeset
   162
# against the newly built classes
13570
9ed2d9645e1c 7185965: Build error in javadoc make stage for bundles not containing crypto package
coffeys
parents: 12684
diff changeset
   163
JAVADOCFLAGS += -bootclasspath "$(CLASSBINDIR)$(JCE_PATH)"
4717
075c601c3de6 6917466: Should set bootclasspath for javadoc in jdk build
andrew
parents: 4060
diff changeset
   164
2169
638bb0cc0258 6810915: Sun proprietary warnings in JDK build
jjg
parents: 1247
diff changeset
   165
# Needed for JAVADOC and BOOT_JAVACFLAGS
638bb0cc0258 6810915: Sun proprietary warnings in JDK build
jjg
parents: 1247
diff changeset
   166
NO_PROPRIETARY_API_WARNINGS = -XDignore.symbol.file=true
638bb0cc0258 6810915: Sun proprietary warnings in JDK build
jjg
parents: 1247
diff changeset
   167
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
# Langtools
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
ifdef LANGTOOLS_DIST
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
  JAVAC_JAR   = $(LANGTOOLS_DIST)/bootstrap/lib/javac.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
  JAVAH_JAR   = $(LANGTOOLS_DIST)/bootstrap/lib/javah.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
  JAVADOC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javadoc.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
  DOCLETS_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/doclets.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
  JAVAC_CMD   = $(BOOT_JAVA_CMD) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
		"-Xbootclasspath/p:$(JAVAC_JAR)" \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
		-jar $(JAVAC_JAR) $(JAVACFLAGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
  JAVAH_CMD   = $(BOOT_JAVA_CMD) \
7817
0b2c3a61f004 7010537: javah no longer depends on javadoc
jjg
parents: 7668
diff changeset
   178
		"-Xbootclasspath/p:$(JAVAH_JAR)$(CLASSPATH_SEPARATOR)$(JAVAC_JAR)"  \
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
		-jar $(JAVAH_JAR) $(JAVAHFLAGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
  JAVADOC_CMD = $(BOOT_JAVA_CMD) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
		"-Xbootclasspath/p:$(JAVADOC_JAR)$(CLASSPATH_SEPARATOR)$(JAVAC_JAR)$(CLASSPATH_SEPARATOR)$(DOCLETS_JAR)" \
4717
075c601c3de6 6917466: Should set bootclasspath for javadoc in jdk build
andrew
parents: 4060
diff changeset
   182
		-jar $(JAVADOC_JAR) $(JAVADOCFLAGS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
  # If no explicit tools, use boot tools (add VM flags in this case)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
  JAVAC_CMD     = $(JAVA_TOOLS_DIR)/javac $(JAVAC_JVM_FLAGS) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
		  $(JAVACFLAGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
  JAVAH_CMD     = $(JAVA_TOOLS_DIR)/javah \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
		  $(JAVAHFLAGS)
4717
075c601c3de6 6917466: Should set bootclasspath for javadoc in jdk build
andrew
parents: 4060
diff changeset
   189
  JAVADOC_CMD   = $(JAVA_TOOLS_DIR)/javadoc $(JAVA_TOOLS_FLAGS:%=-J%) \
075c601c3de6 6917466: Should set bootclasspath for javadoc in jdk build
andrew
parents: 4060
diff changeset
   190
  		  $(JAVADOCFLAGS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
# Override of what javac to use (see deploy workspace)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
ifdef JAVAC
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
  JAVAC_CMD     = $(JAVAC)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
# The bootstrap java compiler (defined as the javac in the ALT_BOOTDIR jdk).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
#   Will be used to compile java code used to build the jdk, e.g. class files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
#   created by this compiler will NOT become part of this built jdk, but just
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
#   used to build this jdk, e.g. run with the java in the ALT_BOOTDIR jdk.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
# The javac supplied with the LANGTOOLS_DIST should be used to build the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
#   classes that will be put into the built jdk. But note that this javac
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
#   will use the ALT_BOOTDIR java runtime. Any classes created by the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
#   LANGTOOLS_DIST javac should not be run during this jdk build and indeed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
#   may not even run with the ALT_BOOTDIR jdk because they may be a newer
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
#   class file version that the ALT_BOOTDIR jdk doesn't understand.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
# The important observation here is that the built jdk is NOT run during
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
#   the build. If the built jdk needs to be verified that it can build this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
#   same jdk, then it should be supplied to the build process as the ALT_BOOTDIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
#   jdk, and this resulting built jdk should be compared to the first one.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
#   (They should be the same). Re-using this built jdk as the ALT_BOOTDIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
#   jdk will be the only way and the recommeneded way to verify the built jdk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
#   can bootstrap itself.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
# The javac options supplied to the boot javac is limited. This compiler
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
#   should only be used to build the 'make/tools' sources, which are not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
#   class files that end up in the classes directory.
10115
eb08d08c7ef7 7060849: Eliminate pack200 build warnings
ksrini
parents: 10109
diff changeset
   223
BOOT_JAVACFLAGS += $(JAVAC_LINT_OPTIONS)
849
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 2
diff changeset
   224
ifeq ($(JAVAC_WARNINGS_FATAL), true)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
  BOOT_JAVACFLAGS  += -Werror
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
endif
3638
fbd0a9baa7d4 6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk javac
andrew
parents: 3329
diff changeset
   227
10109
76e1595342e5 7061195: Clean up makefiles for JDK 8
jjg
parents: 8546
diff changeset
   228
BOOT_JAVACFLAGS  += -encoding ascii
916
867515b155b5 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 849
diff changeset
   229
BOOT_JAR_JFLAGS += $(JAR_JFLAGS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
2169
638bb0cc0258 6810915: Sun proprietary warnings in JDK build
jjg
parents: 1247
diff changeset
   231
BOOT_JAVACFLAGS  += $(NO_PROPRIETARY_API_WARNINGS)
638bb0cc0258 6810915: Sun proprietary warnings in JDK build
jjg
parents: 1247
diff changeset
   232
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
BOOT_JAVA_CMD      = $(BOOTDIR)/bin/java $(JAVA_TOOLS_FLAGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
BOOT_JAVAC_CMD     = $(BOOTDIR)/bin/javac $(JAVAC_JVM_FLAGS) $(BOOT_JAVACFLAGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
BOOT_JAR_CMD       = $(BOOTDIR)/bin/jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
BOOT_JARSIGNER_CMD = $(BOOTDIR)/bin/jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
# Various tools we need to run (FIXUP: Are these the right ones?)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
NATIVE2ASCII    = $(BOOTDIR)/bin/native2ascii $(JAVA_TOOLS_FLAGS:%=-J%)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
RMIC		= $(BOOTDIR)/bin/rmic $(JAVA_TOOLS_FLAGS:%=-J%)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
IDLJ		= $(BOOTDIR)/bin/idlj $(JAVA_TOOLS_FLAGS:%=-J%)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
# Should not be used
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
JAVA		= /should/not/be/used
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245