jdk/make/sun/nio/Makefile
author ohair
Wed, 28 Oct 2009 12:54:37 -0700
changeset 4115 e09be02771b6
parent 3052 5c9886498f31
child 4341 2af5eacd4b24
permissions -rw-r--r--
6888701: Change all template java source files to a .java-template file suffix Reviewed-by: jjg, alanb, mr
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
400
9f3afee24320 6529796: Support JIS X 0213:2004 in existing JDK versions, especially for Windows Vista
sherman
parents: 2
diff changeset
     2
# Copyright 1996-2008 Sun Microsystems, Inc.  All Rights Reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
# have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
# Makefile for character converters.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
BUILDDIR = ../..
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
PACKAGE = sun.nio
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
PRODUCT = sun
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
# This re-directs all the class files to a separate location
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
CLASSDESTDIR = $(TEMPDIR)/classes
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
OTHER_JAVACFLAGS += -Xlint:serial -Werror
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
include $(BUILDDIR)/common/Defs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
# Files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
include FILES_java.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
AUTO_FILES_JAVA_DIRS = sun/nio/cs/ext
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
# For Cygwin, command line arguments that are paths must be converted to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
# windows style paths. These paths cannot be used as targets, however, because 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
# the ":" in them  will interfere with GNU Make rules, generating "multiple
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
# target pattern" errors.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
# this define is for the rule:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
CHARSETS_JAR = $(LIBDIR)/charsets.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
2921
d9d491a5a169 6843578: Re-implement IBM doublebyte charsets
sherman
parents: 2913
diff changeset
    55
# extcs
2913
39a9cc073b84 6831794: charset EUC_TW is 12.6% of the total size of charsets.jar
sherman
parents: 1713
diff changeset
    56
FILES_genout_extcs = $(FILES_gen_extcs:%.java=$(GENSRCDIR)/%.java)
1713
f8b8bfa64fc1 6642323: Speeding up Single Byte Decoders
sherman
parents: 916
diff changeset
    57
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
# Rules
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
include $(BUILDDIR)/common/Classes.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
2913
39a9cc073b84 6831794: charset EUC_TW is 12.6% of the total size of charsets.jar
sherman
parents: 1713
diff changeset
    63
build: $(FILES_genout_extcs) $(CHARSETS_JAR)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
# Extra rules to build character converters.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
SERVICE_DESCRIPTION = java.nio.charset.spi.CharsetProvider
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
SERVICE_DESCRIPTION_PATH = META-INF/services/$(SERVICE_DESCRIPTION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
400
9f3afee24320 6529796: Support JIS X 0213:2004 in existing JDK versions, especially for Windows Vista
sherman
parents: 2
diff changeset
    71
GENCSDATASRC = $(BUILDDIR)/tools/CharsetMapping
2913
39a9cc073b84 6831794: charset EUC_TW is 12.6% of the total size of charsets.jar
sherman
parents: 1713
diff changeset
    72
GENCSSRCDIR = $(BUILDDIR)/tools/src/build/tools/charsetmapping
1713
f8b8bfa64fc1 6642323: Speeding up Single Byte Decoders
sherman
parents: 916
diff changeset
    73
GENCSEXT = $(GENSRCDIR)/sun/nio/cs/ext
f8b8bfa64fc1 6642323: Speeding up Single Byte Decoders
sherman
parents: 916
diff changeset
    74
400
9f3afee24320 6529796: Support JIS X 0213:2004 in existing JDK versions, especially for Windows Vista
sherman
parents: 2
diff changeset
    75
FILES_MAP = $(GENCSDATASRC)/sjis0213.map
9f3afee24320 6529796: Support JIS X 0213:2004 in existing JDK versions, especially for Windows Vista
sherman
parents: 2
diff changeset
    76
FILES_DAT = $(CLASSDESTDIR)/sun/nio/cs/ext/sjis0213.dat
9f3afee24320 6529796: Support JIS X 0213:2004 in existing JDK versions, especially for Windows Vista
sherman
parents: 2
diff changeset
    77
CHARSETMAPPING_JARFILE = $(BUILDTOOLJARDIR)/charsetmapping.jar
9f3afee24320 6529796: Support JIS X 0213:2004 in existing JDK versions, especially for Windows Vista
sherman
parents: 2
diff changeset
    78
9f3afee24320 6529796: Support JIS X 0213:2004 in existing JDK versions, especially for Windows Vista
sherman
parents: 2
diff changeset
    79
$(FILES_DAT): $(FILES_MAP)
9f3afee24320 6529796: Support JIS X 0213:2004 in existing JDK versions, especially for Windows Vista
sherman
parents: 2
diff changeset
    80
	@$(prep-target)
9f3afee24320 6529796: Support JIS X 0213:2004 in existing JDK versions, especially for Windows Vista
sherman
parents: 2
diff changeset
    81
	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) \
2913
39a9cc073b84 6831794: charset EUC_TW is 12.6% of the total size of charsets.jar
sherman
parents: 1713
diff changeset
    82
		$(FILES_MAP) $(FILES_DAT) sjis0213
400
9f3afee24320 6529796: Support JIS X 0213:2004 in existing JDK versions, especially for Windows Vista
sherman
parents: 2
diff changeset
    83
1713
f8b8bfa64fc1 6642323: Speeding up Single Byte Decoders
sherman
parents: 916
diff changeset
    84
2921
d9d491a5a169 6843578: Re-implement IBM doublebyte charsets
sherman
parents: 2913
diff changeset
    85
$(FILES_genout_extcs): $(GENCSDATASRC)/SingleByte-X.java  $(GENCSDATASRC)/DoubleByte-X.java \
d9d491a5a169 6843578: Re-implement IBM doublebyte charsets
sherman
parents: 2913
diff changeset
    86
		$(GENCSDATASRC)/extsbcs $(GENCSDATASRC)/dbcs
1713
f8b8bfa64fc1 6642323: Speeding up Single Byte Decoders
sherman
parents: 916
diff changeset
    87
	@$(prep-target)
f8b8bfa64fc1 6642323: Speeding up Single Byte Decoders
sherman
parents: 916
diff changeset
    88
	$(RM) -r $(GENCSEXT)
f8b8bfa64fc1 6642323: Speeding up Single Byte Decoders
sherman
parents: 916
diff changeset
    89
	$(MKDIR) -p $(GENCSEXT)
2913
39a9cc073b84 6831794: charset EUC_TW is 12.6% of the total size of charsets.jar
sherman
parents: 1713
diff changeset
    90
	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE)	$(GENCSDATASRC) $(GENCSEXT) extsbcs
39a9cc073b84 6831794: charset EUC_TW is 12.6% of the total size of charsets.jar
sherman
parents: 1713
diff changeset
    91
	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) euctw \
39a9cc073b84 6831794: charset EUC_TW is 12.6% of the total size of charsets.jar
sherman
parents: 1713
diff changeset
    92
		$(GENCSSRCDIR)/GenerateEUC_TW.java
2921
d9d491a5a169 6843578: Re-implement IBM doublebyte charsets
sherman
parents: 2913
diff changeset
    93
	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) dbcs
1713
f8b8bfa64fc1 6642323: Speeding up Single Byte Decoders
sherman
parents: 916
diff changeset
    94
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
$(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH): \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
  $(SHARE_SRC)/classes/sun/nio/cs/ext/$(SERVICE_DESCRIPTION_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
	$(install-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
400
9f3afee24320 6529796: Support JIS X 0213:2004 in existing JDK versions, especially for Windows Vista
sherman
parents: 2
diff changeset
    99
$(CHARSETS_JAR): $(FILES_class) $(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH) $(FILES_DAT)
3052
5c9886498f31 6299219: euro sign failed to be printed in Console on Localized Windows platform with GBK encoding
sherman
parents: 2921
diff changeset
   100
	$(BOOT_JAR_CMD) cf0 $(CHARSETS_JAR) \
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
	      -C $(CLASSDESTDIR) sun \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
	      -C $(CLASSDESTDIR) $(SERVICE_DESCRIPTION_PATH)  \
916
867515b155b5 6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents: 400
diff changeset
   103
	      $(BOOT_JAR_JFLAGS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
	@$(java-vm-cleanup)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
clean::
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
	$(RM) -r $(CLASSDESTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
	$(RM) $(CHARSETS_JAR)