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