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