1 #
   2 # Copyright (c) 2011, 2012, 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/tools \
  28     $(JDK_TOPDIR)/src/solaris/classes \
  29     $(JDK_TOPDIR)/makefiles/sun))
  30 
  31 # The exception handling of swing beaninfo which have the own tool directory
  32 ifeq (,$(BUILD_TOOLS))
  33 $(eval $(call SetupJavaCompilation,BUILD_TOOLS,\
  34                 SETUP:=GENERATE_OLDBYTECODE,\
  35                 SRC:=$(JDK_TOPDIR)/make/tools/src \
  36                      $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator \
  37                      $(JDK_TOPDIR)/makefiles/sun/awt/X11 \
  38                      $(JDK_TOPDIR)/makefiles/sun/osxapp \
  39                      $(JDK_TOPDIR)/make/tools/swing-beans,\
  40                 BIN:=$(JDK_OUTPUTDIR)/btclasses))
  41 
  42 endif
  43 
  44 $(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/%.template : \
  45         $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/%.template
  46         $(MKDIR) -p $(@D)
  47         $(CP) $< $@
  48 
  49 BUILD_TOOLS += $(foreach i,$(wildcard $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/*.template),$(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/$(notdir $i))
  50 
  51 # Add a checksum ("jsum") to the end of a text file. Prevents trivial tampering with class lists.
  52 TOOL_ADDJSUM=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
  53         build.tools.addjsum.AddJsum
  54 
  55 # The buildmetaindex tool creates a meta-index to make core class loaders lazier.
  56 TOOL_BUILDMETAINDEX=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
  57         build.tools.buildmetaindex.BuildMetaIndex
  58 
  59 # The comment checker is not currently used. Should it be removed or added to javac?
  60 TOOL_COMMENTCHECKER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
  61         build.tools.commentchecker.CommentChecker
  62 
  63 TOOL_COMPILEFONTCONFIG=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
  64         build.tools.compilefontconfig.CompileFontConfig
  65 
  66 TOOL_COMPILEPROPERTIES=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
  67         build.tools.compileproperties.CompileProperties
  68 
  69 TOOL_STRIPPROPERTIES=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
  70         build.tools.stripproperties.StripProperties
  71 
  72 TOOL_JARREORDER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
  73         build.tools.jarreorder.JarReorder
  74 
  75 TOOL_GENERATECHARACTER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
  76         build.tools.generatecharacter.GenerateCharacter
  77 
  78 TOOL_CHARACTERNAME=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
  79         build.tools.generatecharacter.CharacterName
  80 
  81 TOOL_DIRDIFF=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
  82         build.tools.dirdiff.DirDiff
  83 
  84 TOOL_DTDBUILDER=$(JAVA) -Ddtd_home=$(JDK_TOPDIR)/make/tools/dtdbuilder/dtds \
  85         -cp $(JDK_OUTPUTDIR)/btclasses build.tools.dtdbuilder.DTDBuilder
  86 
  87 TOOL_GENERATEBREAKITERATORDATA=$(JAVA) \
  88         -cp $(JDK_OUTPUTDIR)/btclasses \
  89         build.tools.generatebreakiteratordata.GenerateBreakIteratorData
  90 
  91 TOOL_GENERATECURRENCYDATA=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
  92         build.tools.generatecurrencydata.GenerateCurrencyData
  93 
  94 TOOL_HASHER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
  95         build.tools.hasher.Hasher
  96 
  97 # Jarsplit used in jdk/makefiles/common/Release.gmk
  98 TOOL_JARSPLIT=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
  99         build.tools.jarsplit.JarSplit
 100 
 101 TOOL_JAVAZIC=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
 102         build.tools.javazic.Main
 103 
 104 # TODO: There are references to the jdwpgen.jar in jdk/make/netbeans/jdwpgen/build.xml 
 105 # and nbproject/project.properties in the same dir. Needs to be looked at.
 106 TOOL_JDWPGEN=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.jdwpgen.Main
 107 
 108 # TODO: Lots of files in jdk/make/tools/CharsetMapping dir
 109 TOOL_CHARSETMAPPING=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
 110         build.tools.charsetmapping.Main
 111 
 112 TOOL_SPP=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.spp.Spp
 113 
 114 # TODO: Only referenced in jdk/make/tools/sharing/README.txt. Find out what it means.
 115 TOOL_MAKECLASSLIST=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
 116         build.tools.makeclasslist.MakeClasslist
 117 
 118 # Nimbus is used somewhere in the swing build.
 119 TOOL_GENERATENIMBUS=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
 120         build.tools.generatenimbus.Generator
 121 
 122 TOOL_WRAPPERGENERATOR=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
 123         WrapperGenerator
 124 
 125 TOOL_X11_TOBIN=$(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
 126         sun.awt.X11.ToBin
 127 
 128 TOOL_OSX_TOBIN=$(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
 129         sun.osxapp.ToBin
 130 
 131 TOOL_CLDRCONVERTER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
 132         build.tools.cldrconverter.CLDRConverter
 133 
 134 ##########################################################################################
 135 
 136 # Tools needed on solaris because OBJCOPY is broken.
 137 
 138 $(eval $(call SetupNativeCompilation,ADD_GNU_DEBUGLINK,\
 139                 SRC:=$(JDK_TOPDIR)/make/tools/add_gnu_debuglink,\
 140                 LANG:=C,\
 141                 CC:=$(BUILD_CC),\
 142                 LDEXE:=$(BUILD_LD),\
 143                 LDFLAGS:=-lelf,\
 144                 OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/add_gnu_debuglink,\
 145                 OUTPUT_DIR:=$(JDK_OUTPUTDIR)/btbin,\
 146                 PROGRAM:=add_gnu_debuglink))
 147 
 148 $(eval $(call SetupNativeCompilation,FIX_EMPTY_SEC_HDR_FLAGS,\
 149                 SRC:=$(JDK_TOPDIR)/make/tools/fix_empty_sec_hdr_flags,\
 150                 LANG:=C,\
 151                 CC:=$(BUILD_CC),\
 152                 LDEXE:=$(BUILD_LD),\
 153                 LDFLAGS:=-lelf,\
 154                 OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/fix_empty_sec_hdr_flags,\
 155                 OUTPUT_DIR:=$(JDK_OUTPUTDIR)/btbin,\
 156                 PROGRAM:=fix_empty_sec_hdr_flags))