1 #
   2 # Copyright (c) 2001, 2008, 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 #
  27 # Makefile for locale data.
  28 #
  29 
  30 BUILDDIR = ../..
  31 
  32 MODULE  = localedata
  33 PACKAGE = sun.text
  34 PRODUCT = sun
  35 
  36 include $(BUILDDIR)/common/Defs.gmk
  37 
  38 # Re-direct classes to another location (we are building localedata.jar)
  39 CLASSDESTDIR = $(TEMPDIR)/classes
  40 
  41 #
  42 # Files
  43 #
  44 include FILES_java.gmk
  45 include FILES_properties.gmk
  46 
  47 #
  48 # Compile the properties files
  49 #
  50 COMPILED_PROPERTIES_SUPERCLASS=LocaleNamesBundle
  51 
  52 #
  53 # Rules
  54 #
  55 include $(BUILDDIR)/common/Classes.gmk
  56 
  57 #
  58 # Rules to add data files BreakIterator (for th locale)
  59 #
  60 TEXT_CLASSES = $(BUILDTOOLCLASSDIR)/sun.text/classes
  61 
  62 # input
  63 #
  64 #   Notes: sun.text.resources.BreakIteratorRules_th no longer goes to runtime.
  65 #     They are used at JDK build phase in order to create $(BIFILES) which
  66 #     are used on runtime instead.
  67 #
  68 TEXT_SRCDIR = $(SHARE_SRC)/classes/sun/text/resources
  69 BIRULES = $(TEXT_SRCDIR)/BreakIteratorRules.java \
  70           $(TEXT_SRCDIR)/BreakIteratorRules_th.java
  71 BIINFO = $(TEXT_SRCDIR)/BreakIteratorInfo_th.java
  72 UNICODEDATA = $(BUILDDIR)/tools/UnicodeData
  73 
  74 # output
  75 BIFILES = $(CLASSDESTDIR)/sun/text/resources/WordBreakIteratorData_th \
  76           $(CLASSDESTDIR)/sun/text/resources/LineBreakIteratorData_th
  77 
  78 # builder
  79 GENERATEBREAKITERATORDATA_JARFILE = \
  80     $(BUILDTOOLJARDIR)/generatebreakiteratordata.jar
  81 
  82 $(BIFILES): $(GENERATEBREAKITERATORDATA_JARFILE) $(BIRULES) $(BIINFO) \
  83     $(UNICODEDATA)/UnicodeData.txt
  84         $(prep-target)
  85         $(MKDIR) -p $(TEXT_CLASSES)
  86         $(BOOT_JAVAC_CMD) -d $(TEXT_CLASSES) \
  87                 -sourcepath $(TEXT_SRCDIR) \
  88                 $(BIRULES) $(BIINFO)
  89         $(BOOT_JAVA_CMD) -Xbootclasspath/p:$(TEXT_CLASSES) \
  90                 -jar $(GENERATEBREAKITERATORDATA_JARFILE) \
  91                 -o $(CLASSDESTDIR)/sun/text/resources \
  92                 -spec $(UNICODEDATA)/UnicodeData.txt \
  93                 -language th
  94         @$(java-vm-cleanup)
  95 
  96 clean::
  97         $(RM) -r $(TEXT_CLASSES)
  98         $(RM) -r $(BIFILES)
  99 #
 100 # End of rules to add data files for BreakIterator
 101 #
 102 
 103 #
 104 # Extra rules to build locale data.
 105 #
 106 LOCALEDATA_JAR = $(EXTDIR)/localedata.jar
 107 
 108 SPECIALFILES = $(CLASSDESTDIR)/sun/text/resources/thai_dict
 109 
 110 $(CLASSDESTDIR)/sun/text/resources/% : $(TEXT_SRCDIR)/%
 111         $(install-file)
 112 
 113 $(LOCALEDATA_JAR): $(EXTDIR) $(FILES_class) $(BIFILES) $(SPECIALFILES)
 114         $(prep-target)
 115         $(BOOT_JAR_CMD) -cf $@ -C $(CLASSDESTDIR) sun \
 116              $(BOOT_JAR_JFLAGS)
 117         @$(java-vm-cleanup)
 118 
 119 build: $(LOCALEDATA_JAR)
 120 
 121 clean clobber::
 122         $(RM) -r $(CLASSDESTDIR) 
 123         $(RM) $(LOCALEDATA_JAR)
 124