makefiles/CompileJavaClasses.gmk

Print this page




 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 
 289 $(eval $(call SetupJavaCompilation,BUILD_JDK,\
 290                 SETUP:=GENERATE_JDKBYTECODE,\
 291                 SRC:=$(JDK_TOPDIR)/src/share/classes \
 292                      $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes \
 293                      $(MACOSX_SRC_DIRS) \
 294                      $(JDK_OUTPUTDIR)/gensrc \
 295                      $(CLOSED_SRC_DIRS),\
 296                 INCLUDES:=$(JDK_USER_DEFINED_FILTER),\
 297                 EXCLUDES:=$(EXCLUDES),\
 298                 EXCLUDE_FILES:=$(EXFILES),\
 299                 BIN:=$(JDK_OUTPUTDIR)/classes,\
 300                 COPY:=$(COPY_PATTERNS),\
 301                 COPY_FILES:=$(COPY_FILES),\
 302                 HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers))
 303 
 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 \
 312                          sun.nio.ch.IOStatus \
 313                          java.io.FileSystem
 314 
 315 JDK_BASE_HEADER_JAVA_FILES:=$(patsubst %,$(JDK_TOPDIR)/src/share/classes/%.java,\
 316                                 $(subst .,/,$(JDK_BASE_HEADER_CLASSES)))
 317 
 318 ifeq ($(OPENJDK_TARGET_OS),windows)
 319     JDK_BASE_HEADER_CLASSES_WINDOWS:=sun.nio.ch.PollArrayWrapper
 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.
 327 $(JDK_OUTPUTDIR)/gensrc_headers/_the.jdk.base.headers: $(JDK_BASE_HEADER_JAVA_FILES) | $(BUILD_JDK)
 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 
 335 ifndef OPENJDK
 336 
 337     $(eval $(call SetupJavaCompilation,BUILD_ALTCLASSES,\
 338                 SETUP:=GENERATE_JDKBYTECODE,\
 339                 SRC:=$(JDK_TOPDIR)/src/closed/share/altclasses, \
 340                 BIN:=$(JDK_OUTPUTDIR)/altclasses_classes))
 341 
 342     $(BUILD_ALTCLASSES): $(BUILD_JDK)
 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 


 377 $(BUILD_JOBJC) : $(BUILD_JDK)
 378 
 379 $(eval $(call SetupJavaCompilation,BUILD_JOBJC_HEADERS,\
 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,\
 387                 HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers_jobjc))
 388 
 389 $(BUILD_JOBJC_HEADERS) : $(BUILD_JDK)
 390 
 391 endif
 392 
 393 ##########################################################################################
 394 
 395 # copy with -a to preserve timestamps so dependencies down the line aren't messed up
 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 \
 398         $(JDK_OUTPUTDIR)/gensrc_headers/_the.jdk.base.headers
 399 
 400 .PHONY: all


 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 
 289 $(eval $(call SetupJavaCompilation,BUILD_JDK,\
 290                 SETUP:=GENERATE_JDKBYTECODE,\
 291                 SRC:=$(JDK_TOPDIR)/src/share/classes \
 292                      $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes \
 293                      $(MACOSX_SRC_DIRS) \
 294                      $(JDK_OUTPUTDIR)/gensrc \
 295                      $(CLOSED_SRC_DIRS),\
 296                 INCLUDES:=$(JDK_USER_DEFINED_FILTER),\
 297                 EXCLUDES:=$(EXCLUDES),\
 298                 EXCLUDE_FILES:=$(EXFILES),\
 299                 BIN:=$(JDK_OUTPUTDIR)/classes,\
 300                 COPY:=$(COPY_PATTERNS),\
 301                 COPY_FILES:=$(COPY_FILES),\
 302                 HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers))
 303 
 304 ##########################################################################################





























 305 
 306 ifndef OPENJDK
 307 
 308     $(eval $(call SetupJavaCompilation,BUILD_ALTCLASSES,\
 309                 SETUP:=GENERATE_JDKBYTECODE,\
 310                 SRC:=$(JDK_TOPDIR)/src/closed/share/altclasses, \
 311                 BIN:=$(JDK_OUTPUTDIR)/altclasses_classes))
 312 
 313     $(BUILD_ALTCLASSES): $(BUILD_JDK)
 314 
 315 endif
 316 
 317 ##########################################################################################
 318 
 319 $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin:
 320         $(MKDIR) -p $(@D)
 321         $(TOUCH) $@
 322 
 323 ##########################################################################################
 324 


 348 $(BUILD_JOBJC) : $(BUILD_JDK)
 349 
 350 $(eval $(call SetupJavaCompilation,BUILD_JOBJC_HEADERS,\
 351                 SETUP:=GENERATE_JDKBYTECODE,\
 352                 SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \
 353                      $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \
 354                      $(JDK_OUTPUTDIR)/gensrc, \
 355                 INCLUDES := com/apple/jobjc,\
 356                 EXCLUDES := tests/java/com/apple/jobjc,\
 357                 BIN:=$(JDK_OUTPUTDIR)/jobjc_classes_headers,\
 358                 HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers_jobjc))
 359 
 360 $(BUILD_JOBJC_HEADERS) : $(BUILD_JDK)
 361 
 362 endif
 363 
 364 ##########################################################################################
 365 
 366 # copy with -a to preserve timestamps so dependencies down the line aren't messed up
 367 all: $(BUILD_JDK) $(BUILD_ALTCLASSES) $(BUILD_JOBJC) $(BUILD_JOBJC_HEADERS) $(COPY_EXTRA) \
 368         $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin

 369 
 370 .PHONY: all