ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 1 | # |
alanb | 0d05823 | 2012-11-02 15:50:11 +0000 | [diff] [blame] | 2 | # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 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 | # Make file for generating BreakIterator data files. |
| 28 | # |
| 29 | |
| 30 | # input |
| 31 | # |
| 32 | # Notes: sun.text.resources.BreakIteratorRules no longer goes to runtime. |
| 33 | # They are used at JDK build phase in order to create $(BIFILES) which |
| 34 | # are used on runtime instead. |
| 35 | # |
| 36 | TEXT_SRCDIR = $(JDK_TOPDIR)/src/share/classes |
| 37 | TEXT_PKG = sun/text/resources |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 38 | TEXT_SOURCES = $(TEXT_PKG)/BreakIteratorRules.java \ |
| 39 | $(TEXT_PKG)/BreakIteratorInfo.java \ |
naoto | c378ffc | 2012-08-21 11:00:30 -0700 | [diff] [blame] | 40 | $(TEXT_PKG)/th/BreakIteratorRules_th.java \ |
| 41 | $(TEXT_PKG)/th/BreakIteratorInfo_th.java |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 42 | |
| 43 | # Generate BreakIteratorData |
| 44 | BREAK_ITERATOR_DIR = $(JDK_OUTPUTDIR)/break_iterator |
| 45 | BREAK_ITERATOR_CLASSES = $(BREAK_ITERATOR_DIR)/classes |
| 46 | |
| 47 | # JAVAC_SOURCE_PATH_UGLY_OVERRIDE is set to isolate the compile to just those |
| 48 | # two files in that directory and not get anything implicit from |
| 49 | # surrounding directories which aren't jdk 6 compatible. |
| 50 | # Because we are targeting jdk 6, but the surrounding source code is jdk 7. Ugh. |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 51 | # These two files should be moved out to a build tool! We have to disable |
| 52 | # sjavac here as well. |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 53 | $(eval $(call SetupJavaCompilation,BUILD_BREAKITERATOR,\ |
| 54 | SETUP:=GENERATE_OLDBYTECODE,\ |
| 55 | SRC:=$(TEXT_SRCDIR),\ |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 56 | DISABLE_SJAVAC:=true,\ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 57 | JAVAC_SOURCE_PATH_UGLY_OVERRIDE:=$(TEXT_SRCDIR)/$(TEXT_PKG),\ |
| 58 | INCLUDES:=$(TEXT_PKG),\ |
| 59 | INCLUDE_FILES:=$(TEXT_SOURCES),\ |
| 60 | BIN:=$(BREAK_ITERATOR_CLASSES))) |
| 61 | |
| 62 | # Generate data resource files. |
| 63 | # input |
| 64 | UNICODEDATA = $(JDK_TOPDIR)/make/tools/UnicodeData/UnicodeData.txt |
| 65 | |
| 66 | # output |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 67 | DATA_PKG_DIR = $(JDK_OUTPUTDIR)/classes/sun/text/resources |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 68 | BIFILES = $(DATA_PKG_DIR)/CharacterBreakIteratorData \ |
| 69 | $(DATA_PKG_DIR)/WordBreakIteratorData \ |
| 70 | $(DATA_PKG_DIR)/LineBreakIteratorData \ |
| 71 | $(DATA_PKG_DIR)/SentenceBreakIteratorData |
naoto | c378ffc | 2012-08-21 11:00:30 -0700 | [diff] [blame] | 72 | BIFILES_TH = $(DATA_PKG_DIR)/th/WordBreakIteratorData_th \ |
| 73 | $(DATA_PKG_DIR)/th/LineBreakIteratorData_th |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 74 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 75 | $(BIFILES): $(DATA_PKG_DIR)/_the.bifiles |
| 76 | $(DATA_PKG_DIR)/_the.bifiles: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES) |
| 77 | $(DATA_PKG_DIR)/_the.bifiles: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 78 | $(ECHO) $(LOG_INFO) "Generating BreakIteratorData" |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 79 | $(MKDIR) -p $(DATA_PKG_DIR) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 80 | $(RM) $(BIFILES) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 81 | $(TOOL_GENERATEBREAKITERATORDATA) \ |
| 82 | -o $(DATA_PKG_DIR) \ |
| 83 | -spec $(UNICODEDATA) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 84 | $(TOUCH) $@ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 85 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 86 | $(BIFILES_TH): $(DATA_PKG_DIR)/_the.bifiles_th |
| 87 | $(DATA_PKG_DIR)/_the.bifiles_th: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES) |
| 88 | $(DATA_PKG_DIR)/_the.bifiles_th: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 89 | $(ECHO) $(LOG_INFO) "Generating BreakIteratorData_th" |
naoto | c378ffc | 2012-08-21 11:00:30 -0700 | [diff] [blame] | 90 | $(MKDIR) -p $(DATA_PKG_DIR)/th |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 91 | $(RM) $(BIFILES_TH) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 92 | $(TOOL_GENERATEBREAKITERATORDATA) \ |
| 93 | -o $(DATA_PKG_DIR) \ |
| 94 | -spec $(UNICODEDATA) \ |
| 95 | -language th |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 96 | $(TOUCH) $@ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 97 | |
| 98 | |
| 99 | BREAK_ITERATOR += $(BIFILES) $(BIFILES_TH) |