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 TOOL_MAKEJAVASECURITY = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
  94     build.tools.makejavasecurity.MakeJavaSecurity
  95 
  96 
  97 # TODO: There are references to the jdwpgen.jar in jdk/make/netbeans/jdwpgen/build.xml
  98 # and nbproject/project.properties in the same dir. Needs to be looked at.
  99 TOOL_JDWPGEN = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.jdwpgen.Main
 100 
 101 # TODO: Lots of files in jdk/make/tools/CharsetMapping dir
 102 TOOL_CHARSETMAPPING = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
 103     build.tools.charsetmapping.Main $(LOG_INFO)
 104 
 105 TOOL_SPP = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.spp.Spp
 106 
 107 # Nimbus is used somewhere in the swing build.
 108 TOOL_GENERATENIMBUS = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
 109     build.tools.generatenimbus.Generator
 110 
 111 TOOL_WRAPPERGENERATOR = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
 112     build.tools.x11wrappergen.WrapperGenerator
 113 
 114 TOOL_AWT_TOBIN = $(JAVA_SMALL) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
 115     build.tools.icondata.awt.ToBin
 116 
 117 TOOL_OSX_TOBIN = $(JAVA_SMALL) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
 118     build.tools.icondata.osxapp.ToBin
 119 
 120 TOOL_CLDRCONVERTER = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
 121     build.tools.cldrconverter.CLDRConverter
 122 
 123 TOOL_CHECKDEPS = $(JAVA_SMALL) -Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR) \
 124     -cp $(JDK_OUTPUTDIR)/btclasses:$(JDK_OUTPUTDIR) \
 125     build.tools.deps.CheckDeps
 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