make/gensrc/GensrcCharsetCoder.gmk

Print this page


   1 #
   2 # Copyright (c) 2011, 2013, 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 GENSRC_CHARSETCODER :=
  27 
  28 GENSRC_CHARSETCODER_TMP := $(JDK_OUTPUTDIR)/gensrc
  29 GENSRC_CHARSETCODER_DST := $(JDK_OUTPUTDIR)/gensrc/java.base/java/nio/charset
  30 
  31 GENSRC_CHARSETCODER_SRC := $(JDK_TOPDIR)/src/java.base/share/classes/java/nio
  32 
  33 GENSRC_CHARSETCODER_TEMPLATE := $(GENSRC_CHARSETCODER_SRC)/charset/Charset-X-Coder.java.template
  34 
  35 ###
  36 
  37 $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
  38         $(MKDIR) -p $(@D)
  39         -$(RM) $@.tmp
  40         $(TOOL_SPP) < $< >$@.tmp \
  41             -Kdecoder \
  42             -DA='A' \
  43             -Da='a' \
  44             -DCode='Decode' \
  45             -Dcode='decode' \
  46             -DitypesPhrase='bytes in a specific charset' \
  47             -DotypesPhrase='sixteen-bit Unicode characters' \
  48             -Ditype='byte' \
  49             -Dotype='character' \
  50             -DItype='Byte' \
  51             -DOtype='Char' \
  52             -Dcoder='decoder' \
  53             -DCoder='Decoder' \
  54             -Dcoding='decoding' \
  55             -DOtherCoder='Encoder' \
  56             -DreplTypeName='string' \
  57             -DdefaultRepl='"\\uFFFD"' \
  58             -DdefaultReplName='<tt>"\\uFFFD"<\/tt>' \
  59             -DreplType='String' \
  60             -DreplFQType='java.lang.String' \
  61             -DreplLength='length()' \
  62             -DItypesPerOtype='CharsPerByte' \
  63             -DnotLegal='not legal for this charset' \
  64             -Dotypes-per-itype='chars-per-byte' \
  65             -DoutSequence='Unicode character'
  66         $(MV) $@.tmp $@
  67 
  68 GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java
  69 
  70 ###
  71 
  72 $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
  73         $(MKDIR) -p $(@D)
  74         -$(RM) $@.tmp
  75         $(TOOL_SPP) < $< >$@.tmp \
  76             -Kencoder \
  77             -DA='An' \
  78             -Da='an' \
  79             -DCode='Encode' \
  80             -Dcode='encode' \
  81             -DitypesPhrase='sixteen-bit Unicode characters' \
  82             -DotypesPhrase='bytes in a specific charset' \
  83             -Ditype='character' \
  84             -Dotype='byte' \
  85             -DItype='Char' \
  86             -DOtype='Byte' \
  87             -Dcoder='encoder' \
  88             -DCoder='Encoder' \
  89             -Dcoding='encoding' \
  90             -DOtherCoder='Decoder' \
  91             -DreplTypeName='byte array' \
  92             -DdefaultRepl='new byte[] { (byte)'"'"\\?"'"' }' \
  93             -DdefaultReplName='<tt>{<\/tt>\&nbsp;<tt>(byte)'"'"\\?"'"'<\/tt>\&nbsp;<tt>}<\/tt>' \
  94             -DreplType='byte[]' \
  95             -DreplFQType='byte[]' \
  96             -DreplLength='length' \
  97             -DItypesPerOtype='BytesPerChar' \
  98             -DnotLegal='not a legal sixteen-bit Unicode sequence' \
  99             -Dotypes-per-itype='bytes-per-char' \
 100             -DoutSequence='byte sequence in the given charset'
 101         $(MV) $@.tmp $@
 102 
 103 GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java
 104 GENSRC_JAVA_BASE += $(GENSRC_CHARSETCODER)
 105 
 106 ###
 107 
 108 $(GENSRC_CHARSETCODER): $(BUILD_TOOLS_JDK)
   1 #
   2 # Copyright (c) 2011, 2014, 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 GENSRC_CHARSETCODER :=
  27 
  28 GENSRC_CHARSETCODER_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio/charset

  29 
  30 GENSRC_CHARSETCODER_SRC := $(JDK_TOPDIR)/src/java.base/share/classes/java/nio
  31 
  32 GENSRC_CHARSETCODER_TEMPLATE := $(GENSRC_CHARSETCODER_SRC)/charset/Charset-X-Coder.java.template
  33 
  34 ################################################################################
  35 
  36 $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
  37         $(MKDIR) -p $(@D)
  38         -$(RM) $@.tmp
  39         $(TOOL_SPP) < $< >$@.tmp \
  40             -Kdecoder \
  41             -DA='A' \
  42             -Da='a' \
  43             -DCode='Decode' \
  44             -Dcode='decode' \
  45             -DitypesPhrase='bytes in a specific charset' \
  46             -DotypesPhrase='sixteen-bit Unicode characters' \
  47             -Ditype='byte' \
  48             -Dotype='character' \
  49             -DItype='Byte' \
  50             -DOtype='Char' \
  51             -Dcoder='decoder' \
  52             -DCoder='Decoder' \
  53             -Dcoding='decoding' \
  54             -DOtherCoder='Encoder' \
  55             -DreplTypeName='string' \
  56             -DdefaultRepl='"\\uFFFD"' \
  57             -DdefaultReplName='<tt>"\\uFFFD"<\/tt>' \
  58             -DreplType='String' \
  59             -DreplFQType='java.lang.String' \
  60             -DreplLength='length()' \
  61             -DItypesPerOtype='CharsPerByte' \
  62             -DnotLegal='not legal for this charset' \
  63             -Dotypes-per-itype='chars-per-byte' \
  64             -DoutSequence='Unicode character'
  65         $(MV) $@.tmp $@
  66 
  67 GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java
  68 
  69 ################################################################################
  70 
  71 $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
  72         $(MKDIR) -p $(@D)
  73         -$(RM) $@.tmp
  74         $(TOOL_SPP) < $< >$@.tmp \
  75             -Kencoder \
  76             -DA='An' \
  77             -Da='an' \
  78             -DCode='Encode' \
  79             -Dcode='encode' \
  80             -DitypesPhrase='sixteen-bit Unicode characters' \
  81             -DotypesPhrase='bytes in a specific charset' \
  82             -Ditype='character' \
  83             -Dotype='byte' \
  84             -DItype='Char' \
  85             -DOtype='Byte' \
  86             -Dcoder='encoder' \
  87             -DCoder='Encoder' \
  88             -Dcoding='encoding' \
  89             -DOtherCoder='Decoder' \
  90             -DreplTypeName='byte array' \
  91             -DdefaultRepl='new byte[] { (byte)'"'"\\?"'"' }' \
  92             -DdefaultReplName='<tt>{<\/tt>\&nbsp;<tt>(byte)'"'"\\?"'"'<\/tt>\&nbsp;<tt>}<\/tt>' \
  93             -DreplType='byte[]' \
  94             -DreplFQType='byte[]' \
  95             -DreplLength='length' \
  96             -DItypesPerOtype='BytesPerChar' \
  97             -DnotLegal='not a legal sixteen-bit Unicode sequence' \
  98             -Dotypes-per-itype='bytes-per-char' \
  99             -DoutSequence='byte sequence in the given charset'
 100         $(MV) $@.tmp $@
 101 
 102 GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java
 103 GENSRC_JAVA_BASE += $(GENSRC_CHARSETCODER)
 104 
 105 ################################################################################
 106 
 107 $(GENSRC_CHARSETCODER): $(BUILD_TOOLS_JDK)