jdk/makefiles/GensrcCharsetCoder.gmk
author ctornqvi
Thu, 16 May 2013 15:31:00 +0200
changeset 17598 f78d22d3c6c2
parent 14231 a0c23c1c010f
child 20547 453837141fac
permissions -rw-r--r--
8008169: test/runtime/7158804/Test7158804.sh has bad copyright header Summary: Re-wrote test in Java in addition to fixing the Copyright notice. Also reviewed by leonid.mesnik@oracle.com Reviewed-by: coleenp, ctornqvi Contributed-by: Mikhailo Seledtsov <mikhailo.seledtsov@oracle.com>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     1
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     2
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     4
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    10
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    15
# accompanied this code).
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    16
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    20
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    23
# questions.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    24
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    25
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    26
GENSRC_CHARSETCODER :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    27
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    28
GENSRC_CHARSETCODER_TMP := $(JDK_OUTPUTDIR)/gensrc
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    29
GENSRC_CHARSETCODER_DST := $(JDK_OUTPUTDIR)/gensrc/java/nio/charset
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    30
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    31
GENSRC_CHARSETCODER_SRC := $(JDK_TOPDIR)/src/share/classes/java/nio
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    32
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    33
GENSRC_CHARSETCODER_TEMPLATE := $(GENSRC_CHARSETCODER_SRC)/charset/Charset-X-Coder.java.template
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    34
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    35
###
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    36
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    37
$(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java : $(GENSRC_CHARSETCODER_TEMPLATE)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    38
	$(MKDIR) -p $(@D)
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 12892
diff changeset
    39
	-$(RM) $@.tmp
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 12892
diff changeset
    40
	$(TOOL_SPP) < $< >$@.tmp \
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    41
		-Kdecoder \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    42
		-DA='A' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    43
		-Da='a' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    44
		-DCode='Decode' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    45
		-Dcode='decode' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    46
		-DitypesPhrase='bytes in a specific charset' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    47
		-DotypesPhrase='sixteen-bit Unicode characters' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    48
		-Ditype='byte' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    49
		-Dotype='character' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    50
		-DItype='Byte' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    51
		-DOtype='Char' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    52
		-Dcoder='decoder' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    53
		-DCoder='Decoder' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    54
		-Dcoding='decoding' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    55
		-DOtherCoder='Encoder' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    56
		-DreplTypeName='string' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    57
		-DdefaultRepl='"\\uFFFD"' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    58
		-DdefaultReplName='<tt>"\&#92;uFFFD"<\/tt>' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    59
		-DreplType='String' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    60
		-DreplFQType='java.lang.String' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    61
		-DreplLength='length()' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    62
		-DItypesPerOtype='CharsPerByte' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    63
		-DnotLegal='not legal for this charset' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    64
		-Dotypes-per-itype='chars-per-byte' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    65
		-DoutSequence='Unicode character'
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 12892
diff changeset
    66
	$(MV) $@.tmp $@
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    67
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    68
GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    69
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    70
###
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    71
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    72
$(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java : $(GENSRC_CHARSETCODER_TEMPLATE)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    73
	$(MKDIR) -p $(@D)
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 12892
diff changeset
    74
	-$(RM) $@.tmp
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 12892
diff changeset
    75
	$(TOOL_SPP) < $< >$@.tmp \
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    76
		-Kencoder \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    77
		-DA='An' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    78
		-Da='an' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    79
		-DCode='Encode' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    80
		-Dcode='encode' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    81
		-DitypesPhrase='sixteen-bit Unicode characters' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    82
		-DotypesPhrase='bytes in a specific charset' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    83
		-Ditype='character' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    84
		-Dotype='byte' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    85
		-DItype='Char' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    86
		-DOtype='Byte' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    87
		-Dcoder='encoder' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    88
		-DCoder='Encoder' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    89
		-Dcoding='encoding' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    90
		-DOtherCoder='Decoder' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    91
		-DreplTypeName='byte array' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    92
		-DdefaultRepl='new byte[] { (byte)'"'"\\?"'"' }' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    93
		-DdefaultReplName='<tt>{<\/tt>\&nbsp;<tt>(byte)'"'"\\?"'"'<\/tt>\&nbsp;<tt>}<\/tt>' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    94
		-DreplType='byte[]' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    95
		-DreplFQType='byte[]' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    96
		-DreplLength='length' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    97
		-DItypesPerOtype='BytesPerChar' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    98
		-DnotLegal='not a legal sixteen-bit Unicode sequence' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    99
		-Dotypes-per-itype='bytes-per-char' \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   100
		-DoutSequence='byte sequence in the given charset'
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 12892
diff changeset
   101
	$(MV) $@.tmp $@
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   102
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   103
GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   104
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   105
###
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   106
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   107
$(GENSRC_CHARSETCODER) : $(BUILD_TOOLS)