jdk/make/ModuleTools.gmk
changeset 45765 c6133166bde5
parent 45638 e82401275b00
equal deleted inserted replaced
45764:7ce57d6259e7 45765:c6133166bde5
     1 #
     1 #
     2 # Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
     2 # Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 #
     4 #
     5 # This code is free software; you can redistribute it and/or modify it
     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
     6 # under the terms of the GNU General Public License version 2 only, as
     7 # published by the Free Software Foundation.  Oracle designates this
     7 # published by the Free Software Foundation.  Oracle designates this
    21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    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
    22 # or visit www.oracle.com if you need additional information or have any
    23 # questions.
    23 # questions.
    24 #
    24 #
    25 
    25 
    26 include $(SPEC)
    26 ifndef _MODULE_TOOLS_GMK
    27 include MakeBase.gmk
    27 _MODULE_TOOLS_GMK := 1
       
    28 
    28 include JavaCompilation.gmk
    29 include JavaCompilation.gmk
    29 
    30 
    30 TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes
    31 TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes
    31 
    32 
    32 # To avoid reevaluating the compilation setup for the tools each time this file
    33 # To avoid reevaluating the compilation setup for the tools each time this file
    33 # is included, the actual compilation is handled by CompileModuleTools.gmk. The
    34 # is included, the actual compilation is handled by CompileModuleTools.gmk. The
    34 # following trick is used to be able to declare a dependency on the built tools.
    35 # following trick is used to be able to declare a dependency on the built tools.
    35 BUILD_TOOLS_JDK := $(call SetupJavaCompilationCompileTarget, \
    36 BUILD_JIGSAW_TOOLS := $(call SetupJavaCompilationCompileTarget, \
    36     BUILD_JIGSAW_TOOLS, $(TOOLS_CLASSES_DIR))
    37     BUILD_JIGSAW_TOOLS, $(TOOLS_CLASSES_DIR))
    37 
    38 
    38 TOOL_GENGRAPHS := $(BUILD_JAVA) -esa -ea -cp $(TOOLS_CLASSES_DIR) \
    39 TOOL_GENGRAPHS := $(BUILD_JAVA) -esa -ea -cp $(TOOLS_CLASSES_DIR) \
       
    40     --add-modules jdk.jdeps \
       
    41     --add-exports jdk.jdeps/com.sun.tools.jdeps=ALL-UNNAMED \
    39     build.tools.jigsaw.GenGraphs
    42     build.tools.jigsaw.GenGraphs
    40 
    43 
    41 TOOL_MODULESUMMARY := $(BUILD_JAVA) -esa -ea -cp $(TOOLS_CLASSES_DIR) \
    44 TOOL_MODULESUMMARY := $(BUILD_JAVA) -esa -ea -cp $(TOOLS_CLASSES_DIR) \
    42     build.tools.jigsaw.ModuleSummary
    45     build.tools.jigsaw.ModuleSummary
    43 
    46 
    44 TOOL_ADD_PACKAGES_ATTRIBUTE := $(BUILD_JAVA) $(JAVA_FLAGS_SMALL) \
    47 TOOL_ADD_PACKAGES_ATTRIBUTE := $(BUILD_JAVA) $(JAVA_FLAGS_SMALL) \
    45     -cp $(TOOLS_CLASSES_DIR) \
    48     -cp $(TOOLS_CLASSES_DIR) \
    46     --add-exports java.base/jdk.internal.module=ALL-UNNAMED \
    49     --add-exports java.base/jdk.internal.module=ALL-UNNAMED \
    47     build.tools.jigsaw.AddPackagesAttribute
    50     build.tools.jigsaw.AddPackagesAttribute
       
    51 
       
    52 endif # _MODULE_TOOLS_GMK