annotate make/CompileJavaModules.gmk @ 29671:2f05f44dfe01

8075277: JDK is still building X11 related Java files on OSX Reviewed-by: ihse, erikj, serb
author prr
date Tue, 17 Mar 2015 12:14:58 -0700
parents 9a91cf20c223
children 3449f2420896
rev   line source
chegar@25854 1 #
chegar@25854 2 # Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
chegar@25854 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
chegar@25854 4 #
chegar@25854 5 # This code is free software; you can redistribute it and/or modify it
chegar@25854 6 # under the terms of the GNU General Public License version 2 only, as
chegar@25854 7 # published by the Free Software Foundation. Oracle designates this
chegar@25854 8 # particular file as subject to the "Classpath" exception as provided
chegar@25854 9 # by Oracle in the LICENSE file that accompanied this code.
chegar@25854 10 #
chegar@25854 11 # This code is distributed in the hope that it will be useful, but WITHOUT
chegar@25854 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
chegar@25854 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
chegar@25854 14 # version 2 for more details (a copy is included in the LICENSE file that
chegar@25854 15 # accompanied this code).
chegar@25854 16 #
chegar@25854 17 # You should have received a copy of the GNU General Public License version
chegar@25854 18 # 2 along with this work; if not, write to the Free Software Foundation,
chegar@25854 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
chegar@25854 20 #
chegar@25854 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
chegar@25854 22 # or visit www.oracle.com if you need additional information or have any
chegar@25854 23 # questions.
chegar@25854 24 #
chegar@25854 25
chegar@25854 26 # This must be the first rule
chegar@25854 27 default: all
chegar@25854 28
chegar@25854 29 include $(SPEC)
chegar@25854 30 include MakeBase.gmk
erikj@26116 31 include Modules.gmk
chegar@25854 32 include JavaCompilation.gmk
erikj@26115 33 include SetupJavaCompilers.gmk
chegar@25854 34
chegar@25854 35 # Hook to include the corresponding custom file, if present.
chegar@25854 36 $(eval $(call IncludeCustomExtension, , CompileJavaModules.gmk))
chegar@25854 37
chegar@25854 38 ################################################################################
chegar@25854 39 # Module specific build settings
chegar@25854 40
chegar@25854 41 java.activation_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
chegar@25854 42
chegar@25854 43 ################################################################################
chegar@25854 44
rriggs@27240 45 java.base_COPY := .icu .dat .spp content-types.properties hijrah-config-islamic-umalqura.properties
chegar@25854 46 java.base_CLEAN := intrinsic.properties
chegar@25854 47
chegar@25854 48 java.base_EXCLUDES += java/lang/doc-files
chegar@25854 49
chegar@25854 50 # Exclude BreakIterator classes that are just used in compile process to generate
chegar@25854 51 # data files and shouldn't go in the product
chegar@25854 52 java.base_EXCLUDE_FILES += sun/text/resources/BreakIteratorRules.java
chegar@25854 53
chegar@25854 54 ifeq ($(OPENJDK_TARGET_OS), macosx)
chegar@25854 55 JAVA_BASE_UNIX_DIR := $(JDK_TOPDIR)/src/java.base/unix/classes
chegar@25854 56 # TODO: make JavaCompilation handle overrides automatically instead of excluding here
chegar@25854 57 # These files are overridden in macosx
chegar@25854 58 java.base_EXCLUDE_FILES += \
chegar@25854 59 $(JAVA_BASE_UNIX_DIR)/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java \
chegar@25854 60 $(JAVA_BASE_UNIX_DIR)/java/net/DefaultInterface.java \
chegar@25854 61 $(JAVA_BASE_UNIX_DIR)/java/lang/ClassLoaderHelper.java \
chegar@25854 62 $(JAVA_BASE_UNIX_DIR)/sun/nio/ch/DefaultSelectorProvider.java \
chegar@25854 63 #
chegar@25854 64 # This is just skipped on macosx
chegar@25854 65 java.base_EXCLUDE_FILES += $(JAVA_BASE_UNIX_DIR)/sun/nio/fs/GnomeFileTypeDetector.java
chegar@25854 66 endif
chegar@25854 67
chegar@25854 68 ifneq ($(OPENJDK_TARGET_OS), solaris)
chegar@25854 69 java.base_EXCLUDE_FILES += \
chegar@25854 70 SolarisLoginModule.java \
chegar@25854 71 SolarisSystem.java \
chegar@25854 72 #
chegar@25854 73 endif
chegar@25854 74
chegar@25854 75 ifeq ($(filter $(OPENJDK_TARGET_OS), solaris macosx aix), )
chegar@25854 76 #
chegar@25854 77 # only solaris, macosx and aix
chegar@25854 78 #
chegar@25854 79 java.base_EXCLUDE_FILES += sun/nio/fs/PollingWatchService.java
chegar@25854 80 endif
chegar@25854 81
chegar@25854 82 ifeq ($(OPENJDK_TARGET_OS), windows)
chegar@25854 83 java.base_EXCLUDE_FILES += \
chegar@25854 84 sun/nio/ch/AbstractPollSelectorImpl.java \
chegar@25854 85 sun/nio/ch/PollSelectorProvider.java \
chegar@25854 86 sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \
chegar@25854 87 #
chegar@25854 88 endif
chegar@25854 89
chegar@25854 90 ################################################################################
chegar@25854 91
serb@28903 92 java.datatransfer_COPY := flavormap.properties
serb@28903 93
serb@28903 94 ################################################################################
serb@28903 95
serb@28903 96 java.desktop_COPY := .gif .png .wav .txt .xml .css .pf
serb@29169 97 java.desktop_CLEAN := iio-plugin.properties cursors.properties
chegar@25854 98
chegar@25854 99 java.desktop_EXCLUDES += \
chegar@25854 100 java/awt/doc-files \
chegar@25854 101 javax/swing/doc-files \
chegar@25854 102 javax/swing/text/doc-files \
chegar@25854 103 javax/swing/plaf/synth/doc-files \
chegar@25854 104 javax/swing/undo/doc-files \
chegar@25854 105 sun/awt/X11/doc-files \
chegar@25854 106 #
chegar@25854 107
chegar@25854 108 # The exception handling of swing beaninfo
chegar@25854 109 # These resources violates the convention of having code and resources together under
chegar@25854 110 # $(JDK_TOPDIR)/src/.../classes directories
chegar@25854 111 $(eval $(call SetupCopyFiles,COPY_BEANINFO, \
chegar@25854 112 SRC := $(JDK_TOPDIR)/make/data/swingbeaninfo/images, \
chegar@25854 113 DEST := $(JDK_OUTPUTDIR)/modules/java.desktop/javax/swing/beaninfo/images, \
chegar@25854 114 FILES := $(wildcard $(JDK_TOPDIR)/make/data/swingbeaninfo/images/*.gif)))
chegar@25854 115
chegar@25854 116 java.desktop_COPY_EXTRA += $(COPY_BEANINFO)
chegar@25854 117
chegar@25854 118 java.desktop_EXCLUDE_FILES += \
chegar@25854 119 javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \
chegar@25854 120 javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \
chegar@25854 121 javax/swing/plaf/nimbus/ScrollBarPainter.java \
chegar@25854 122 javax/swing/plaf/nimbus/SliderPainter.java \
chegar@25854 123 javax/swing/plaf/nimbus/SpinnerPainter.java \
chegar@25854 124 javax/swing/plaf/nimbus/SplitPanePainter.java \
chegar@25854 125 javax/swing/plaf/nimbus/TabbedPanePainter.java \
chegar@25854 126 sun/awt/resources/security-icon-bw16.png \
chegar@25854 127 sun/awt/resources/security-icon-bw24.png \
chegar@25854 128 sun/awt/resources/security-icon-bw32.png \
chegar@25854 129 sun/awt/resources/security-icon-bw48.png \
chegar@25854 130 sun/awt/resources/security-icon-interim16.png \
chegar@25854 131 sun/awt/resources/security-icon-interim24.png \
chegar@25854 132 sun/awt/resources/security-icon-interim32.png \
chegar@25854 133 sun/awt/resources/security-icon-interim48.png \
chegar@25854 134 sun/awt/resources/security-icon-yellow16.png \
chegar@25854 135 sun/awt/resources/security-icon-yellow24.png \
chegar@25854 136 sun/awt/resources/security-icon-yellow32.png \
chegar@25854 137 sun/awt/resources/security-icon-yellow48.png \
chegar@25854 138 sun/awt/X11/java-icon16.png \
chegar@25854 139 sun/awt/X11/java-icon24.png \
chegar@25854 140 sun/awt/X11/java-icon32.png \
chegar@25854 141 sun/awt/X11/java-icon48.png \
chegar@25854 142 .template \
chegar@25854 143 #
chegar@25854 144
chegar@25854 145 ifeq ($(OPENJDK_TARGET_OS), macosx)
chegar@25854 146 # exclude all X11 on Mac.
prr@29671 147 java.desktop_EXCLUDES += \
prr@29671 148 sun/awt/X11 \
prr@29671 149 sun/java2d/x11 \
prr@29671 150 sun/java2d/jules \
prr@29671 151 sun/java2d/xr \
prr@29671 152 com/sun/java/swing/plaf/gtk \
prr@29671 153 #
chegar@25854 154 java.desktop_EXCLUDE_FILES += \
prr@29671 155 $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/java2d/*.java) \
prr@29671 156 $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/java2d/opengl/*.java) \
prr@29671 157 $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/awt/*.java) \
prr@29671 158 $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/awt/motif/*.java) \
prr@29671 159 $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/font/*.java) \
chegar@25854 160 #
chegar@25854 161 else
chegar@25854 162 # TBD: figure out how to eliminate this long list
chegar@25854 163 java.desktop_EXCLUDE_FILES += \
chegar@25854 164 sun/awt/X11/ScreenFormat.java \
chegar@25854 165 sun/awt/X11/XArc.java \
chegar@25854 166 sun/awt/X11/XChar2b.java \
chegar@25854 167 sun/awt/X11/XCharStruct.java \
chegar@25854 168 sun/awt/X11/XClassHint.java \
chegar@25854 169 sun/awt/X11/XComposeStatus.java \
chegar@25854 170 sun/awt/X11/XExtCodes.java \
chegar@25854 171 sun/awt/X11/XFontProp.java \
chegar@25854 172 sun/awt/X11/XFontSetExtents.java \
chegar@25854 173 sun/awt/X11/XFontStruct.java \
chegar@25854 174 sun/awt/X11/XGCValues.java \
chegar@25854 175 sun/awt/X11/XHostAddress.java \
chegar@25854 176 sun/awt/X11/XIMCallback.java \
chegar@25854 177 sun/awt/X11/XIMHotKeyTrigger.java \
chegar@25854 178 sun/awt/X11/XIMHotKeyTriggers.java \
chegar@25854 179 sun/awt/X11/XIMPreeditCaretCallbackStruct.java \
chegar@25854 180 sun/awt/X11/XIMPreeditDrawCallbackStruct.java \
chegar@25854 181 sun/awt/X11/XIMPreeditStateNotifyCallbackStruct.java \
chegar@25854 182 sun/awt/X11/XIMStatusDrawCallbackStruct.java \
chegar@25854 183 sun/awt/X11/XIMStringConversionCallbackStruct.java \
chegar@25854 184 sun/awt/X11/XIMStringConversionText.java \
chegar@25854 185 sun/awt/X11/XIMStyles.java \
chegar@25854 186 sun/awt/X11/XIMText.java \
chegar@25854 187 sun/awt/X11/XIMValuesList.java \
chegar@25854 188 sun/awt/X11/XImage.java \
chegar@25854 189 sun/awt/X11/XKeyboardControl.java \
chegar@25854 190 sun/awt/X11/XKeyboardState.java \
chegar@25854 191 sun/awt/X11/XOMCharSetList.java \
chegar@25854 192 sun/awt/X11/XOMFontInfo.java \
chegar@25854 193 sun/awt/X11/XOMOrientation.java \
chegar@25854 194 sun/awt/X11/XPoint.java \
chegar@25854 195 sun/awt/X11/XRectangle.java \
chegar@25854 196 sun/awt/X11/XSegment.java \
chegar@25854 197 sun/awt/X11/XStandardColormap.java \
chegar@25854 198 sun/awt/X11/XTextItem.java \
chegar@25854 199 sun/awt/X11/XTextItem16.java \
chegar@25854 200 sun/awt/X11/XTextProperty.java \
chegar@25854 201 sun/awt/X11/XTimeCoord.java \
chegar@25854 202 sun/awt/X11/XWindowChanges.java \
chegar@25854 203 sun/awt/X11/XdbeSwapInfo.java \
chegar@25854 204 sun/awt/X11/XmbTextItem.java \
chegar@25854 205 sun/awt/X11/XwcTextItem.java
chegar@25854 206 endif
chegar@25854 207
chegar@25854 208 ifeq ($(OPENJDK_TARGET_OS), windows)
chegar@25854 209 java.desktop_EXCLUDES += com/sun/java/swing/plaf/gtk
chegar@25854 210 endif
chegar@25854 211
chegar@25854 212 ifdef BUILD_HEADLESS_ONLY
chegar@25854 213 java.desktop_EXCLUDES += sun/applet
chegar@25854 214 endif
chegar@25854 215
chegar@25854 216 # Why is this in the open source tree?
chegar@25854 217 ifdef OPENJDK
chegar@25854 218 java.desktop_EXCLUDES += sun/dc
chegar@25854 219 endif
chegar@25854 220
chegar@25854 221 # Used on windows and macosx
chegar@25854 222 ifeq ($(filter $(OPENJDK_TARGET_OS), windows macosx), )
chegar@25854 223 java.desktop_EXCLUDE_FILES += sun/awt/AWTCharset.java
chegar@25854 224 endif
chegar@25854 225
chegar@25854 226 # These files do not appear in the build result of the old build. This
chegar@25854 227 # is because they are generated sources, but the AUTO_JAVA_FILES won't
chegar@25854 228 # pick them up since they aren't generated when the source dirs are
chegar@25854 229 # searched and they aren't referenced by any other classes so they won't
chegar@25854 230 # be picked up by implicit compilation. On a rebuild, they are picked up
chegar@25854 231 # and compiled. Exclude them here to produce the same rt.jar as the old
chegar@25854 232 # build does when building just once.
chegar@25854 233 java.desktop_EXCLUDE_FILES += \
chegar@25854 234 javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \
chegar@25854 235 javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \
chegar@25854 236 javax/swing/plaf/nimbus/ScrollBarPainter.java \
chegar@25854 237 javax/swing/plaf/nimbus/SliderPainter.java \
chegar@25854 238 javax/swing/plaf/nimbus/SpinnerPainter.java \
chegar@25854 239 javax/swing/plaf/nimbus/SplitPanePainter.java \
chegar@25854 240 javax/swing/plaf/nimbus/TabbedPanePainter.java \
chegar@25854 241 #
chegar@25854 242
chegar@25854 243 ifeq ($(OPENJDK_TARGET_OS), macosx)
chegar@25854 244 # These files are duplicated in MACOSX_SRC_DIRS
chegar@25854 245 java.desktop_EXCLUDE_FILES += \
chegar@25854 246 $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/java2d/BackBufferCapsProvider.java \
chegar@25854 247 #
chegar@25854 248 endif
chegar@25854 249
chegar@25854 250 ################################################################################
chegar@25854 251
chegar@27560 252 java.scripting_COPY := .js
chegar@27560 253 java.scripting_CLEAN := .properties
chegar@27560 254
chegar@27560 255 ################################################################################
chegar@27560 256
chegar@25854 257 java.sql_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
chegar@25854 258
chegar@25854 259 ################################################################################
chegar@25854 260
chegar@25854 261 java.sql.rowset_CLEAN_FILES := $(wildcard \
chegar@25854 262 $(JDK_TOPDIR)/src/java.sql.rowset/share/classes/com/sun/rowset/*.properties \
chegar@25854 263 $(JDK_TOPDIR)/src/java.sql.rowset/share/classes/javax/sql/rowset/*.properties)
chegar@25854 264
chegar@25854 265 ################################################################################
chegar@25854 266 # Exclude building of IIOP transport for RMI Connector
chegar@25854 267
chegar@25854 268 ifeq ($(RMICONNECTOR_IIOP), false)
chegar@25854 269 java.management_EXCLUDES += com/sun/jmx/remote/protocol/iiop
chegar@25854 270 endif
chegar@25854 271
chegar@25854 272 ################################################################################
chegar@25854 273
chegar@25854 274 java.rmi_CLEAN_FILES := $(wildcard \
chegar@25854 275 $(JDK_TOPDIR)/src/java.rmi/share/classes/sun/rmi/registry/resources/*.properties \
chegar@25854 276 $(JDK_TOPDIR)/src/java.rmi/share/classes/sun/rmi/server/resources/*.properties)
chegar@25854 277
chegar@25854 278 ################################################################################
chegar@25854 279
chegar@25854 280 java.corba_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
chegar@25854 281
chegar@25854 282 java.corba_COPY := .prp
chegar@25854 283 java.corba_CLEAN := .properties
chegar@25854 284
rriggs@27397 285 java.corba_EXCLUDES += \
chegar@25854 286 com/sun/corba/se/PortableActivationIDL \
chegar@25854 287 com/sun/tools/corba/se/logutil \
chegar@25854 288 #
rriggs@27397 289 java.corba_EXCLUDE_FILES += \
chegar@25854 290 com/sun/corba/se/impl/presentation/rmi/JNDIStateFactoryImpl.java \
chegar@25854 291 com/sun/corba/se/spi/presentation/rmi/StubWrapper.java \
chegar@25854 292 com/sun/org/omg/CORBA/IDLTypeOperations.java \
chegar@25854 293 com/sun/org/omg/CORBA/IRObjectOperations.java \
chegar@25854 294 org/omg/PortableInterceptor/UNKNOWN.java \
chegar@25854 295 com/sun/tools/corba/se/idl/ResourceBundleUtil.java \
chegar@25854 296 com/sun/corba/se/impl/presentation/rmi/jndi.properties \
chegar@25854 297 #
chegar@25854 298
chegar@25854 299 ################################################################################
chegar@25854 300
chegar@25854 301 java.xml_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
chegar@25854 302 java.xml_CLEAN := .properties
chegar@25854 303
chegar@25854 304 ################################################################################
chegar@25854 305
chegar@25854 306 java.xml.bind_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
chegar@25854 307 java.xml.bind_CLEAN := .properties
chegar@25854 308
chegar@25854 309 ################################################################################
chegar@25854 310
chegar@25854 311 java.xml.soap_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
chegar@25854 312 java.xml.soap_CLEAN := .properties
chegar@25854 313
chegar@25854 314 ################################################################################
chegar@25854 315
chegar@25854 316 java.xml.ws_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
chegar@25854 317 java.xml.ws_COPY := .xml
chegar@25854 318 java.xml.ws_CLEAN := .properties
chegar@25854 319
chegar@25854 320 ################################################################################
chegar@25854 321
chegar@25854 322 java.naming_CLEAN := jndiprovider.properties
chegar@25854 323
chegar@25854 324 ################################################################################
chegar@25854 325
chegar@25854 326 java.security.saaj_CLEAN := .properties
chegar@25854 327
chegar@25854 328 ################################################################################
chegar@25854 329
chegar@25854 330 java.xml.crypto_COPY := .dtd .xml
chegar@25854 331 java.xml.crypto_CLEAN := .properties
chegar@25854 332
chegar@25854 333 ################################################################################
chegar@25854 334
chegar@25854 335 jdk.charsets_COPY := .dat
chegar@25854 336
chegar@25854 337 ################################################################################
chegar@25854 338
chegar@25854 339 jdk.compiler_COPY := javax.tools.JavaCompilerTool
chegar@27560 340 jdk.compiler_CLEAN_FILES := $(wildcard \
chegar@27560 341 $(patsubst %, $(JDK_TOPDIR)/src/jdk.compiler/share/classes/%/*.properties, \
chegar@27560 342 sun/tools/serialver/resources))
chegar@25854 343
chegar@25854 344 ################################################################################
chegar@25854 345
ihse@27595 346 jdk.jcmd_COPY := _options
chegar@25854 347
chegar@25854 348 ################################################################################
chegar@25854 349
chegar@25854 350 jdk.javadoc_COPY := .xml .css .js
chegar@25854 351
chegar@25854 352 ################################################################################
chegar@25854 353
chegar@25854 354 jdk.rmic_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
chegar@25854 355 jdk.rmic_CLEAN := .properties
chegar@25854 356
chegar@25854 357 ################################################################################
chegar@25854 358
chegar@25854 359 # No SCTP implementation on Mac OS X or AIX. These classes should be excluded.
chegar@25854 360 SCTP_IMPL_CLASSES = \
chegar@25854 361 $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/AssociationChange.java \
chegar@25854 362 $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/AssociationImpl.java \
chegar@25854 363 $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/PeerAddrChange.java \
chegar@25854 364 $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/ResultContainer.java \
chegar@25854 365 $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpChannelImpl.java \
chegar@25854 366 $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java \
chegar@25854 367 $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNet.java \
chegar@25854 368 $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNotification.java \
chegar@25854 369 $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java \
chegar@25854 370 $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SendFailed.java \
chegar@25854 371 $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/Shutdown.java
chegar@25854 372
chegar@25854 373 ifeq ($(OPENJDK_TARGET_OS), macosx)
rriggs@27397 374 jdk.sctp_EXCLUDE_FILES += $(SCTP_IMPL_CLASSES)
chegar@25854 375 endif
chegar@25854 376
chegar@25854 377 ifeq ($(OPENJDK_TARGET_OS),aix)
chegar@25854 378 # These files are duplicated in AIX_SRC_DIRS
rriggs@27397 379 jdk.sctp_EXCLUDE_FILES += $(SCTP_IMPL_CLASSES)
chegar@25854 380 endif
chegar@25854 381
chegar@25854 382 ################################################################################
chegar@25854 383
chegar@25854 384 jdk.jconsole_COPY := .gif .png
chegar@25854 385
chegar@25854 386 jdk.jconsole_CLEAN_FILES := $(wildcard \
chegar@25854 387 $(JDK_TOPDIR)/src/jdk.jconsole/share/classes/sun/tools/jconsole/resources/*.properties)
chegar@25854 388
chegar@25854 389 ################################################################################
chegar@25854 390
rriggs@27397 391 jdk.jdi_EXCLUDES += \
chegar@25854 392 com/sun/tools/example/debug/bdi \
chegar@25854 393 com/sun/tools/example/debug/event \
chegar@25854 394 com/sun/tools/example/debug/gui \
chegar@25854 395 com/sun/jdi/doc-files \
chegar@25854 396 #
chegar@25854 397
chegar@25854 398 jdk.jdi_EXCLUDE_FILES += jdi-overview.html
chegar@25854 399
chegar@25854 400 ################################################################################
chegar@25854 401
chegar@25854 402 jdk.dev_CLEAN_FILES := $(wildcard \
chegar@25854 403 $(patsubst %, $(JDK_TOPDIR)/src/jdk.dev/share/classes/%/*.properties, \
chegar@25854 404 com/sun/tools/script/shell))
chegar@25854 405
chegar@25854 406 jdk.dev_COPY := .js oqlhelp.html .txt
chegar@25854 407
chegar@25854 408 ################################################################################
chegar@25854 409
chegar@25854 410 jdk.jvmstat_COPY := aliasmap
chegar@25854 411
chegar@25854 412 ################################################################################
chegar@25854 413
chegar@25854 414 jdk.xml.bind_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
chegar@25854 415 jdk.xml.bind_CLEAN := .properties
chegar@25854 416 jdk.xml.bind_COPY := .xsd JAXBContextFactory.java ZeroOneBooleanAdapter.java
chegar@25854 417
chegar@25854 418 ################################################################################
chegar@25854 419
chegar@25854 420 jdk.xml.ws_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
chegar@25854 421 jdk.xml.ws_CLEAN := .properties
chegar@25854 422
chegar@25854 423 ################################################################################
chegar@25854 424
chegar@25854 425 sun.charsets_COPY := .dat
chegar@25854 426
chegar@25854 427 ################################################################################
chegar@25854 428
chegar@25854 429 jdk.localedata_COPY := _dict _th
chegar@25854 430 # Exclude BreakIterator classes that are just used in compile process to generate
chegar@25854 431 # data files and shouldn't go in the product
rriggs@27397 432 jdk.localedata_EXCLUDE_FILES += sun/text/resources/th/BreakIteratorRules_th.java
chegar@25854 433
chegar@25854 434 ################################################################################
chegar@25854 435 # Setup the compilation of each module
chegar@25854 436 #
chegar@25854 437 # Do not include nashorn src here since it needs to be compiled separately due
chegar@25854 438 # to nasgen.
chegar@25854 439 #
chegar@25854 440 # Order src dirs in order of override with the most important first. Generated
chegar@25854 441 # source before static source and platform specific source before shared.
chegar@25854 442 #
chegar@25854 443 # To use this variable, use $(call ALL_SRC_DIRS,module) with no space.
chegar@25854 444 GENERATED_SRC_DIRS += \
chegar@27560 445 $(SUPPORT_OUTPUTDIR)/gensrc/$1 \
chegar@27560 446 $(SUPPORT_OUTPUTDIR)/gensrc_no_docs/$1 \
chegar@25854 447 #
chegar@25854 448
chegar@25854 449 OS_SRC_DIRS += $(JDK_TOPDIR)/src/$1/$(OPENJDK_TARGET_OS)/classes
ihse@27586 450 ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_TYPE))
ihse@27586 451 OS_TYPE_SRC_DIRS += $(JDK_TOPDIR)/src/$1/$(OPENJDK_TARGET_OS_TYPE)/classes
chegar@25854 452 endif
chegar@25854 453
chegar@25854 454 SHARE_SRC_DIRS += \
chegar@25854 455 $(JDK_TOPDIR)/src/$1/share/classes \
chegar@25854 456 $(LANGTOOLS_TOPDIR)/src/$1/share/classes \
chegar@25854 457 $(CORBA_TOPDIR)/src/$1/share/classes \
chegar@25854 458 $(JAXP_TOPDIR)/src/$1/share/classes \
chegar@25854 459 $(JAXWS_TOPDIR)/src/$1/share/classes \
chegar@25854 460 #
chegar@25854 461
chegar@25854 462 ALL_SRC_DIRS = \
chegar@25854 463 $(GENERATED_SRC_DIRS) \
chegar@25854 464 $(OS_SRC_DIRS) \
ihse@27586 465 $(OS_TYPE_SRC_DIRS) \
chegar@25854 466 $(SHARE_SRC_DIRS) \
chegar@25854 467 #
chegar@25854 468
chegar@25854 469 # Find all modules with java sources. Filter out nashorn since it needs to be
chegar@25854 470 # compiled separately.
chegar@25854 471 ALL_JAVA_MODULES := $(filter-out jdk.scripting.nashorn, $(call FindJavaModules))
chegar@25854 472 JAVA_MODULES := $(ALL_JAVA_MODULES)
chegar@25854 473
chegar@25854 474 # The JDK_USER_DEFINED_FILTER is a poor man's incremental build: by specifying
chegar@25854 475 # JDK_FILTER at the make command line, only a subset of the JDK java files will
chegar@25854 476 # be recompiled. If multiple paths are separated by comma, convert that into a
chegar@25854 477 # space separated list.
chegar@25854 478 JDK_USER_DEFINED_FILTER := $(strip $(subst $(COMMA),$(SPACE), $(JDK_FILTER)))
chegar@25854 479
chegar@25854 480 # This macro sets up compilation of a module and declares dependencies for it.
chegar@25854 481 # Param 1 - module name
chegar@25854 482 define SetupModuleCompilation
chegar@25854 483 # Find the module dependencies by parsing modules.list file
chegar@25854 484 $1_DEPS := $$(call FindDepsForModule, $1)
chegar@25854 485
chegar@25854 486 $1_CLASSPATH := $$(addprefix $(JDK_OUTPUTDIR)/modules/,$$($1_DEPS))
ihse@27595 487 # When crypto classes are prebuilt, need to look for classes already in
erikj@27135 488 # output dir.
erikj@27135 489 ifneq ($(BUILD_CRYPTO), true)
erikj@27135 490 $1_CLASSPATH += $(JDK_OUTPUTDIR)/modules/$1
erikj@27135 491 endif
chegar@25854 492 ifeq ($1, jdk.hotspot.agent)
chegar@25854 493 ## The source of this module is compiled elsewhere, hotspot, and imported.
chegar@25854 494 ## Service types are required in the classpath when compiing module-info
chegar@25854 495 $1_CLASSPATH := $$($1_CLASSPATH) $$(addprefix $(JDK_OUTPUTDIR)/modules/,jdk.hotspot.agent)
chegar@25854 496 endif
chegar@25854 497 $1_CLASSPATH := $$(subst $$(SPACE),$$(PATH_SEP),$$($1_CLASSPATH))
chegar@25854 498 $1_JAVAC_FLAGS := -bootclasspath "$$($1_CLASSPATH)"
chegar@25854 499
chegar@25854 500 $$(eval $$(call SetupJavaCompilation,$1, \
chegar@25854 501 SETUP := $$(if $$($1_SETUP), $$($1_SETUP), GENERATE_JDKBYTECODE), \
chegar@25854 502 SRC := $$(wildcard $$(call ALL_SRC_DIRS,$1)), \
chegar@25854 503 INCLUDES:=$(JDK_USER_DEFINED_FILTER),\
chegar@25854 504 BIN := $(JDK_OUTPUTDIR)/modules/$1, \
chegar@27560 505 HEADERS := $(SUPPORT_OUTPUTDIR)/headers/$1, \
chegar@25854 506 ADD_JAVAC_FLAGS := $$($1_JAVAC_FLAGS)))
chegar@25854 507
chegar@25854 508 $1: $$($1) $$($1_COPY_EXTRA)
chegar@25854 509
chegar@25854 510 # Declare dependencies between java compilation of different modules.
chegar@25854 511 # Since not all modules have been declared yet, or might be declared
ihse@27595 512 # in different invocations of this file, use the macro to find the
chegar@25854 513 # correct target file to depend on.
chegar@25854 514 # Only the javac compilation actually depends on other modules so limit
chegar@25854 515 # dependency declaration to that by using the *_COMPILE_TARGET variable.
chegar@25854 516 $$($1_COMPILE_TARGETS): $$(foreach d,$$($1_DEPS), \
chegar@25854 517 $$(call SetupJavaCompilationCompileTarget, $$d, $(JDK_OUTPUTDIR)/modules/$$d))
chegar@25854 518 endef
chegar@25854 519
chegar@25854 520 # Setup compilation for each module
chegar@25854 521 $(foreach m,$(JAVA_MODULES),$(eval $(call SetupModuleCompilation,$m)))
chegar@25854 522
chegar@25854 523 ################################################################################
chegar@25854 524 # Copy zh_HK properties files from zh_TW
chegar@25854 525
chegar@25854 526 $(JDK_OUTPUTDIR)/modules/%_zh_HK.properties: $(JDK_OUTPUTDIR)/modules/%_zh_TW.properties
chegar@25854 527 $(install-file)
chegar@25854 528
chegar@25854 529 define CreateHkTargets
chegar@25854 530 $(patsubst $(JDK_TOPDIR)/src/%, $(JDK_OUTPUTDIR)/modules/%, \
chegar@25854 531 $(subst /share/classes,, \
chegar@25854 532 $(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $1))))
chegar@25854 533 endef
chegar@25854 534
chegar@25854 535 java.sql.rowset: $(call CreateHkTargets, $(java.sql.rowset_CLEAN_FILES))
chegar@25854 536 java.rmi: $(call CreateHkTargets, $(java.rmi_CLEAN_FILES))
chegar@25854 537
chegar@25854 538 all: $(JAVA_MODULES)
chegar@25854 539
chegar@25854 540 .PHONY: all $(JAVA_MODULES)