1 #
   2 # Copyright (c) 1996, 2006, 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 BUILDDIR = ../../..
  27 MODULE  = base
  28 PACKAGE = java.text
  29 PRODUCT = sun
  30 
  31 include $(BUILDDIR)/common/Defs.gmk
  32 
  33 #
  34 # Files
  35 #
  36 include FILES_java.gmk
  37 
  38 #
  39 # Include
  40 #
  41 include $(BUILDDIR)/common/Classes.gmk
  42 
  43 #
  44 # Rules to add data files BreakIterator
  45 #
  46 TEXT_CLASSES = $(BUILDTOOLCLASSDIR)/java.text/classes
  47 
  48 # input
  49 #
  50 #   Notes: sun.text.resources.BreakIteratorRules no longer goes to runtime.
  51 #     They are used at JDK build phase in order to create $(BIFILES) which
  52 #     are used on runtime instead.
  53 #
  54 TEXT_SRCDIR  = $(SHARE_SRC)/classes/sun/text/resources
  55 TEXT_SOURCES = $(TEXT_SRCDIR)/BreakIteratorRules.java \
  56                $(TEXT_SRCDIR)/BreakIteratorInfo.java
  57 UNICODEDATA  = $(BUILDDIR)/tools/UnicodeData
  58 
  59 # output
  60 TEXT_CLASSDIR  = $(CLASSBINDIR)/sun/text/resources
  61 BIFILES = $(TEXT_CLASSDIR)/CharacterBreakIteratorData \
  62           $(TEXT_CLASSDIR)/WordBreakIteratorData \
  63           $(TEXT_CLASSDIR)/LineBreakIteratorData \
  64           $(TEXT_CLASSDIR)/SentenceBreakIteratorData
  65 
  66 ICU_FILES = $(TEXT_CLASSDIR)/unorm.icu \
  67             $(TEXT_CLASSDIR)/uprops.icu \
  68             $(TEXT_CLASSDIR)/ubidi.icu
  69 
  70 # builder
  71 GENERATEBREAKITERATORDATA_JARFILE = \
  72     $(BUILDTOOLJARDIR)/generatebreakiteratordata.jar
  73 
  74 $(BIFILES): $(GENERATEBREAKITERATORDATA_JARFILE) \
  75     $(UNICODEDATA)/UnicodeData.txt \
  76     $(TEXT_SOURCES)
  77         $(prep-target)
  78         $(RM) -r $(TEXT_CLASSES)
  79         $(MKDIR) -p $(TEXT_CLASSES)
  80         $(BOOT_JAVAC_CMD) -d $(TEXT_CLASSES) \
  81                 -sourcepath $(TEXT_SRCDIR) \
  82                 $(TEXT_SOURCES)
  83         $(MKDIR) -p  $(TEXT_CLASSDIR)
  84         $(BOOT_JAVA_CMD) -Xbootclasspath/p:$(TEXT_CLASSES) \
  85                 -jar $(GENERATEBREAKITERATORDATA_JARFILE) \
  86                 -o $(TEXT_CLASSDIR) \
  87                 -spec $(UNICODEDATA)/UnicodeData.txt
  88         @$(java-vm-cleanup)
  89 
  90 build: $(BIFILES) $(ICU_FILES)
  91 
  92 #
  93 # Extra rules to copy unorm.icu, uprops.icu, and ubidi.icu
  94 #
  95 $(TEXT_CLASSDIR)/unorm.icu: $(TEXT_SRCDIR)/unorm.icu
  96         $(install-file)
  97 
  98 $(TEXT_CLASSDIR)/uprops.icu: $(TEXT_SRCDIR)/uprops.icu
  99         $(install-file)
 100 
 101 $(TEXT_CLASSDIR)/ubidi.icu: $(TEXT_SRCDIR)/ubidi.icu
 102         $(install-file)
 103 
 104 clean clobber::
 105         $(RM) -r $(TEXT_CLASSES)
 106         $(RM) -r $(BIFILES)
 107         $(RM) $(ICU_FILES)
 108