annotate make/Tools.gmk @ 10967:e336cbd8b15e

8049367: Modular Run-Time Images Reviewed-by: chegar, dfuchs, ihse, joehw, mullan, psandoz, wetmore Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, bradford.wetmore@oracle.com, chris.hegarty@oracle.com, erik.joelsson@oracle.com, james.laskey@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, magnus.ihse.bursie@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, paul.sandoz@oracle.com, sundararajan.athijegannathan@oracle.com
author chegar
date Wed, 03 Dec 2014 14:22:58 +0000
parents 7473e7beda3a
children 12c3328b687e
rev   line source
ohair@5221 1 #
erikj@9502 2 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
ohair@5221 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ohair@5221 4 #
ohair@5221 5 # This code is free software; you can redistribute it and/or modify it
ohair@5221 6 # under the terms of the GNU General Public License version 2 only, as
ohair@5221 7 # published by the Free Software Foundation. Oracle designates this
ohair@5221 8 # particular file as subject to the "Classpath" exception as provided
ohair@5221 9 # by Oracle in the LICENSE file that accompanied this code.
ohair@5221 10 #
ohair@5221 11 # This code is distributed in the hope that it will be useful, but WITHOUT
ohair@5221 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ohair@5221 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ohair@5221 14 # version 2 for more details (a copy is included in the LICENSE file that
ohair@5221 15 # accompanied this code).
ohair@5221 16 #
ohair@5221 17 # You should have received a copy of the GNU General Public License version
ohair@5221 18 # 2 along with this work; if not, write to the Free Software Foundation,
ohair@5221 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ohair@5221 20 #
ohair@5221 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@5221 22 # or visit www.oracle.com if you need additional information or have any
ohair@5221 23 # questions.
ohair@5221 24 #
ohair@5221 25
chegar@10444 26 ifndef _TOOLS_GMK
chegar@10444 27 _TOOLS_GMK := 1
chegar@10444 28
chegar@10444 29 default: all
chegar@10444 30
chegar@10444 31 include $(SPEC)
chegar@10444 32 include MakeBase.gmk
chegar@10444 33 include JavaCompilation.gmk
chegar@10444 34 include NativeCompilation.gmk
erikj@10526 35 include SetupJavaCompilers.gmk
chegar@10444 36
erikj@5507 37 # The exception handling of swing beaninfo which have the own tool directory
chegar@10444 38 ifeq (, $(BUILD_TOOLS_JDK))
chegar@10444 39 $(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
ihse@8330 40 SETUP := GENERATE_OLDBYTECODE, \
chegar@10967 41 ADD_JAVAC_FLAGS := "-Xbootclasspath/p:$(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes", \
erikj@9287 42 SRC := $(JDK_TOPDIR)/make/src/classes, \
chegar@10967 43 BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
chegar@10967 44 COPY := boot.modules ext.modules))
ohair@5221 45 endif
ohair@5221 46
chegar@10967 47 $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/generatenimbus/resources/%.template: \
chegar@10444 48 $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/%.template
erikj@6824 49 $(call install-file)
ohair@5221 50
chegar@10967 51 BUILD_TOOLS_JDK += $(foreach i, $(wildcard $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template), $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/generatenimbus/resources/$(notdir $i))
ohair@5221 52
ihse@8845 53 # Resource used by CheckDeps tool
chegar@10967 54 $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/deps/refs.allowed: \
ihse@8845 55 $(JDK_TOPDIR)/make/data/checkdeps/refs.allowed
erikj@6824 56 $(call install-file)
alanb@6583 57
chegar@10967 58 BUILD_TOOLS_JDK += $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/deps/refs.allowed
alanb@6583 59
ohair@5221 60 # Add a checksum ("jsum") to the end of a text file. Prevents trivial tampering with class lists.
chegar@10967 61 TOOL_ADDJSUM = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
ihse@8330 62 build.tools.addjsum.AddJsum
ohair@5221 63
ohair@5221 64 # The buildmetaindex tool creates a meta-index to make core class loaders lazier.
chegar@10967 65 TOOL_BUILDMETAINDEX = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
ihse@8330 66 build.tools.buildmetaindex.BuildMetaIndex
ohair@5221 67
chegar@10967 68 TOOL_COMPILEFONTCONFIG = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
ihse@8330 69 build.tools.compilefontconfig.CompileFontConfig
ohair@5221 70
chegar@10967 71 TOOL_COMPILEPROPERTIES = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
ihse@8330 72 build.tools.compileproperties.CompileProperties
ohair@5221 73
chegar@10967 74 TOOL_JARREORDER = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
ihse@8330 75 build.tools.jarreorder.JarReorder
ohair@5221 76
chegar@10967 77 TOOL_GENERATECHARACTER = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
ihse@8330 78 build.tools.generatecharacter.GenerateCharacter
ohair@5221 79
chegar@10967 80 TOOL_CHARACTERNAME = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
ihse@8330 81 build.tools.generatecharacter.CharacterName
ohair@5221 82
erikj@9502 83 TOOL_DTDBUILDER = $(JAVA_SMALL) -Ddtd_home=$(JDK_TOPDIR)/make/data/dtdbuilder \
ihse@9531 84 -Djava.awt.headless=true \
chegar@10967 85 -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes build.tools.dtdbuilder.DTDBuilder
ohair@5221 86
erikj@9502 87 TOOL_GENERATEBREAKITERATORDATA = $(JAVA_SMALL) \
chegar@10967 88 -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
ihse@8330 89 build.tools.generatebreakiteratordata.GenerateBreakIteratorData
ohair@5221 90
chegar@10967 91 TOOL_GENERATECURRENCYDATA = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
ihse@8330 92 build.tools.generatecurrencydata.GenerateCurrencyData
ohair@5221 93
chegar@10967 94 TOOL_HASHER = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
ihse@8330 95 build.tools.hasher.Hasher
ohair@5221 96
chegar@10967 97 TOOL_TZDB = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
ihse@8330 98 build.tools.tzdb.TzdbZoneRulesCompiler
sherman@6418 99
chegar@10967 100 TOOL_BLACKLISTED_CERTS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
weijun@10265 101 build.tools.blacklistedcertsconverter.BlacklistedCertsConverter
weijun@10265 102
chegar@10967 103 TOOL_MAKEJAVASECURITY = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
weijun@10454 104 build.tools.makejavasecurity.MakeJavaSecurity
weijun@10454 105
sherman@6418 106
ihse@8330 107 # TODO: There are references to the jdwpgen.jar in jdk/make/netbeans/jdwpgen/build.xml
ohair@5221 108 # and nbproject/project.properties in the same dir. Needs to be looked at.
chegar@10967 109 TOOL_JDWPGEN = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes build.tools.jdwpgen.Main
ohair@5221 110
ohair@5221 111 # TODO: Lots of files in jdk/make/tools/CharsetMapping dir
chegar@10967 112 TOOL_CHARSETMAPPING = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
ihse@9232 113 build.tools.charsetmapping.Main $(LOG_INFO)
ohair@5221 114
chegar@10967 115 TOOL_SPP = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes build.tools.spp.Spp
ohair@5221 116
ohair@5221 117 # Nimbus is used somewhere in the swing build.
chegar@10967 118 TOOL_GENERATENIMBUS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
ihse@8330 119 build.tools.generatenimbus.Generator
erikj@5507 120
chegar@10967 121 TOOL_WRAPPERGENERATOR = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
erikj@9287 122 build.tools.x11wrappergen.WrapperGenerator
erikj@5507 123
chegar@10967 124 TOOL_AWT_TOBIN = $(JAVA_SMALL) -Djava.awt.headless=true -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
ihse@8845 125 build.tools.icondata.awt.ToBin
erikj@5596 126
chegar@10967 127 TOOL_OSX_TOBIN = $(JAVA_SMALL) -Djava.awt.headless=true -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
ihse@8845 128 build.tools.icondata.osxapp.ToBin
ohair@6025 129
chegar@10967 130 TOOL_CLDRCONVERTER = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
ihse@8330 131 build.tools.cldrconverter.CLDRConverter
naoto@5747 132
erikj@9502 133 TOOL_CHECKDEPS = $(JAVA_SMALL) -Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR) \
chegar@10967 134 -cp "$(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes$(PATH_SEP)$(JDK_OUTPUTDIR)" \
ihse@8330 135 build.tools.deps.CheckDeps
alanb@6583 136
chegar@10444 137 TOOL_GENMODULESXML = $(JAVA_SMALL) -Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR) \
chegar@10967 138 -cp "$(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes$(PATH_SEP)$(JDK_OUTPUTDIR)" \
mchung@10562 139 build.tools.module.GenJdepsModulesXml
chegar@10444 140
chegar@10967 141 TOOL_IMAGEBUILDER = $(JAVA_SMALL) -Xbootclasspath/p:$(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes \
chegar@10967 142 -cp "$(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes$(PATH_SEP)$(JDK_OUTPUTDIR)" \
chegar@10967 143 build.tools.module.ImageBuilder
chegar@10967 144
chegar@10967 145 ##########################################################################################
chegar@10967 146
chegar@10967 147 JIMAGE_PKGS := \
chegar@10967 148 jdk/internal/jimage \
chegar@10967 149 jdk/internal/jrtfs \
chegar@10967 150 #
chegar@10967 151
chegar@10967 152 $(eval $(call SetupJavaCompilation,BUILD_INTERIM_JIMAGE, \
chegar@10967 153 SETUP := GENERATE_OLDBYTECODE, \
chegar@10967 154 SRC := $(JDK_TOPDIR)/src/java.base/share/classes, \
chegar@10967 155 INCLUDES := $(JIMAGE_PKGS), \
chegar@10967 156 EXCLUDES := jdk/internal/jimage/concurrent, \
chegar@10967 157 BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes))
chegar@10967 158
erikj@5596 159 ##########################################################################################
erikj@5596 160
erikj@5596 161 # Tools needed on solaris because OBJCOPY is broken.
erikj@5596 162
dcubed@8482 163 ifeq ($(OPENJDK_TARGET_OS), solaris)
ihse@8330 164 $(eval $(call SetupNativeCompilation,ADD_GNU_DEBUGLINK, \
ihse@8845 165 SRC := $(JDK_TOPDIR)/make/src/native/add_gnu_debuglink, \
ihse@8330 166 LANG := C, \
ihse@8330 167 CC := $(BUILD_CC), \
ihse@8330 168 LDEXE := $(BUILD_LD), \
ihse@8330 169 LDFLAGS := -lelf, \
chegar@10967 170 OBJECT_DIR := $(BUILDTOOLS_OUTPUTDIR)/objs/add_gnu_debuglink, \
chegar@10967 171 OUTPUT_DIR := $(BUILDTOOLS_OUTPUTDIR)/bin, \
ihse@8330 172 PROGRAM := add_gnu_debuglink))
erikj@5596 173
ihse@8330 174 $(eval $(call SetupNativeCompilation,FIX_EMPTY_SEC_HDR_FLAGS, \
ihse@8845 175 SRC := $(JDK_TOPDIR)/make/src/native/fix_empty_sec_hdr_flags, \
ihse@8330 176 LANG := C, \
ihse@8330 177 CC := $(BUILD_CC), \
ihse@8330 178 LDEXE := $(BUILD_LD), \
ihse@8330 179 LDFLAGS := -lelf, \
chegar@10967 180 OBJECT_DIR := $(BUILDTOOLS_OUTPUTDIR)/objs/fix_empty_sec_hdr_flags, \
chegar@10967 181 OUTPUT_DIR := $(BUILDTOOLS_OUTPUTDIR)/bin, \
ihse@8330 182 PROGRAM := fix_empty_sec_hdr_flags))
dcubed@8482 183 endif
chegar@10444 184
chegar@10967 185 $(BUILD_TOOLS_JDK): $(BUILD_INTERIM_JIMAGE)
chegar@10967 186
chegar@10444 187 java-tools: $(BUILD_TOOLS_JDK)
chegar@10444 188
chegar@10444 189 all: java-tools
chegar@10444 190
chegar@10444 191 endif # _TOOLS_GMK
chegar@10444 192