< prev index next >

make/CompileJavaModules.gmk

Print this page
rev 1597 : [mq]: 8129562


 517 
 518 # This macro sets up compilation of a module and declares dependencies for it.
 519 # Param 1 - module name
 520 define SetupModuleCompilation
 521   # Find the module dependencies by parsing modules.list file
 522   $1_DEPS := $$(call FindDepsForModule, $1)
 523 
 524   $1_CLASSPATH := $$(foreach d,$$($1_DEPS), $$(if $$($$d_BIN), $$($$d_BIN), \
 525       $(JDK_OUTPUTDIR)/modules/$$d))
 526   # When crypto classes are prebuilt, need to look for classes already in
 527   # output dir.
 528   ifneq ($(BUILD_CRYPTO), true)
 529     $1_CLASSPATH += $(JDK_OUTPUTDIR)/modules/$1
 530   endif
 531   ifeq ($1, jdk.hotspot.agent)
 532     ## The source of this module is compiled elsewhere, hotspot, and imported.
 533     ## Service types are required in the classpath when compiing module-info
 534     $1_CLASSPATH := $$($1_CLASSPATH) $$(addprefix $(JDK_OUTPUTDIR)/modules/,jdk.hotspot.agent)
 535   endif
 536   $1_CLASSPATH := $$(subst $$(SPACE),$$(PATH_SEP),$$($1_CLASSPATH))
 537   $1_JAVAC_FLAGS := -bootclasspath $(EMPTY_BOOTCLASSPATH) -classpath "$$($1_CLASSPATH)" $$($1_ADD_JAVAC_FLAGS)
 538 
 539   $$(eval $$(call SetupJavaCompilation,$1, \
 540       SETUP := $$(if $$($1_SETUP), $$($1_SETUP), GENERATE_JDKBYTECODE), \
 541       SRC := $$(wildcard $$(call ALL_SRC_DIRS,$1)), \
 542       INCLUDES := $(JDK_USER_DEFINED_FILTER),\
 543       BIN := $$(if $$($1_BIN), $$($1_BIN), $(JDK_OUTPUTDIR)/modules/$1), \
 544       HEADERS := $(SUPPORT_OUTPUTDIR)/headers/$1, \
 545       ADD_JAVAC_FLAGS := $$($1_ADD_JAVAC_FLAGS) $$($1_JAVAC_FLAGS)))
 546 
 547   $1: $$($1) $$($1_COPY_EXTRA)
 548 
 549   # Declare dependencies between java compilation of different modules.
 550   # Since not all modules have been declared yet, or might be declared
 551   # in different invocations of this file, use the macro to find the
 552   # correct target file to depend on.
 553   # Only the javac compilation actually depends on other modules so limit
 554   # dependency declaration to that by using the *_COMPILE_TARGET variable.
 555   $$($1_COMPILE_TARGETS): $$(foreach d,$$($1_DEPS), \
 556       $$(call SetupJavaCompilationCompileTarget, $$d, \
 557           $$(if $$($$d_BIN), $$($$d_BIN), $(JDK_OUTPUTDIR)/modules/$$d)))




 517 
 518 # This macro sets up compilation of a module and declares dependencies for it.
 519 # Param 1 - module name
 520 define SetupModuleCompilation
 521   # Find the module dependencies by parsing modules.list file
 522   $1_DEPS := $$(call FindDepsForModule, $1)
 523 
 524   $1_CLASSPATH := $$(foreach d,$$($1_DEPS), $$(if $$($$d_BIN), $$($$d_BIN), \
 525       $(JDK_OUTPUTDIR)/modules/$$d))
 526   # When crypto classes are prebuilt, need to look for classes already in
 527   # output dir.
 528   ifneq ($(BUILD_CRYPTO), true)
 529     $1_CLASSPATH += $(JDK_OUTPUTDIR)/modules/$1
 530   endif
 531   ifeq ($1, jdk.hotspot.agent)
 532     ## The source of this module is compiled elsewhere, hotspot, and imported.
 533     ## Service types are required in the classpath when compiing module-info
 534     $1_CLASSPATH := $$($1_CLASSPATH) $$(addprefix $(JDK_OUTPUTDIR)/modules/,jdk.hotspot.agent)
 535   endif
 536   $1_CLASSPATH := $$(subst $$(SPACE),$$(PATH_SEP),$$($1_CLASSPATH))
 537   $1_JAVAC_FLAGS := -bootclasspath $(EMPTY_BOOTCLASSPATH) -extdirs $(EMPTY_BOOTCLASSPATH) -endorseddirs $(EMPTY_BOOTCLASSPATH) -classpath "$$($1_CLASSPATH)" $$($1_ADD_JAVAC_FLAGS)
 538 
 539   $$(eval $$(call SetupJavaCompilation,$1, \
 540       SETUP := $$(if $$($1_SETUP), $$($1_SETUP), GENERATE_JDKBYTECODE), \
 541       SRC := $$(wildcard $$(call ALL_SRC_DIRS,$1)), \
 542       INCLUDES := $(JDK_USER_DEFINED_FILTER),\
 543       BIN := $$(if $$($1_BIN), $$($1_BIN), $(JDK_OUTPUTDIR)/modules/$1), \
 544       HEADERS := $(SUPPORT_OUTPUTDIR)/headers/$1, \
 545       ADD_JAVAC_FLAGS := $$($1_ADD_JAVAC_FLAGS) $$($1_JAVAC_FLAGS)))
 546 
 547   $1: $$($1) $$($1_COPY_EXTRA)
 548 
 549   # Declare dependencies between java compilation of different modules.
 550   # Since not all modules have been declared yet, or might be declared
 551   # in different invocations of this file, use the macro to find the
 552   # correct target file to depend on.
 553   # Only the javac compilation actually depends on other modules so limit
 554   # dependency declaration to that by using the *_COMPILE_TARGET variable.
 555   $$($1_COMPILE_TARGETS): $$(foreach d,$$($1_DEPS), \
 556       $$(call SetupJavaCompilationCompileTarget, $$d, \
 557           $$(if $$($$d_BIN), $$($$d_BIN), $(JDK_OUTPUTDIR)/modules/$$d)))


< prev index next >