CompileJavaModules.gmk revision 2808:b135df98eeb6
169783Smsmith#
2283927Sjhb# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
3223520Sjhb# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
469783Smsmith#
569783Smsmith# This code is free software; you can redistribute it and/or modify it
669783Smsmith# under the terms of the GNU General Public License version 2 only, as
769783Smsmith# published by the Free Software Foundation.  Oracle designates this
869783Smsmith# particular file as subject to the "Classpath" exception as provided
969783Smsmith# by Oracle in the LICENSE file that accompanied this code.
1069783Smsmith#
1169783Smsmith# This code is distributed in the hope that it will be useful, but WITHOUT
1269783Smsmith# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1369783Smsmith# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1469783Smsmith# version 2 for more details (a copy is included in the LICENSE file that
1569783Smsmith# accompanied this code).
1669783Smsmith#
1769783Smsmith# You should have received a copy of the GNU General Public License version
1869783Smsmith# 2 along with this work; if not, write to the Free Software Foundation,
1969783Smsmith# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2069783Smsmith#
2169783Smsmith# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2269783Smsmith# or visit www.oracle.com if you need additional information or have any
2369783Smsmith# questions.
2469783Smsmith#
2569783Smsmith
2669783Smsmith# This must be the first rule
2769783Smsmithdefault: all
28119418Sobrien
29119418Sobrieninclude $(SPEC)
30119418Sobrieninclude MakeBase.gmk
3169783Smsmithinclude Modules.gmk
32223520Sjhbinclude JavaCompilation.gmk
33223520Sjhbinclude SetupJavaCompilers.gmk
3469783Smsmith
3569783Smsmith# Hook to include the corresponding custom file, if present.
36224069Sjhb$(eval $(call IncludeCustomExtension, , CompileJavaModules.gmk))
37221393Sjhb
38280970Sjhb################################################################################
39107546Simp# Module specific build settings
40224069Sjhb
4169783Smsmithjava.activation_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
42223520Sjhb
43119285Simp################################################################################
44119285Simp
4569783Smsmithjava.base_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*' -XDstringConcat=inline
4669783Smsmithjava.base_COPY := .icu .dat .spp content-types.properties hijrah-config-islamic-umalqura.properties
47107172Sjhbjava.base_CLEAN := intrinsic.properties
48107172Sjhb
49107172Sjhbjava.base_EXCLUDE_FILES += \
50107172Sjhb  $(JDK_TOPDIR)/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java
51107172Sjhb
52119266Simpjava.base_EXCLUDES += java/lang/doc-files
53107172Sjhb
54119266Simp# Exclude BreakIterator classes that are just used in compile process to generate
55107172Sjhb# data files and shouldn't go in the product
56107172Sjhbjava.base_EXCLUDE_FILES += sun/text/resources/BreakIteratorRules.java
57107248Sjhb
58107172Sjhbifneq ($(filter solaris macosx linux windows,$(OPENJDK_TARGET_OS)), )
59107172Sjhb  java.base_EXCLUDE_FILES += \
60107172Sjhb      sun/nio/ch/AbstractPollSelectorImpl.java \
61107172Sjhb      sun/nio/ch/PollSelectorImpl.java \
62107172Sjhb      sun/nio/ch/PollSelectorProvider.java \
63107172Sjhb      #
64107172Sjhbendif
65107172Sjhb
66107172Sjhbifneq ($(OPENJDK_TARGET_OS), solaris)
67107172Sjhb  java.base_EXCLUDE_FILES += \
68107172Sjhb      SolarisLoginModule.java \
69107172Sjhb      SolarisSystem.java \
70107172Sjhb      #
71107172Sjhbendif
72107172Sjhb
73107172Sjhbifeq ($(filter $(OPENJDK_TARGET_OS), solaris macosx aix), )
74107172Sjhb  #
75107172Sjhb  # only solaris, macosx and aix
76107172Sjhb  #
77107172Sjhb  java.base_EXCLUDE_FILES += sun/nio/fs/PollingWatchService.java
78107172Sjhbendif
79107172Sjhb
80107172Sjhbifeq ($(OPENJDK_TARGET_OS), windows)
81107172Sjhb  java.base_EXCLUDE_FILES += \
82107172Sjhb      sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \
83107172Sjhb      #
84107172Sjhbendif
85107172Sjhb
86107172Sjhb################################################################################
87107172Sjhb
88107248Sjhbjava.compiler_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
89107172Sjhb
90107172Sjhb################################################################################
91107172Sjhb
92107248Sjhbjava.datatransfer_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*'
93107172Sjhbjava.datatransfer_COPY := flavormap.properties
94107172Sjhb
95107172Sjhb################################################################################
96107248Sjhb
97107172Sjhbjava.desktop_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference \
98107172Sjhb    '-Xdoclint/package:java.*,javax.*' -Xlint:exports \
99107172Sjhb    --doclint-format html4
100107248Sjhbjava.desktop_COPY := .gif .png .wav .txt .xml .css .pf
101107172Sjhbjava.desktop_CLEAN := iio-plugin.properties cursors.properties
102107172Sjhb
103107172Sjhbjava.desktop_EXCLUDES += \
104107172Sjhb    java/awt/doc-files \
105107172Sjhb    javax/swing/doc-files \
106107172Sjhb    javax/swing/text/doc-files \
107107172Sjhb    javax/swing/plaf/synth/doc-files \
108107172Sjhb    javax/swing/undo/doc-files \
109107172Sjhb    sun/awt/X11/doc-files \
110107172Sjhb    #
111107172Sjhb
112107172Sjhbjava.desktop_EXCLUDE_FILES += \
113107172Sjhb    javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \
114107172Sjhb    javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \
115215820Sjhb    javax/swing/plaf/nimbus/ScrollBarPainter.java \
116107172Sjhb    javax/swing/plaf/nimbus/SliderPainter.java \
117215820Sjhb    javax/swing/plaf/nimbus/SpinnerPainter.java \
118107172Sjhb    javax/swing/plaf/nimbus/SplitPanePainter.java \
119107172Sjhb    javax/swing/plaf/nimbus/TabbedPanePainter.java \
120107172Sjhb    sun/awt/resources/security-icon-bw16.png \
121144110Sjhb    sun/awt/resources/security-icon-bw24.png \
122144110Sjhb    sun/awt/resources/security-icon-bw32.png \
123144110Sjhb    sun/awt/resources/security-icon-bw48.png \
124144110Sjhb    sun/awt/resources/security-icon-interim16.png \
125144110Sjhb    sun/awt/resources/security-icon-interim24.png \
126107172Sjhb    sun/awt/resources/security-icon-interim32.png \
127107172Sjhb    sun/awt/resources/security-icon-interim48.png \
128107172Sjhb    sun/awt/resources/security-icon-yellow16.png \
129107172Sjhb    sun/awt/resources/security-icon-yellow24.png \
130107172Sjhb    sun/awt/resources/security-icon-yellow32.png \
131107172Sjhb    sun/awt/resources/security-icon-yellow48.png \
132107172Sjhb    sun/awt/X11/java-icon16.png \
133224069Sjhb    sun/awt/X11/java-icon24.png \
134224069Sjhb    sun/awt/X11/java-icon32.png \
135224069Sjhb    sun/awt/X11/java-icon48.png \
136224069Sjhb    .template \
137224069Sjhb    #
138224069Sjhb
139224069Sjhbifeq ($(OPENJDK_TARGET_OS), macosx)
140224069Sjhb  # exclude all X11 on Mac.
141224069Sjhb  java.desktop_EXCLUDES += \
142224069Sjhb      sun/awt/X11 \
143224069Sjhb      sun/java2d/x11 \
144224069Sjhb      sun/java2d/jules \
145224069Sjhb      sun/java2d/xr \
146224069Sjhb      com/sun/java/swing/plaf/gtk \
147224069Sjhb      #
148224069Sjhb  java.desktop_EXCLUDE_FILES += \
149224069Sjhb      $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/java2d/*.java) \
150224069Sjhb      $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/java2d/opengl/*.java) \
151224069Sjhb      $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/awt/*.java) \
152224069Sjhb      $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/font/*.java) \
153224069Sjhb      #
154224069Sjhbelse
155224069Sjhb  # TBD: figure out how to eliminate this long list
156224069Sjhb  java.desktop_EXCLUDE_FILES += \
157224069Sjhb      sun/awt/X11/ScreenFormat.java \
158224069Sjhb      sun/awt/X11/XArc.java \
159224069Sjhb      sun/awt/X11/XChar2b.java \
160224069Sjhb      sun/awt/X11/XCharStruct.java \
161224069Sjhb      sun/awt/X11/XClassHint.java \
162224069Sjhb      sun/awt/X11/XComposeStatus.java \
163224069Sjhb      sun/awt/X11/XExtCodes.java \
164224069Sjhb      sun/awt/X11/XFontProp.java \
165224069Sjhb      sun/awt/X11/XFontSetExtents.java \
166224069Sjhb      sun/awt/X11/XFontStruct.java \
167224069Sjhb      sun/awt/X11/XGCValues.java \
168224069Sjhb      sun/awt/X11/XHostAddress.java \
169224069Sjhb      sun/awt/X11/XIMCallback.java \
170224069Sjhb      sun/awt/X11/XIMHotKeyTrigger.java \
171224069Sjhb      sun/awt/X11/XIMHotKeyTriggers.java \
172224069Sjhb      sun/awt/X11/XIMPreeditCaretCallbackStruct.java \
173224069Sjhb      sun/awt/X11/XIMPreeditDrawCallbackStruct.java \
174224069Sjhb      sun/awt/X11/XIMPreeditStateNotifyCallbackStruct.java \
175224069Sjhb      sun/awt/X11/XIMStatusDrawCallbackStruct.java \
176224069Sjhb      sun/awt/X11/XIMStringConversionCallbackStruct.java \
177224069Sjhb      sun/awt/X11/XIMStringConversionText.java \
178224069Sjhb      sun/awt/X11/XIMStyles.java \
179224069Sjhb      sun/awt/X11/XIMText.java \
180224069Sjhb      sun/awt/X11/XIMValuesList.java \
181224069Sjhb      sun/awt/X11/XImage.java \
182224069Sjhb      sun/awt/X11/XKeyboardControl.java \
183224069Sjhb      sun/awt/X11/XKeyboardState.java \
184224069Sjhb      sun/awt/X11/XOMCharSetList.java \
185224069Sjhb      sun/awt/X11/XOMFontInfo.java \
186224069Sjhb      sun/awt/X11/XOMOrientation.java \
187224069Sjhb      sun/awt/X11/XPoint.java \
188224069Sjhb      sun/awt/X11/XRectangle.java \
189224069Sjhb      sun/awt/X11/XSegment.java \
190224069Sjhb      sun/awt/X11/XStandardColormap.java \
191224069Sjhb      sun/awt/X11/XTextItem.java \
192224069Sjhb      sun/awt/X11/XTextItem16.java \
193224069Sjhb      sun/awt/X11/XTextProperty.java \
194224069Sjhb      sun/awt/X11/XTimeCoord.java \
195224069Sjhb      sun/awt/X11/XWindowChanges.java \
196224069Sjhb      sun/awt/X11/XdbeSwapInfo.java \
197224069Sjhb      sun/awt/X11/XmbTextItem.java \
198224069Sjhb      sun/awt/X11/XwcTextItem.java
199224069Sjhbendif
200224069Sjhb
201224069Sjhbifeq ($(OPENJDK_TARGET_OS), windows)
202224069Sjhb  java.desktop_EXCLUDES += com/sun/java/swing/plaf/gtk
203224069Sjhbendif
204224069Sjhb
205224069Sjhbifdef BUILD_HEADLESS_ONLY
206224069Sjhb  java.desktop_EXCLUDES += sun/applet
207224069Sjhbendif
208224069Sjhb
209224069Sjhb# Used on windows and macosx
210224069Sjhbifeq ($(filter $(OPENJDK_TARGET_OS), windows macosx), )
211224069Sjhb  java.desktop_EXCLUDE_FILES += sun/awt/AWTCharset.java
212224069Sjhbendif
213224069Sjhb
214224069Sjhb# These files do not appear in the build result of the old build. This
215224069Sjhb# is because they are generated sources, but the AUTO_JAVA_FILES won't
216224069Sjhb# pick them up since they aren't generated when the source dirs are
217224069Sjhb# searched and they aren't referenced by any other classes so they won't
218224069Sjhb# be picked up by implicit compilation. On a rebuild, they are picked up
219224069Sjhb# and compiled. Exclude them here to produce the same rt.jar as the old
220224069Sjhb# build does when building just once.
221224069Sjhbjava.desktop_EXCLUDE_FILES += \
222224069Sjhb    javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \
223224069Sjhb    javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \
224224069Sjhb    javax/swing/plaf/nimbus/ScrollBarPainter.java \
225224069Sjhb    javax/swing/plaf/nimbus/SliderPainter.java \
226224069Sjhb    javax/swing/plaf/nimbus/SpinnerPainter.java \
227224069Sjhb    javax/swing/plaf/nimbus/SplitPanePainter.java \
228224069Sjhb    javax/swing/plaf/nimbus/TabbedPanePainter.java \
229224069Sjhb    #
230224069Sjhb
231224069Sjhb################################################################################
232224069Sjhb
233224069Sjhbjava.scripting_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
234224069Sjhbjava.scripting_COPY := .js
235224069Sjhbjava.scripting_CLEAN := .properties
236224069Sjhb
237224069Sjhb################################################################################
238224069Sjhb
239224069Sjhbjava.instrument_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
240224069Sjhb
241224069Sjhb################################################################################
242224069Sjhb
243224069Sjhbjava.logging_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*'
244224069Sjhb
245224069Sjhb################################################################################
246224069Sjhb
247224069Sjhbjava.management_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*'
248224069Sjhb
249224069Sjhb################################################################################
250224069Sjhb
251224069Sjhbjava.management.rmi_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:javax.*'
252224069Sjhb
253224069Sjhb################################################################################
254224069Sjhb
255224069Sjhbjava.prefs_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
256224069Sjhb
257224069Sjhb################################################################################
258224069Sjhb
259224069Sjhbjava.transaction_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
260224069Sjhb
261224069Sjhb################################################################################
262224069Sjhb
263224069Sjhbjava.sql_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
264224069Sjhbjava.sql_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
265224069Sjhb
266224069Sjhb################################################################################
267224069Sjhb
268224069Sjhbjava.sql.rowset_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
269224069Sjhbjava.sql.rowset_CLEAN_FILES := $(wildcard \
270224069Sjhb    $(JDK_TOPDIR)/src/java.sql.rowset/share/classes/com/sun/rowset/*.properties \
271224069Sjhb    $(JDK_TOPDIR)/src/java.sql.rowset/share/classes/javax/sql/rowset/*.properties)
272224069Sjhb
273224069Sjhb################################################################################
274224069Sjhb
275224069Sjhbjava.rmi_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
276224069Sjhbjava.rmi_CLEAN_FILES := $(wildcard \
277224069Sjhb    $(JDK_TOPDIR)/src/java.rmi/share/classes/sun/rmi/registry/resources/*.properties \
278224069Sjhb    $(JDK_TOPDIR)/src/java.rmi/share/classes/sun/rmi/server/resources/*.properties)
279224069Sjhb
280224069Sjhb################################################################################
281224069Sjhb
282224069Sjhbjava.corba_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
283224069Sjhb
284224069Sjhbjava.corba_COPY := .prp
285224069Sjhbjava.corba_CLEAN := .properties
286280970Sjhb
287280970Sjhbjava.corba_EXCLUDES += \
288280970Sjhb    com/sun/corba/se/PortableActivationIDL \
289280970Sjhb    com/sun/tools/corba/se/logutil \
290280970Sjhb    #
291280970Sjhbjava.corba_EXCLUDE_FILES += \
292280970Sjhb    com/sun/corba/se/impl/presentation/rmi/JNDIStateFactoryImpl.java \
293280970Sjhb    com/sun/corba/se/spi/presentation/rmi/StubWrapper.java \
294280970Sjhb    com/sun/org/omg/CORBA/IDLTypeOperations.java \
295280970Sjhb    com/sun/org/omg/CORBA/IRObjectOperations.java \
296280970Sjhb    org/omg/PortableInterceptor/UNKNOWN.java \
297280970Sjhb    com/sun/tools/corba/se/idl/ResourceBundleUtil.java \
298280970Sjhb    com/sun/corba/se/impl/presentation/rmi/jndi.properties \
299280970Sjhb    #
300280970Sjhb
301280970Sjhb################################################################################
302280970Sjhb
303280970Sjhbjava.xml_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
304280970Sjhbjava.xml_CLEAN := .properties
305280970Sjhb
306280970Sjhb################################################################################
307280970Sjhb
308280970Sjhbjava.xml.bind_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
309280970Sjhbjava.xml.bind_CLEAN := .properties
310280970Sjhb
311280970Sjhb################################################################################
312280970Sjhb
313280970Sjhbjava.xml.soap_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
314280970Sjhbjava.xml.soap_CLEAN := .properties
315280970Sjhb
316280970Sjhb################################################################################
317280970Sjhb
318280970Sjhbjava.xml.ws_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
319280970Sjhbjava.xml.ws_COPY := .xml
320280970Sjhbjava.xml.ws_CLEAN := .properties
321280970Sjhb
322280970Sjhb################################################################################
323280970Sjhb
324280970Sjhbjava.naming_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*' -Xlint:-exports
325280970Sjhbjava.naming_CLEAN := jndiprovider.properties
326280970Sjhb
327280970Sjhb################################################################################
328280970Sjhb
329280970Sjhbjava.security.saaj_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
330280970Sjhbjava.security.saaj_CLEAN := .properties
331280970Sjhb
332280970Sjhb################################################################################
333280970Sjhb
334280970Sjhbjava.security.jgss_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
335280970Sjhb
336280970Sjhb################################################################################
337280970Sjhb
338280970Sjhbjava.smartcardio_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
339280970Sjhb
340280970Sjhb################################################################################
341280970Sjhb
342280970Sjhbjava.xml.crypto_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
343280970Sjhbjava.xml.crypto_COPY := .dtd .xml
344280970Sjhbjava.xml.crypto_CLEAN := .properties
345280970Sjhb
346280970Sjhb################################################################################
347280970Sjhb
348280970Sjhbjdk.charsets_COPY := .dat
349280970Sjhb
350280970Sjhb################################################################################
351280970Sjhb
352280970Sjhb################################################################################
353280970Sjhb
354280970Sjhbjdk.compiler_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:-com.sun.tools.*,-jdk.internal.*' \
355280970Sjhb    -XDstringConcat=inline
356280970Sjhbjdk.compiler_CLEAN_FILES := $(wildcard \
357280970Sjhb    $(patsubst %, $(JDK_TOPDIR)/src/jdk.compiler/share/classes/%/*.properties, \
358280970Sjhb        sun/tools/serialver/resources))
359280970Sjhb
360280970Sjhb################################################################################
361280970Sjhb
362280970Sjhbjdk.hotspot.agent_ADD_JAVAC_FLAGS := $(DISABLE_WARNINGS),-overrides
363280970Sjhbjdk.hotspot.agent_COPY := .gif .png sa.js .properties
364280970Sjhb
365280970Sjhb################################################################################
366280970Sjhb
367280970Sjhbjdk.editpad_COPY := .properties
368280970Sjhb
369280970Sjhb################################################################################
370280970Sjhb
371280970Sjhbjdk.jshell_COPY := .jsh .properties
372280970Sjhb
373280970Sjhb################################################################################
374280970Sjhb
375280970Sjhbjdk.internal.le_COPY := .properties
376280970Sjhb
377280970Sjhb################################################################################
378280970Sjhb
379280970Sjhbjdk.jcmd_COPY := _options
380280970Sjhb
381280970Sjhb################################################################################
382280970Sjhb
383280970Sjhbjdk.dynalink_CLEAN := .properties
384224069Sjhb
385################################################################################
386
387jdk.javadoc_COPY := .xml .css .js .png
388
389################################################################################
390
391jdk.jartool_ADD_JAVAC_FLAGS := -XDstringConcat=inline
392
393################################################################################
394
395jdk.rmic_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
396jdk.rmic_CLEAN := .properties
397
398################################################################################
399
400# No SCTP implementation on Mac OS X or AIX. These classes should be excluded.
401SCTP_IMPL_CLASSES = \
402    $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/AssociationChange.java \
403    $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/AssociationImpl.java \
404    $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/PeerAddrChange.java \
405    $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/ResultContainer.java \
406    $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpChannelImpl.java \
407    $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java \
408    $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNet.java \
409    $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNotification.java \
410    $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java \
411    $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SendFailed.java \
412    $(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/Shutdown.java
413
414ifeq ($(OPENJDK_TARGET_OS), macosx)
415  jdk.sctp_EXCLUDE_FILES += $(SCTP_IMPL_CLASSES)
416endif
417
418ifeq ($(OPENJDK_TARGET_OS),aix)
419  jdk.sctp_EXCLUDE_FILES += $(SCTP_IMPL_CLASSES)
420endif
421
422################################################################################
423
424jdk.jconsole_COPY := .gif .png
425
426jdk.jconsole_CLEAN_FILES := $(wildcard \
427    $(JDK_TOPDIR)/src/jdk.jconsole/share/classes/sun/tools/jconsole/resources/*.properties)
428
429################################################################################
430
431jdk.jdeps_COPY := .txt
432
433jdk.jdeps_CLEAN_FILES := $(wildcard \
434    $(JDK_TOPDIR)/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/*.properties \
435    $(JDK_TOPDIR)/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/*.properties)
436
437################################################################################
438
439jdk.jdi_EXCLUDES += \
440    com/sun/tools/example/debug/bdi \
441    com/sun/tools/example/debug/event \
442    com/sun/tools/example/debug/gui \
443    com/sun/jdi/doc-files \
444    #
445
446jdk.jdi_EXCLUDE_FILES += jdi-overview.html
447
448################################################################################
449
450jdk.dev_CLEAN_FILES := $(wildcard \
451    $(patsubst %, $(JDK_TOPDIR)/src/jdk.dev/share/classes/%/*.properties, \
452        com/sun/tools/script/shell))
453
454jdk.dev_COPY := .js oqlhelp.html .txt
455
456################################################################################
457
458jdk.internal.jvmstat_COPY := aliasmap
459
460################################################################################
461
462# -parameters provides method's parameters information in class file,
463# JVMCI compilers make use of that information for various sanity checks.
464# Don't use Indy strings concatenation to have good JVMCI startup performance.
465# The exports are needed since JVMCI is dynamically exported (see
466# jdk.vm.ci.services.internal.ReflectionAccessJDK::openJVMCITo).
467
468jdk.internal.vm.ci_ADD_JAVAC_FLAGS := -parameters -Xlint:-exports -XDstringConcat=inline
469
470################################################################################
471
472jdk.internal.vm.compiler_ADD_JAVAC_FLAGS := -parameters -XDstringConcat=inline \
473    --add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.internal.vm.compiler \
474    --add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.internal.vm.compiler \
475    --add-exports jdk.internal.vm.ci/jdk.vm.ci.code=jdk.internal.vm.compiler \
476    --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.site=jdk.internal.vm.compiler \
477    --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.stack=jdk.internal.vm.compiler \
478    --add-exports jdk.internal.vm.ci/jdk.vm.ci.common=jdk.internal.vm.compiler \
479    --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot=jdk.internal.vm.compiler \
480    --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=jdk.internal.vm.compiler \
481    --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=jdk.internal.vm.compiler \
482    --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=jdk.internal.vm.compiler \
483    --add-exports jdk.internal.vm.ci/jdk.vm.ci.meta=jdk.internal.vm.compiler \
484    --add-exports jdk.internal.vm.ci/jdk.vm.ci.runtime=jdk.internal.vm.compiler \
485    --add-exports jdk.internal.vm.ci/jdk.vm.ci.sparc=jdk.internal.vm.compiler \
486    #
487
488jdk.internal.vm.compiler_EXCLUDES += \
489    org.graalvm.compiler.core.match.processor \
490    org.graalvm.compiler.nodeinfo.processor \
491    org.graalvm.compiler.options.processor \
492    org.graalvm.compiler.serviceprovider.processor \
493    org.graalvm.compiler.replacements.verifier \
494    org.graalvm.compiler.api.directives.test \
495    org.graalvm.compiler.api.test \
496    org.graalvm.compiler.asm.aarch64.test \
497    org.graalvm.compiler.asm.amd64.test \
498    org.graalvm.compiler.asm.sparc.test \
499    org.graalvm.compiler.asm.test \
500    org.graalvm.compiler.core.amd64.test \
501    org.graalvm.compiler.core.sparc.test \
502    org.graalvm.compiler.core.test \
503    org.graalvm.compiler.debug.test \
504    org.graalvm.compiler.graph.test \
505    org.graalvm.compiler.hotspot.amd64.test \
506    org.graalvm.compiler.hotspot.lir.test \
507    org.graalvm.compiler.hotspot.test \
508    org.graalvm.compiler.jtt \
509    org.graalvm.compiler.lir.jtt \
510    org.graalvm.compiler.lir.test \
511    org.graalvm.compiler.loop.test \
512    org.graalvm.compiler.microbenchmarks \
513    org.graalvm.compiler.nodes.test \
514    org.graalvm.compiler.options.test \
515    org.graalvm.compiler.phases.common.test \
516    org.graalvm.compiler.replacements.test \
517    org.graalvm.compiler.test \
518    org.graalvm.compiler.virtual.bench \
519    org.graalvm.micro.benchmarks \
520    org.graalvm.util.test \
521    #
522
523################################################################################
524
525# -parameters provides method's parameters information in class file,
526# JVMCI compilers make use of that information for various sanity checks.
527# Don't use Indy strings concatenation to have good JAOTC startup performance.
528# The exports are needed since JVMCI is dynamically exported (see
529# jdk.vm.ci.services.internal.ReflectionAccessJDK::openJVMCITo).
530
531jdk.aot_ADD_JAVAC_FLAGS := -parameters -XDstringConcat=inline \
532    --add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.internal.vm.compiler,jdk.aot \
533    --add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.internal.vm.compiler,jdk.aot \
534    --add-exports jdk.internal.vm.ci/jdk.vm.ci.code=jdk.internal.vm.compiler,jdk.aot \
535    --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.site=jdk.internal.vm.compiler,jdk.aot \
536    --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.stack=jdk.internal.vm.compiler,jdk.aot \
537    --add-exports jdk.internal.vm.ci/jdk.vm.ci.common=jdk.internal.vm.compiler,jdk.aot \
538    --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot=jdk.internal.vm.compiler,jdk.aot \
539    --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=jdk.internal.vm.compiler,jdk.aot \
540    --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=jdk.internal.vm.compiler,jdk.aot \
541    --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=jdk.internal.vm.compiler,jdk.aot \
542    --add-exports jdk.internal.vm.ci/jdk.vm.ci.meta=jdk.internal.vm.compiler,jdk.aot \
543    --add-exports jdk.internal.vm.ci/jdk.vm.ci.runtime=jdk.internal.vm.compiler,jdk.aot \
544    --add-exports jdk.internal.vm.ci/jdk.vm.ci.sparc=jdk.internal.vm.compiler,jdk.aot \
545    #
546
547################################################################################
548
549jdk.xml.bind_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
550jdk.xml.bind_CLEAN := .properties
551jdk.xml.bind_COPY := .xsd JAXBContextFactory.java ZeroOneBooleanAdapter.java
552
553################################################################################
554
555jdk.xml.ws_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
556jdk.xml.ws_CLEAN := .properties
557
558################################################################################
559
560sun.charsets_COPY := .dat
561
562################################################################################
563
564jdk.localedata_COPY := _dict _th
565# Exclude BreakIterator classes that are just used in compile process to generate
566# data files and shouldn't go in the product
567jdk.localedata_EXCLUDE_FILES += sun/text/resources/ext/BreakIteratorRules_th.java
568
569################################################################################
570# If this is an imported module that has prebuilt classes, only compile
571# module-info.java.
572ifneq ($(wildcard $(IMPORT_MODULES_CLASSES)/$(MODULE)), )
573  $(MODULE)_INCLUDE_FILES := module-info.java
574endif
575
576################################################################################
577# Setup the compilation for the module
578#
579MODULE_SRC_DIRS := $(call FindModuleSrcDirs, $(MODULE))
580
581# The JDK_USER_DEFINED_FILTER is a poor man's incremental build: by specifying
582# JDK_FILTER at the make command line, only a subset of the JDK java files will
583# be recompiled. If multiple paths are separated by comma, convert that into a
584# space separated list.
585JDK_USER_DEFINED_FILTER := $(strip $(subst $(COMMA),$(SPACE), $(JDK_FILTER)))
586ifeq ($(JDK_FILTER), )
587  FAIL_NO_SRC := true
588else
589  # When using JDK_FILTER, most module java compilations will end up finding
590  # no source files. Don't let that fail the build.
591  FAIL_NO_SRC := false
592endif
593
594# Get the complete module source path.
595MODULESOURCEPATH := $(call GetModuleSrcPath)
596
597# Add imported modules to the modulepath
598MODULEPATH := $(call PathList, $(IMPORT_MODULES_CLASSES))
599
600ifeq ($(MODULE), jdk.internal.vm.ci)
601  ## WORKAROUND jdk.internal.vm.ci source structure issue
602  JVMCI_MODULESOURCEPATH := $(MODULESOURCEPATH) \
603      $(subst /$(MODULE)/,/*/, $(filter-out %processor/src, \
604          $(wildcard $(HOTSPOT_TOPDIR)/src/$(MODULE)/share/classes/*/src)))
605  MODULESOURCEPATH := $(call PathList, $(JVMCI_MODULESOURCEPATH))
606endif
607
608ifeq ($(MODULE), jdk.internal.vm.compiler)
609  ## WORKAROUND jdk.internal.vm.compiler source structure issue
610  VM_COMPILER_MODULESOURCEPATH := $(MODULESOURCEPATH) \
611      $(subst /$(MODULE)/,/*/, $(filter-out %processor/src %test/src %jtt/src %bench/src %microbenchmarks/src, \
612          $(wildcard $(HOTSPOT_TOPDIR)/src/$(MODULE)/share/classes/*/src)))
613  MODULESOURCEPATH := $(call PathList, $(VM_COMPILER_MODULESOURCEPATH))
614endif
615
616ifeq ($(MODULE), jdk.aot)
617  ## WORKAROUND jdk.aot source structure issue
618  AOT_MODULESOURCEPATH := $(MODULESOURCEPATH) \
619      $(subst /$(MODULE)/,/*/, $(filter-out %processor/src, \
620          $(wildcard $(HOTSPOT_TOPDIR)/src/$(MODULE)/share/classes/*/src)))
621  MODULESOURCEPATH := $(call PathList, $(AOT_MODULESOURCEPATH))
622endif
623
624$(eval $(call SetupJavaCompilation, $(MODULE), \
625    SETUP := $(if $($(MODULE)_SETUP), $($(MODULE)_SETUP), GENERATE_JDKBYTECODE), \
626    MODULE := $(MODULE), \
627    SRC := $(wildcard $(MODULE_SRC_DIRS)), \
628    INCLUDES := $(JDK_USER_DEFINED_FILTER), \
629    FAIL_NO_SRC := $(FAIL_NO_SRC), \
630    BIN := $(if $($(MODULE)_BIN), $($(MODULE)_BIN), $(JDK_OUTPUTDIR)/modules), \
631    HEADERS := $(SUPPORT_OUTPUTDIR)/headers, \
632    ADD_JAVAC_FLAGS := \
633        $($(MODULE)_ADD_JAVAC_FLAGS) \
634        --module-source-path $(MODULESOURCEPATH) \
635        --module-path $(MODULEPATH) \
636        --system none, \
637))
638
639TARGETS += $($(MODULE)) $($(MODULE)_COPY_EXTRA)
640
641# Declare dependencies between java compilations of different modules.
642# Since the other modules are declared in different invocations of this file,
643# use the macro to find the correct target file to depend on.
644# Only the javac compilation actually depends on other modules so limit
645# dependency declaration to that by using the *_COMPILE_TARGET variable.
646$($(MODULE)_COMPILE_TARGET): $(foreach d, $(call FindDepsForModule, $(MODULE)), \
647    $(call SetupJavaCompilationCompileTarget, $d, \
648        $(if $($d_BIN), $($d_BIN), $(JDK_OUTPUTDIR)/modules/$d)))
649
650################################################################################
651# Copy zh_HK properties files from zh_TW
652
653$(JDK_OUTPUTDIR)/modules/%_zh_HK.properties: $(JDK_OUTPUTDIR)/modules/%_zh_TW.properties
654	$(install-file)
655
656CreateHkTargets = \
657    $(patsubst $(JDK_TOPDIR)/src/%, $(JDK_OUTPUTDIR)/modules/%, \
658      $(subst /share/classes,, \
659        $(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $1))))
660
661ifeq ($(MODULE), java.sql.rowset)
662  TARGETS += $(call CreateHkTargets, $(java.sql.rowset_CLEAN_FILES))
663endif
664
665ifeq ($(MODULE), java.rmi)
666  TARGETS += $(call CreateHkTargets, $(java.rmi_CLEAN_FILES))
667endif
668
669################################################################################
670# If this is an imported module, copy the pre built classes and resources into
671# the modules output dir
672
673ifneq ($(wildcard $(IMPORT_MODULES_CLASSES)/$(MODULE)), )
674  $(JDK_OUTPUTDIR)/modules/$(MODULE)/_imported.marker: \
675      $(call CacheFind, $(IMPORT_MODULES_CLASSES)/$(MODULE))
676	$(call MakeDir, $(@D))
677        # Do not delete marker and build meta data files
678	$(RM) -r $(filter-out $(@D)/_%, $(wildcard $(@D)/*))
679	$(CP) -R $(IMPORT_MODULES_CLASSES)/$(MODULE)/* $(@D)/
680	$(TOUCH) $@
681
682  TARGETS += $(JDK_OUTPUTDIR)/modules/$(MODULE)/_imported.marker
683
684  # Add this dependency to avoid a race between compiling module-info.java and
685  # importing the classes.
686  $($(MODULE)_COMPILE_TARGET): $(JDK_OUTPUTDIR)/modules/$(MODULE)/_imported.marker
687endif
688
689################################################################################
690
691$(eval $(call IncludeCustomExtension, , CompileJavaModules-post.gmk))
692
693################################################################################
694
695all: $(TARGETS)
696
697.PHONY: all
698