1 # 2 # Copyright (c) 2011, 2014, 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 # Cache all finds needed for this file. 27 $(eval $(call FillCacheFind, $(JDK_TOPDIR)/make/src/classes)) 28 29 # The exception handling of swing beaninfo which have the own tool directory 30 ifeq (, $(BUILD_TOOLS)) 31 $(eval $(call SetupJavaCompilation,BUILD_TOOLS, \ 32 SETUP := GENERATE_OLDBYTECODE, \ 33 SRC := $(JDK_TOPDIR)/make/src/classes, \ 34 BIN := $(JDK_OUTPUTDIR)/btclasses)) 35 endif 36 37 $(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/%.template: \ 38 $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/%.template 39 $(call install-file) 40 41 BUILD_TOOLS += $(foreach i, $(wildcard $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/*.template), $(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/$(notdir $i)) 42 43 # Resource used by CheckDeps tool 44 $(JDK_OUTPUTDIR)/btclasses/build/tools/deps/refs.allowed: \ 45 $(JDK_TOPDIR)/make/data/checkdeps/refs.allowed 46 $(call install-file) 47 48 BUILD_TOOLS += $(JDK_OUTPUTDIR)/btclasses/build/tools/deps/refs.allowed 49 50 # Add a checksum ("jsum") to the end of a text file. Prevents trivial tampering with class lists. 51 TOOL_ADDJSUM = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \ 52 build.tools.addjsum.AddJsum 53 54 # The buildmetaindex tool creates a meta-index to make core class loaders lazier. 55 TOOL_BUILDMETAINDEX = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \ 56 build.tools.buildmetaindex.BuildMetaIndex 57 58 TOOL_COMPILEFONTCONFIG = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \ 59 build.tools.compilefontconfig.CompileFontConfig 60 61 TOOL_COMPILEPROPERTIES = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \ 62 build.tools.compileproperties.CompileProperties 63 64 TOOL_JARREORDER = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \ 65 build.tools.jarreorder.JarReorder 66 67 TOOL_GENERATECHARACTER = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \ 68 build.tools.generatecharacter.GenerateCharacter 69 70 TOOL_CHARACTERNAME = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \ 71 build.tools.generatecharacter.CharacterName 72 73 TOOL_DTDBUILDER = $(JAVA_SMALL) -Ddtd_home=$(JDK_TOPDIR)/make/data/dtdbuilder \ 74 -Djava.awt.headless=true \ 75 -cp $(JDK_OUTPUTDIR)/btclasses build.tools.dtdbuilder.DTDBuilder 76 77 TOOL_GENERATEBREAKITERATORDATA = $(JAVA_SMALL) \ 78 -cp $(JDK_OUTPUTDIR)/btclasses \ 79 build.tools.generatebreakiteratordata.GenerateBreakIteratorData 80 81 TOOL_GENERATECURRENCYDATA = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \ 82 build.tools.generatecurrencydata.GenerateCurrencyData 83 84 TOOL_HASHER = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \ 85 build.tools.hasher.Hasher 86 87 TOOL_TZDB = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \ 88 build.tools.tzdb.TzdbZoneRulesCompiler 89 90 TOOL_BLACKLISTED_CERTS = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \ 91 build.tools.blacklistedcertsconverter.BlacklistedCertsConverter 92 93 94 # TODO: There are references to the jdwpgen.jar in jdk/make/netbeans/jdwpgen/build.xml 95 # and nbproject/project.properties in the same dir. Needs to be looked at. 96 TOOL_JDWPGEN = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.jdwpgen.Main 97 98 # TODO: Lots of files in jdk/make/tools/CharsetMapping dir 99 TOOL_CHARSETMAPPING = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \ 100 build.tools.charsetmapping.Main $(LOG_INFO) 101 102 TOOL_SPP = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.spp.Spp 103 104 # Nimbus is used somewhere in the swing build. 105 TOOL_GENERATENIMBUS = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \ 106 build.tools.generatenimbus.Generator 107 108 TOOL_WRAPPERGENERATOR = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \ 109 build.tools.x11wrappergen.WrapperGenerator 110 111 TOOL_AWT_TOBIN = $(JAVA_SMALL) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \ 112 build.tools.icondata.awt.ToBin 113 114 TOOL_OSX_TOBIN = $(JAVA_SMALL) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \ 115 build.tools.icondata.osxapp.ToBin 116 117 TOOL_CLDRCONVERTER = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \ 118 build.tools.cldrconverter.CLDRConverter 119 120 TOOL_CHECKDEPS = $(JAVA_SMALL) -Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR) \ 121 -cp $(JDK_OUTPUTDIR)/btclasses:$(JDK_OUTPUTDIR) \ 122 build.tools.deps.CheckDeps 123 124 TOOL_ADDTORESTRICTEDPKGS = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \ 125 build.tools.addtorestrictedpkgs.AddToRestrictedPkgs 126 127 ########################################################################################## 128 129 # Tools needed on solaris because OBJCOPY is broken. 130 131 ifeq ($(OPENJDK_TARGET_OS), solaris) 132 $(eval $(call SetupNativeCompilation,ADD_GNU_DEBUGLINK, \ 133 SRC := $(JDK_TOPDIR)/make/src/native/add_gnu_debuglink, \ 134 LANG := C, \ 135 CC := $(BUILD_CC), \ 136 LDEXE := $(BUILD_LD), \ 137 LDFLAGS := -lelf, \ 138 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/add_gnu_debuglink, \ 139 OUTPUT_DIR := $(JDK_OUTPUTDIR)/btbin, \ 140 PROGRAM := add_gnu_debuglink)) 141 142 $(eval $(call SetupNativeCompilation,FIX_EMPTY_SEC_HDR_FLAGS, \ 143 SRC := $(JDK_TOPDIR)/make/src/native/fix_empty_sec_hdr_flags, \ 144 LANG := C, \ 145 CC := $(BUILD_CC), \ 146 LDEXE := $(BUILD_LD), \ 147 LDFLAGS := -lelf, \ 148 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/fix_empty_sec_hdr_flags, \ 149 OUTPUT_DIR := $(JDK_OUTPUTDIR)/btbin, \ 150 PROGRAM := fix_empty_sec_hdr_flags)) 151 endif