annotate make/CompileJavaModules.gmk @ 27397:25afb1340d37

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