jdk/make/gensrc/GensrcCharsetMapping.gmk
author jmasa
Fri, 29 Aug 2014 08:14:19 -0700
changeset 26331 8f17e084029b
parent 25859 3317bb8137f4
child 26717 d65c07a65486
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     1
#
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
     2
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
12892
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
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 14231
diff changeset
    26
GENSRC_CHARSETMAPPING :=
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    27
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    28
CHARSET_DATA_DIR := $(JDK_TOPDIR)/make/data/charsetmapping
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    29
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    30
###
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    31
### Generate files using the charsetmapping tool
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    32
###
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    33
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    34
CHARSET_GENSRC_JAVA_DIR_CS := $(JDK_OUTPUTDIR)/gensrc/jdk.charsets/sun/nio/cs/ext
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    35
CHARSET_GENSRC_JAVA_DIR_BASE := $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/cs
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    36
CHARSET_DONE_CS := $(CHARSET_GENSRC_JAVA_DIR_CS)/_the.charsetmapping
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    37
CHARSET_DONE_BASE := $(CHARSET_GENSRC_JAVA_DIR_BASE)/_the.charsetmapping
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    38
CHARSET_COPYRIGHT_HEADER_BASE := $(JDK_TOPDIR)/make/src/classes/build/tools/charsetmapping
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    39
CHARSET_TEMPLATES := \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    40
    $(CHARSET_DATA_DIR)/SingleByte-X.java.template \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    41
    $(CHARSET_DATA_DIR)/DoubleByte-X.java.template
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    42
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    43
# This target should be referenced using the order-only operator (|)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    44
$(CHARSET_GENSRC_JAVA_DIR_CS):
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    45
	$(ECHO)	"Generating charset mappings"
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    46
	$(MKDIR) -p $(CHARSET_GENSRC_JAVA_DIR_CS)
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    47
	$(MKDIR) -p $(CHARSET_GENSRC_JAVA_DIR_BASE)
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    48
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    49
$(CHARSET_DONE_BASE)-sbcs: $(CHARSET_DATA_DIR)/sbcs \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    50
    $(CHARSET_TEMPLATES) $(BUILD_TOOLS_JDK) | $(CHARSET_GENSRC_JAVA_DIR_CS)
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    51
	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_BASE) sbcs
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    52
	$(TOUCH) '$@'
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    53
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    54
$(CHARSET_DONE_CS)-extsbcs: $(CHARSET_DATA_DIR)/extsbcs  \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    55
    $(CHARSET_DONE_BASE)-sbcs $(CHARSET_TEMPLATES) $(BUILD_TOOLS_JDK) 
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    56
	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) extsbcs
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    57
	$(TOUCH) '$@'
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    58
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    59
$(CHARSET_DONE_CS)-dbcs: $(CHARSET_DATA_DIR)/dbcs \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    60
    $(CHARSET_DONE_BASE)-sbcs $(CHARSET_TEMPLATES) $(BUILD_TOOLS_JDK) 
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    61
	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) dbcs
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    62
	$(TOUCH) '$@'
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    63
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    64
$(CHARSET_DONE_CS)-hkscs: $(CHARSET_COPYRIGHT_HEADER_BASE)/HKSCS.java \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    65
    $(CHARSET_DONE_BASE)-sbcs $(BUILD_TOOLS_JDK)
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    66
	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) hkscs '$<'
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    67
	$(TOUCH) '$@'
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    68
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    69
$(CHARSET_DONE_CS)-euctw: $(CHARSET_COPYRIGHT_HEADER_BASE)/EUC_TW.java \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    70
    $(CHARSET_DONE_BASE)-sbcs $(BUILD_TOOLS_JDK)
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    71
	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) euctw '$<'
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    72
	$(TOUCH) '$@'
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    73
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    74
$(CHARSET_GENSRC_JAVA_DIR_CS)/sjis0213.dat: $(CHARSET_DATA_DIR)/sjis0213.map \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    75
    $(CHARSET_DONE_BASE)-sbcs $(BUILD_TOOLS_JDK)
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    76
	$(TOOL_CHARSETMAPPING) '$<' '$@' sjis0213
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    77
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    78
GENSRC_JAVA_BASE += $(CHARSET_DONE_BASE)-sbcs
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    79
GENSRC_JDK_CHARSETS += \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    80
    $(CHARSET_DONE_CS)-extsbcs \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    81
    $(CHARSET_DONE_CS)-dbcs \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    82
    $(CHARSET_DONE_CS)-hkscs \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    83
    $(CHARSET_DONE_CS)-euctw \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
    84
    $(CHARSET_GENSRC_JAVA_DIR_CS)/sjis0213.dat \
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    85
    #
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    86
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    87
###
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    88
### Generate the sun/nio/cs/StandardCharsets.java file
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    89
###
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    90
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    91
CHARSET_STANDARD_GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc/standardcharsets
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    92
CHARSET_STANDARD_DATA := $(CHARSET_DATA_DIR)/standard-charsets
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    93
CHARSET_STANDARD_JAVA :=  sun/nio/cs/StandardCharsets.java
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    94
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    95
CHARSET_ALIASES_TABLES_AWK := ' \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    96
    BEGIN { n = 1; m = 1; } \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    97
    /^[ \t]*charset / { \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    98
      csn = $$2; cln = $$3; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    99
      lcsn = tolower(csn); \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   100
      lcsns[n++] = lcsn; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   101
      csns[lcsn] = csn; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   102
      classMap[lcsn] = cln; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   103
      if (n > 2) \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   104
        printf "    };\n\n"; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   105
      printf "    static final String[] aliases_%s = new String[] {\n", cln; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   106
    } \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   107
    /^[ \t]*alias / { \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   108
      acsns[m++] = tolower($$2); \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   109
      aliasMap[tolower($$2)] = lcsn; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   110
      printf "        \"%s\",\n", $$2; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   111
    } \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   112
    END { \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   113
      printf "    };\n\n"; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   114
    } '
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   115
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   116
CHARSET_ALIASES_MAP_AWK := ' \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   117
    /^[ \t]*charset / { \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   118
      csn = $$2; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   119
      lcsn = tolower(csn); \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   120
    } \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   121
    /^[ \t]*alias / { \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   122
      an = tolower($$2); \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   123
      printf "%-20s \"%s\"\n", an, lcsn; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   124
    } '
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   125
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   126
CHARSET_CLASSES_MAP_AWK := ' \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   127
    /^[ \t]*charset / { \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   128
      csn = $$2; cln = $$3; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   129
      lcsn = tolower(csn); \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   130
      printf "%-20s \"%s\"\n", lcsn, cln; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   131
    } '
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   132
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   133
# This target should be referenced using the order-only operator (|)
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   134
$(CHARSET_STANDARD_GENSRC_DIR):
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   135
	$(MKDIR) -p '$@'
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   136
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   137
$(CHARSET_STANDARD_GENSRC_DIR)/aliases-tables.java.snippet: $(CHARSET_STANDARD_DATA) \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   138
    | $(CHARSET_STANDARD_GENSRC_DIR)
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   139
	$(NAWK) < '$<' > '$@' $(CHARSET_ALIASES_TABLES_AWK)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   140
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   141
$(CHARSET_STANDARD_GENSRC_DIR)/aliases-map: $(CHARSET_STANDARD_DATA) \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   142
    | $(CHARSET_STANDARD_GENSRC_DIR)
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   143
	$(NAWK) < '$<' > '$@' $(CHARSET_ALIASES_MAP_AWK)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   144
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   145
$(CHARSET_STANDARD_GENSRC_DIR)/classes-map: $(CHARSET_STANDARD_DATA) \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   146
    | $(CHARSET_STANDARD_GENSRC_DIR)
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   147
	$(NAWK) < '$<' > '$@' $(CHARSET_CLASSES_MAP_AWK)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   148
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   149
$(CHARSET_STANDARD_GENSRC_DIR)/aliases-map.java.snippet: $(CHARSET_STANDARD_GENSRC_DIR)/aliases-map \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
   150
    $(BUILD_TOOLS_JDK) | $(CHARSET_STANDARD_GENSRC_DIR)
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   151
	$(TOOL_HASHER) -i Aliases < '$<' > '$@'
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   152
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   153
$(CHARSET_STANDARD_GENSRC_DIR)/classes-map.java.snippet: $(CHARSET_STANDARD_GENSRC_DIR)/classes-map \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
   154
    $(BUILD_TOOLS_JDK) | $(CHARSET_STANDARD_GENSRC_DIR)
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   155
	$(TOOL_HASHER) -i Classes < '$<' > '$@'
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   156
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   157
$(CHARSET_STANDARD_GENSRC_DIR)/cache-map.java.snippet: $(CHARSET_STANDARD_GENSRC_DIR)/classes-map \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
   158
    $(BUILD_TOOLS_JDK) | $(CHARSET_STANDARD_GENSRC_DIR)
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   159
	$(TOOL_HASHER) -i -e Cache -t Charset < '$<' > '$@'
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   160
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   161
$(eval $(call SetupTextFileProcessing, BUILD_CHARSET_STANDARD, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
   162
    SOURCE_FILES := $(JDK_TOPDIR)/src/java.base/share/classes/$(CHARSET_STANDARD_JAVA).template, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
   163
    OUTPUT_FILE := $(JDK_OUTPUTDIR)/gensrc/java.base/$(CHARSET_STANDARD_JAVA), \
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   164
    INCLUDES := \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   165
        _INCLUDE_ALIASES_TABLES_ => $(CHARSET_STANDARD_GENSRC_DIR)/aliases-tables.java.snippet ; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   166
        _INCLUDE_ALIASES_MAP_ => $(CHARSET_STANDARD_GENSRC_DIR)/aliases-map.java.snippet ; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   167
        _INCLUDE_CLASSES_MAP_ => $(CHARSET_STANDARD_GENSRC_DIR)/classes-map.java.snippet ; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   168
        _INCLUDE_CACHE_MAP_ => $(CHARSET_STANDARD_GENSRC_DIR)/cache-map.java.snippet ; , \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   169
))
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   170
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   171
# Processing of template depends on the snippets being generated first
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   172
$(BUILD_CHARSET_STANDARD): \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   173
    $(CHARSET_STANDARD_GENSRC_DIR)/aliases-tables.java.snippet \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   174
    $(CHARSET_STANDARD_GENSRC_DIR)/aliases-map.java.snippet \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   175
    $(CHARSET_STANDARD_GENSRC_DIR)/classes-map.java.snippet \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   176
    $(CHARSET_STANDARD_GENSRC_DIR)/cache-map.java.snippet
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   177
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22639
diff changeset
   178
GENSRC_JAVA_BASE += $(BUILD_CHARSET_STANDARD)