ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
| 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 4 | # |
| 5 | # This code is free software; you can redistribute it and/or modify it |
| 6 | # under the terms of the GNU General Public License version 2 only, as |
| 7 | # published by the Free Software Foundation. Oracle designates this |
| 8 | # particular file as subject to the "Classpath" exception as provided |
| 9 | # by Oracle in the LICENSE file that accompanied this code. |
| 10 | # |
| 11 | # This code is distributed in the hope that it will be useful, but WITHOUT |
| 12 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 13 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 14 | # version 2 for more details (a copy is included in the LICENSE file that |
| 15 | # accompanied this code). |
| 16 | # |
| 17 | # You should have received a copy of the GNU General Public License version |
| 18 | # 2 along with this work; if not, write to the Free Software Foundation, |
| 19 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 | # |
| 21 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
| 22 | # or visit www.oracle.com if you need additional information or have any |
| 23 | # questions. |
| 24 | # |
| 25 | |
| 26 | default: all |
| 27 | |
| 28 | include $(SPEC) |
| 29 | include MakeBase.gmk |
| 30 | include JavaCompilation.gmk |
| 31 | |
| 32 | # Setup the java compilers for the JDK build. |
| 33 | include Setup.gmk |
| 34 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 35 | JARS := |
| 36 | EXFILES := |
| 37 | EXCLUDES := |
| 38 | |
| 39 | ########################################################################################## |
| 40 | |
| 41 | EXCLUDES += com/sun/pept \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 42 | com/sun/tools/example/trace\ |
| 43 | com/sun/tools/example/debug/bdi\ |
| 44 | com/sun/tools/example/debug/event\ |
erikj | 2762cda | 2013-01-02 15:35:12 +0100 | [diff] [blame] | 45 | com/sun/tools/example/debug/gui |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 46 | |
| 47 | ifdef OPENJDK |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 48 | EXCLUDES+= sun/dc \ |
| 49 | com/sun/jmx/snmp \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 50 | sun/management/snmp \ |
| 51 | com/sun/script |
| 52 | endif |
| 53 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 54 | ifndef OPENJDK |
| 55 | # There exists two versions of this file... |
| 56 | EXFILES := $(JDK_TOPDIR)/src/share/classes/javax/crypto/JarVerifier.java |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 57 | |
| 58 | ifeq ($(OPENJDK_TARGET_OS),windows) |
| 59 | # This gets built on unix platforms implicitly in the old build even though |
| 60 | # it's excluded in the closed build. |
| 61 | EXCLUDES+=sun/java2d/pisces |
| 62 | endif |
| 63 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 64 | endif |
| 65 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 66 | ifneq ($(OPENJDK_TARGET_OS),solaris) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 67 | # Exclude Solaris nio and two security related files in src/share/classes |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 68 | EXFILES += SolarisAclFileAttributeView.java \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 69 | SolarisFileStore.java \ |
| 70 | SolarisFileSystem.java \ |
| 71 | SolarisFileSystemProvider.java \ |
| 72 | SolarisNativeDispatcher.java \ |
| 73 | SolarisUserDefinedFileAttributeView.java \ |
| 74 | SolarisWatchService.java \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 75 | SolarisAclFileAttributeView.java \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 76 | SolarisLoginModule.java \ |
| 77 | SolarisSystem.java \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 78 | sun/nio/ch/DevPollArrayWrapper.java \ |
| 79 | sun/nio/ch/DevPollSelectorImpl.java \ |
| 80 | sun/nio/ch/DevPollSelectorProvider.java \ |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 81 | sun/nio/ch/EventPortSelectorImpl.java \ |
| 82 | sun/nio/ch/EventPortSelectorProvider.java \ |
| 83 | sun/nio/ch/EventPortWrapper.java \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 84 | sun/nio/ch/SolarisAsynchronousChannelProvider.java \ |
| 85 | sun/nio/ch/SolarisEventPort.java \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 86 | sun/tools/attach/SolarisAttachProvider.java \ |
| 87 | sun/tools/attach/SolarisVirtualMachine.java |
erikj | 2762cda | 2013-01-02 15:35:12 +0100 | [diff] [blame] | 88 | |
| 89 | EXCLUDES += com/oracle/security |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 90 | endif |
| 91 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 92 | # In the old build, this isn't excluded on macosx, even though it probably |
| 93 | # should be. |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 94 | ifneq ($(OPENJDK_TARGET_OS),macosx) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 95 | EXFILES+=WrapperGenerator.java |
| 96 | endif |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 97 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 98 | ifneq ($(OPENJDK_TARGET_OS),windows) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 99 | # Exclude Window security related files in src/share/classes |
| 100 | EXFILES+=NTLoginModule.java \ |
| 101 | NTSystem.java |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 102 | else |
| 103 | EXFILES+=UnixLoginModule.java \ |
| 104 | UnixSystem.java |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 105 | endif |
| 106 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 107 | ifeq ($(OPENJDK_TARGET_OS),windows) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 108 | # Don't build GTK L&F on Windows |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 109 | EXCLUDES+=com/sun/java/swing/plaf/gtk |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 110 | endif |
| 111 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 112 | ifneq ($(OPENJDK_TARGET_OS),linux) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 113 | EXFILES+=sun/tools/attach/LinuxAttachProvider.java \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 114 | sun/tools/attach/LinuxVirtualMachine.java \ |
| 115 | sun/nio/ch/EPoll.java \ |
| 116 | sun/nio/ch/EPollArrayWrapper.java \ |
| 117 | sun/nio/ch/EPollPort.java \ |
| 118 | sun/nio/ch/EPollSelectorImpl.java \ |
| 119 | sun/nio/ch/EPollSelectorProvider.java \ |
| 120 | sun/nio/ch/LinuxAsynchronousChannelProvider.java \ |
| 121 | sun/nio/fs/LinuxDosFileAttributeView.java \ |
| 122 | sun/nio/fs/LinuxFileStore.java \ |
| 123 | sun/nio/fs/LinuxFileSystem.java \ |
| 124 | sun/nio/fs/LinuxFileSystemProvider.java \ |
dxu | 20cb370 | 2012-12-04 14:07:30 +0000 | [diff] [blame] | 125 | sun/nio/fs/MagicFileTypeDetector.java \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 126 | sun/nio/fs/LinuxNativeDispatcher.java \ |
| 127 | sun/nio/fs/LinuxUserDefinedFileAttributeView.java \ |
| 128 | sun/nio/fs/LinuxWatchService.java |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 129 | endif |
| 130 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 131 | ifneq ($(OPENJDK_TARGET_OS),macosx) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 132 | EXFILES+=sun/nio/ch/BsdAsynchronousChannelProvider.java \ |
| 133 | sun/nio/ch/KQueue.java \ |
| 134 | sun/nio/ch/KQueuePort.java \ |
| 135 | sun/nio/fs/BsdFileStore.java \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 136 | sun/nio/fs/BsdFileSystem.java \ |
| 137 | sun/nio/fs/BsdFileSystemProvider.java \ |
| 138 | sun/nio/fs/BsdNativeDispatcher.java \ |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 139 | sun/nio/fs/MacOSXFileSystemProvider.java \ |
| 140 | sun/nio/fs/MacOSXFileSystem.java \ |
| 141 | sun/nio/fs/MacOSXNativeDispatcher.java \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 142 | sun/tools/attach/BsdAttachProvider.java \ |
| 143 | sun/tools/attach/BsdVirtualMachine.java |
| 144 | endif |
| 145 | |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 146 | # Exclude BreakIterator classes that are just used in compile process to generate |
| 147 | # data files and shouldn't go in the product |
| 148 | EXFILES+=sun/text/resources/BreakIteratorRules.java \ |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 149 | sun/text/resources/BreakIteratorRules_th.java |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 150 | |
| 151 | # TODO: Add BUILD_HEADLESS_ONLY to configure? |
| 152 | ifdef BUILD_HEADLESS_ONLY |
| 153 | EXCLUDES+=sun/applet |
| 154 | endif |
| 155 | |
| 156 | ifdef OPENJDK |
| 157 | EXCLUDES+=sun/java2d/cmm/kcms |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 158 | endif |
| 159 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 160 | # Used on windows and macosx |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 161 | ifeq (,$(filter $(OPENJDK_TARGET_OS), windows macosx)) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 162 | EXFILES+=sun/awt/AWTCharset.java |
| 163 | endif |
| 164 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 165 | ifneq ($(OPENJDK_TARGET_OS), macosx) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 166 | EXFILES+=sun/awt/X11/ScreenFormat.java \ |
| 167 | sun/awt/X11/XArc.java \ |
| 168 | sun/awt/X11/XChar2b.java \ |
| 169 | sun/awt/X11/XCharStruct.java \ |
| 170 | sun/awt/X11/XClassHint.java \ |
| 171 | sun/awt/X11/XComposeStatus.java \ |
| 172 | sun/awt/X11/XExtCodes.java \ |
| 173 | sun/awt/X11/XFontProp.java \ |
| 174 | sun/awt/X11/XFontSetExtents.java \ |
| 175 | sun/awt/X11/XFontStruct.java \ |
| 176 | sun/awt/X11/XGCValues.java \ |
| 177 | sun/awt/X11/XHostAddress.java \ |
| 178 | sun/awt/X11/XIMCallback.java \ |
| 179 | sun/awt/X11/XIMHotKeyTrigger.java \ |
| 180 | sun/awt/X11/XIMHotKeyTriggers.java \ |
| 181 | sun/awt/X11/XIMPreeditCaretCallbackStruct.java \ |
| 182 | sun/awt/X11/XIMPreeditDrawCallbackStruct.java \ |
| 183 | sun/awt/X11/XIMPreeditStateNotifyCallbackStruct.java \ |
| 184 | sun/awt/X11/XIMStatusDrawCallbackStruct.java \ |
| 185 | sun/awt/X11/XIMStringConversionCallbackStruct.java \ |
| 186 | sun/awt/X11/XIMStringConversionText.java \ |
| 187 | sun/awt/X11/XIMStyles.java \ |
| 188 | sun/awt/X11/XIMText.java \ |
| 189 | sun/awt/X11/XIMValuesList.java \ |
| 190 | sun/awt/X11/XImage.java \ |
| 191 | sun/awt/X11/XKeyboardControl.java \ |
| 192 | sun/awt/X11/XKeyboardState.java \ |
| 193 | sun/awt/X11/XOMCharSetList.java \ |
| 194 | sun/awt/X11/XOMFontInfo.java \ |
| 195 | sun/awt/X11/XOMOrientation.java \ |
| 196 | sun/awt/X11/XPoint.java \ |
| 197 | sun/awt/X11/XRectangle.java \ |
| 198 | sun/awt/X11/XSegment.java \ |
| 199 | sun/awt/X11/XStandardColormap.java \ |
| 200 | sun/awt/X11/XTextItem.java \ |
| 201 | sun/awt/X11/XTextItem16.java \ |
| 202 | sun/awt/X11/XTextProperty.java \ |
| 203 | sun/awt/X11/XTimeCoord.java \ |
| 204 | sun/awt/X11/XWindowChanges.java \ |
| 205 | sun/awt/X11/XdbeSwapInfo.java \ |
| 206 | sun/awt/X11/XmbTextItem.java \ |
| 207 | sun/awt/X11/XwcTextItem.java |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 208 | endif |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 209 | |
| 210 | # Exclude another implicitly not included file. |
| 211 | EXFILES+=sun/util/locale/AsciiUtil.java |
| 212 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 213 | ifeq (,$(filter $(OPENJDK_TARGET_OS), solaris macosx)) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 214 | # |
| 215 | # only solaris and macosx |
| 216 | # |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 217 | EXFILES+=sun/nio/fs/PollingWatchService.java |
| 218 | endif |
| 219 | |
| 220 | # TODO: Fix when converting NIO |
| 221 | # Exclude *-linux-arm.java and *-linux-ppc.java from closed. |
| 222 | EXFILES+=-linux-arm.java \ |
| 223 | -linux-ppc.java |
| 224 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 225 | ifeq ($(OPENJDK_TARGET_OS), windows) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 226 | EXFILES+=sun/nio/ch/AbstractPollSelectorImpl.java \ |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 227 | sun/nio/ch/PollSelectorProvider.java \ |
erikj | 388fbde | 2012-12-06 12:09:33 +0100 | [diff] [blame] | 228 | sun/nio/ch/SimpleAsynchronousFileChannelImpl.java |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 229 | endif |
| 230 | |
erikj | f08e4b1 | 2013-01-04 16:54:41 +0100 | [diff] [blame^] | 231 | # These files do not appear in the build result of the old build. This |
| 232 | # is because they are generated sources, but the AUTO_JAVA_FILES won't |
| 233 | # pick them up since they aren't generated when the source dirs are |
| 234 | # searched and they aren't referenced by any other classes so they won't |
| 235 | # be picked up by implicit compilation. On a rebuild, they are picked up |
| 236 | # and compiled. Exclude them here to produce the same rt.jar as the old |
| 237 | # build does when building just once. |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 238 | EXFILES+=javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \ |
erikj | f08e4b1 | 2013-01-04 16:54:41 +0100 | [diff] [blame^] | 239 | javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \ |
| 240 | javax/swing/plaf/nimbus/ScrollBarPainter.java \ |
| 241 | javax/swing/plaf/nimbus/SliderPainter.java \ |
| 242 | javax/swing/plaf/nimbus/SpinnerPainter.java \ |
| 243 | javax/swing/plaf/nimbus/SplitPanePainter.java \ |
| 244 | javax/swing/plaf/nimbus/TabbedPanePainter.java |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 245 | |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 246 | # Acquire a list of files that should be copied straight over to the classes. |
| 247 | include CopyIntoClasses.gmk |
| 248 | # Now we have COPY_PATTERNS, COPY_FILES and COPY_EXTRA |
| 249 | |
| 250 | ifndef OPENJDK |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 251 | CLOSED_SRC_DIRS:=$(JDK_TOPDIR)/src/closed/share/classes |
| 252 | ifneq ($(OPENJDK_TARGET_OS_API_DIR),windows) |
| 253 | CLOSED_SRC_DIRS += $(JDK_TOPDIR)/src/closed/$(OPENJDK_TARGET_OS_API_DIR)/classes |
| 254 | endif |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 255 | endif |
| 256 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 257 | MACOSX_SRC_DIRS := |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 258 | ifeq ($(OPENJDK_TARGET_OS),macosx) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 259 | MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/classes |
| 260 | |
| 261 | # this files are duplicated in MACOSX_SRC_DIRS |
| 262 | EXFILES+= $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java \ |
| 263 | $(JDK_TOPDIR)/src/solaris/classes/sun/java2d/BackBufferCapsProvider.java \ |
| 264 | $(JDK_TOPDIR)/src/solaris/classes/java/net/DefaultInterface.java \ |
naoto | 09a6dec | 2012-08-24 10:13:58 -0700 | [diff] [blame] | 265 | $(JDK_TOPDIR)/src/solaris/classes/java/lang/ClassLoaderHelper.java \ |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 266 | $(JDK_TOPDIR)/src/solaris/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java \ |
| 267 | $(JDK_TOPDIR)/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 268 | |
| 269 | # JObjC.jar contains 1.5 byte-code...so skip it here :-( |
| 270 | # MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/jobjc/src |
| 271 | # EXCLUDES+= tests/java/com/apple/jobjc |
| 272 | |
| 273 | EXCLUDES+= com/apple/jobjc |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 274 | endif |
| 275 | |
| 276 | # The exception handling of swing beaninfo |
| 277 | # These resources violates the convention of having code and resources together under |
| 278 | # $(JDK_TOPDIR)/src/.../classes directories |
| 279 | $(JDK_OUTPUTDIR)/classes/javax/swing/beaninfo/images/%.gif: $(JDK_TOPDIR)/make/tools/swing-beans/beaninfo/images/%.gif |
| 280 | $(MKDIR) -p $(@D) |
| 281 | $(CP) $< $@ |
| 282 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 283 | # The JDK_USER_DEFINED_FILTER is a poor man's incremental build: by specifying |
| 284 | # JDK_FILTER at the make command line, only a subset of the JDK java files will |
| 285 | # be recompiled. If multiple paths are separated by comma, convert that into a |
| 286 | # space separated list. |
| 287 | JDK_USER_DEFINED_FILTER:=$(strip $(subst $(COMMA),$(SPACE),$(JDK_FILTER))) |
| 288 | |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 289 | $(eval $(call SetupJavaCompilation,BUILD_JDK,\ |
| 290 | SETUP:=GENERATE_JDKBYTECODE,\ |
| 291 | SRC:=$(JDK_TOPDIR)/src/share/classes \ |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 292 | $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes \ |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 293 | $(MACOSX_SRC_DIRS) \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 294 | $(JDK_OUTPUTDIR)/gensrc \ |
| 295 | $(CLOSED_SRC_DIRS),\ |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 296 | INCLUDES:=$(JDK_USER_DEFINED_FILTER),\ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 297 | EXCLUDES:=$(EXCLUDES),\ |
| 298 | EXCLUDE_FILES:=$(EXFILES),\ |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 299 | BIN:=$(JDK_OUTPUTDIR)/classes,\ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 300 | COPY:=$(COPY_PATTERNS),\ |
| 301 | COPY_FILES:=$(COPY_FILES),\ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 302 | HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers)) |
| 303 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 304 | ########################################################################################## |
| 305 | # Special handling of header file generation for classes in the jigsaw base module which |
| 306 | # currently can't add the annotaion GenerateNativeHeaders. For these specific classes the |
| 307 | # java file and the class have the same names which enables shortcutting the dependencies. |
| 308 | |
| 309 | JDK_BASE_HEADER_CLASSES:=java.lang.Integer \ |
| 310 | java.lang.Long \ |
| 311 | java.net.SocketOptions \ |
dxu | ad61719 | 2012-10-26 11:21:02 +0100 | [diff] [blame] | 312 | sun.nio.ch.IOStatus \ |
| 313 | java.io.FileSystem |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 314 | |
| 315 | JDK_BASE_HEADER_JAVA_FILES:=$(patsubst %,$(JDK_TOPDIR)/src/share/classes/%.java,\ |
| 316 | $(subst .,/,$(JDK_BASE_HEADER_CLASSES))) |
| 317 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 318 | ifeq ($(OPENJDK_TARGET_OS),windows) |
erikj | 262993d | 2012-06-11 09:30:04 -0700 | [diff] [blame] | 319 | JDK_BASE_HEADER_CLASSES_WINDOWS:=sun.nio.ch.PollArrayWrapper |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 320 | JDK_BASE_HEADER_CLASSES+=$(JDK_BASE_HEADER_CLASSES_WINDOWS) |
| 321 | JDK_BASE_HEADER_JAVA_FILES+=$(patsubst %,$(JDK_TOPDIR)/src/windows/classes/%.java,\ |
| 322 | $(subst .,/,$(JDK_BASE_HEADER_CLASSES_WINDOWS))) |
| 323 | endif |
| 324 | |
| 325 | # Set prereqs to the java files since make doesn't know about the class files. Add BUILD_JDK |
| 326 | # as an order only dependency to avoid race with the java compilation. |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 327 | $(JDK_OUTPUTDIR)/gensrc_headers/_the.jdk.base.headers: $(JDK_BASE_HEADER_JAVA_FILES) | $(BUILD_JDK) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 328 | $(ECHO) Generating headers for jdk base classes |
| 329 | $(JAVAH) -bootclasspath $(JDK_OUTPUTDIR)/classes -d $(JDK_OUTPUTDIR)/gensrc_headers \ |
| 330 | $(JDK_BASE_HEADER_CLASSES) |
| 331 | $(TOUCH) $@ |
| 332 | |
| 333 | ########################################################################################## |
| 334 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 335 | ifndef OPENJDK |
| 336 | |
erikj | 62187db | 2012-12-05 10:12:57 +0100 | [diff] [blame] | 337 | $(eval $(call SetupJavaCompilation,BUILD_ALTCLASSES,\ |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 338 | SETUP:=GENERATE_JDKBYTECODE,\ |
| 339 | SRC:=$(JDK_TOPDIR)/src/closed/share/altclasses, \ |
erikj | 62187db | 2012-12-05 10:12:57 +0100 | [diff] [blame] | 340 | BIN:=$(JDK_OUTPUTDIR)/altclasses_classes)) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 341 | |
erikj | 62187db | 2012-12-05 10:12:57 +0100 | [diff] [blame] | 342 | $(BUILD_ALTCLASSES): $(BUILD_JDK) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 343 | |
| 344 | endif |
| 345 | |
| 346 | ########################################################################################## |
| 347 | |
| 348 | $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin: |
| 349 | $(MKDIR) -p $(@D) |
| 350 | $(TOUCH) $@ |
| 351 | |
| 352 | ########################################################################################## |
| 353 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 354 | ifeq ($(OPENJDK_TARGET_OS),macosx) |
| 355 | # |
| 356 | # JObjC.jar is compiled with BOOT_JAVAC which (may) not support the "-h" flag. |
| 357 | # so we first compile classes with BOOT_JAVAC and then with JDK_JAVAC :-( |
| 358 | # |
| 359 | $(eval $(call SetupJavaCompiler,GENERATE_15BYTECODE,\ |
| 360 | JAVAC:=$(JAVAC),\ |
| 361 | FLAGS:=-source 1.5 -target 1.5 -g -bootclasspath $(BOOT_RTJAR) -cp $(JDK_OUTPUTDIR)/../langtools/dist/lib/classes.jar $(DISABLE_WARNINGS),\ |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 362 | SERVER_DIR:=$(SJAVAC_SERVER_DIR),\ |
| 363 | SERVER_JVM:=$(SJAVAC_SERVER_JAVA))) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 364 | |
erikj | 62187db | 2012-12-05 10:12:57 +0100 | [diff] [blame] | 365 | $(eval $(call SetupJavaCompilation,BUILD_JOBJC,\ |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 366 | SETUP:=GENERATE_15BYTECODE,\ |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 367 | DISABLE_SJAVAC:=true,\ |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 368 | SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \ |
| 369 | $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \ |
| 370 | $(JDK_OUTPUTDIR)/gensrc, \ |
| 371 | INCLUDES := com/apple/jobjc,\ |
| 372 | EXCLUDES := tests/java/com/apple/jobjc,\ |
| 373 | BIN:=$(JDK_OUTPUTDIR)/jobjc_classes,\ |
| 374 | JAR:=$(JDK_OUTPUTDIR)/lib/JObjC.jar, \ |
| 375 | JARINDEX := true)) |
| 376 | |
erikj | 62187db | 2012-12-05 10:12:57 +0100 | [diff] [blame] | 377 | $(BUILD_JOBJC) : $(BUILD_JDK) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 378 | |
erikj | 62187db | 2012-12-05 10:12:57 +0100 | [diff] [blame] | 379 | $(eval $(call SetupJavaCompilation,BUILD_JOBJC_HEADERS,\ |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 380 | SETUP:=GENERATE_JDKBYTECODE,\ |
| 381 | SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \ |
| 382 | $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \ |
| 383 | $(JDK_OUTPUTDIR)/gensrc, \ |
| 384 | INCLUDES := com/apple/jobjc,\ |
| 385 | EXCLUDES := tests/java/com/apple/jobjc,\ |
| 386 | BIN:=$(JDK_OUTPUTDIR)/jobjc_classes_headers,\ |
erikj | 4f66f2d | 2012-11-03 16:27:01 -0700 | [diff] [blame] | 387 | HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers_jobjc)) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 388 | |
erikj | 62187db | 2012-12-05 10:12:57 +0100 | [diff] [blame] | 389 | $(BUILD_JOBJC_HEADERS) : $(BUILD_JDK) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 390 | |
| 391 | endif |
| 392 | |
| 393 | ########################################################################################## |
| 394 | |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 395 | # copy with -a to preserve timestamps so dependencies down the line aren't messed up |
erikj | 62187db | 2012-12-05 10:12:57 +0100 | [diff] [blame] | 396 | all: $(BUILD_JDK) $(BUILD_ALTCLASSES) $(BUILD_JOBJC) $(BUILD_JOBJC_HEADERS) $(COPY_EXTRA) \ |
| 397 | $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 398 | $(JDK_OUTPUTDIR)/gensrc_headers/_the.jdk.base.headers |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 399 | |
| 400 | .PHONY: all |