|
1 # |
|
2 # Copyright (c) 1996, 2011, 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 character converters. |
|
28 # |
|
29 |
|
30 BUILDDIR = ../../.. |
|
31 |
|
32 # charsets should be separated from nio module |
|
33 PACKAGE = sun.nio |
|
34 PRODUCT = sun |
|
35 |
|
36 # This re-directs all the class files to a separate location |
|
37 CLASSDESTDIR = $(TEMPDIR)/classes |
|
38 |
|
39 JAVAC_MAX_WARNINGS = false |
|
40 JAVAC_LINT_OPTIONS = -Xlint:all,-deprecation |
|
41 JAVAC_WARNINGS_FATAL = true |
|
42 include $(BUILDDIR)/common/Defs.gmk |
|
43 |
|
44 # |
|
45 # Files |
|
46 # |
|
47 include FILES_java.gmk |
|
48 AUTO_FILES_JAVA_DIRS = sun/nio/cs/ext |
|
49 |
|
50 # For Cygwin, command line arguments that are paths must be converted to |
|
51 # windows style paths. These paths cannot be used as targets, however, because |
|
52 # the ":" in them will interfere with GNU Make rules, generating "multiple |
|
53 # target pattern" errors. |
|
54 |
|
55 # this define is for the rule: |
|
56 CHARSETS_JAR = $(LIBDIR)/charsets.jar |
|
57 |
|
58 # extcs |
|
59 FILES_genout_extcs = $(FILES_gen_extcs:%.java=$(GENSRCDIR)/%.java) |
|
60 |
|
61 # |
|
62 # These sun.awt charsets use sun/nio/cs/ext charsets that only exist |
|
63 # in JDK7 charsets.jar, which causes problem when build the symbol |
|
64 # table for rt.jar in Release.gmk. They are now removed from the |
|
65 # rt.jar when building jdk/jre image (in Release.gmk), so add them |
|
66 # into charsets.jar here |
|
67 # |
|
68 ifeq ($(PLATFORM), windows) |
|
69 FILES_src += \ |
|
70 sun/awt/HKSCS.java |
|
71 else |
|
72 # Solaris/Linux |
|
73 FILES_src += \ |
|
74 sun/awt/HKSCS.java \ |
|
75 sun/awt/motif/X11GB2312.java \ |
|
76 sun/awt/motif/X11GBK.java \ |
|
77 sun/awt/motif/X11KSC5601.java |
|
78 endif # PLATFORM |
|
79 |
|
80 # |
|
81 # Rules |
|
82 # |
|
83 include $(BUILDDIR)/common/Classes.gmk |
|
84 |
|
85 build: $(FILES_genout_extcs) $(CHARSETS_JAR) |
|
86 |
|
87 # |
|
88 # Extra rules to build character converters. |
|
89 |
|
90 SERVICE_DESCRIPTION = java.nio.charset.spi.CharsetProvider |
|
91 SERVICE_DESCRIPTION_PATH = META-INF/services/$(SERVICE_DESCRIPTION) |
|
92 |
|
93 GENCSDATASRC = ../../../../make/tools/CharsetMapping |
|
94 GENCSSRCDIR = ../../../../make/tools/src/build/tools/charsetmapping |
|
95 GENCSEXT = $(GENSRCDIR)/sun/nio/cs/ext |
|
96 |
|
97 FILES_MAP = $(GENCSDATASRC)/sjis0213.map |
|
98 FILES_DAT = $(CLASSDESTDIR)/sun/nio/cs/ext/sjis0213.dat |
|
99 |
|
100 $(FILES_DAT): $(FILES_MAP) |
|
101 @$(prep-target) |
|
102 $(TOOL_CHARSETMAPPING) \ |
|
103 $(FILES_MAP) $(FILES_DAT) sjis0213 |
|
104 |
|
105 |
|
106 $(FILES_genout_extcs): \ |
|
107 $(GENCSDATASRC)/SingleByte-X.java.template \ |
|
108 $(GENCSDATASRC)/DoubleByte-X.java.template \ |
|
109 $(GENCSDATASRC)/extsbcs $(GENCSDATASRC)/dbcs |
|
110 @$(prep-target) |
|
111 $(RM) -r $(GENCSEXT) |
|
112 $(MKDIR) -p $(GENCSEXT) |
|
113 $(TOOL_CHARSETMAPPING) $(GENCSDATASRC) $(GENCSEXT) extsbcs |
|
114 $(TOOL_CHARSETMAPPING) $(GENCSDATASRC) $(GENCSEXT) euctw \ |
|
115 $(GENCSSRCDIR)/EUC_TW.java |
|
116 $(TOOL_CHARSETMAPPING) $(GENCSDATASRC) $(GENCSEXT) hkscs \ |
|
117 $(GENCSSRCDIR)/HKSCS.java |
|
118 $(TOOL_CHARSETMAPPING) $(GENCSDATASRC) $(GENCSEXT) dbcs |
|
119 |
|
120 $(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH): \ |
|
121 $(SHARE_SRC)/classes/sun/nio/cs/ext/$(SERVICE_DESCRIPTION_PATH) |
|
122 $(install-file) |
|
123 |
|
124 # no compression unless requested |
|
125 ifndef COMPRESS_JARS |
|
126 CREATE_JAR_OPTS_NOMANIFEST = cf0 |
|
127 else |
|
128 CREATE_JAR_OPTS_NOMANIFEST = cf |
|
129 endif |
|
130 |
|
131 $(CHARSETS_JAR): $(FILES_class) $(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH) $(FILES_DAT) |
|
132 $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS_NOMANIFEST) $(CHARSETS_JAR) \ |
|
133 -C $(CLASSDESTDIR) sun \ |
|
134 -C $(CLASSDESTDIR) $(SERVICE_DESCRIPTION_PATH) \ |
|
135 $(BOOT_JAR_JFLAGS) |
|
136 @$(java-vm-cleanup) |
|
137 |
|
138 clean:: |
|
139 $(RM) -r $(CLASSDESTDIR) |
|
140 $(RM) $(CHARSETS_JAR) |