annotate make/CompileJavaModules.gmk @ 25854:98ce0879ab4c

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