jdk/make/gensrc/GensrcCharsetMapping.gmk
author ihse
Tue, 04 Feb 2014 10:00:24 +0100
changeset 22639 37f4508257fe
parent 21805 c7d7946239de
child 25859 3317bb8137f4
permissions -rw-r--r--
8033236: Update GensrcCharsetMapping.gmk to build-infra standards Reviewed-by: erikj, mduigou, sherman
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
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    34
CHARSET_GENSRC_JAVA_DIR := $(JDK_OUTPUTDIR)/gensrc/sun/nio/cs
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    35
CHARSET_DONE := $(CHARSET_GENSRC_JAVA_DIR)/_the.charsetmapping
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    36
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
    37
CHARSET_TEMPLATES := \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    38
    $(CHARSET_DATA_DIR)/SingleByte-X.java.template \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    39
    $(CHARSET_DATA_DIR)/DoubleByte-X.java.template
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    40
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    41
# This target should be referenced using the order-only operator (|)
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    42
$(CHARSET_GENSRC_JAVA_DIR)/ext:
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    43
	$(ECHO)	"Generating charset mappings"
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    44
	$(MKDIR) -p $(CHARSET_GENSRC_JAVA_DIR)/ext
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    45
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    46
$(CHARSET_DONE)-sbcs: $(CHARSET_DATA_DIR)/sbcs \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    47
    $(CHARSET_TEMPLATES) $(BUILD_TOOLS) | $(CHARSET_GENSRC_JAVA_DIR)/ext
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    48
	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR) sbcs
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    49
	$(TOUCH) '$@'
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    50
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    51
$(CHARSET_DONE)-extsbcs: $(CHARSET_DATA_DIR)/extsbcs  \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    52
    $(CHARSET_DONE)-sbcs $(CHARSET_TEMPLATES) $(BUILD_TOOLS) 
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    53
	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR)/ext extsbcs
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    54
	$(TOUCH) '$@'
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    55
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    56
$(CHARSET_DONE)-dbcs: $(CHARSET_DATA_DIR)/dbcs \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    57
    $(CHARSET_DONE)-sbcs $(CHARSET_TEMPLATES) $(BUILD_TOOLS) 
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    58
	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR)/ext dbcs
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    59
	$(TOUCH) '$@'
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    60
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    61
$(CHARSET_DONE)-hkscs: $(CHARSET_COPYRIGHT_HEADER_BASE)/HKSCS.java \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    62
    $(CHARSET_DONE)-sbcs $(BUILD_TOOLS)
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    63
	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR)/ext hkscs '$<'
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    64
	$(TOUCH) '$@'
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    65
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    66
$(CHARSET_DONE)-euctw: $(CHARSET_COPYRIGHT_HEADER_BASE)/EUC_TW.java \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    67
    $(CHARSET_DONE)-sbcs $(BUILD_TOOLS)
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    68
	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR)/ext euctw '$<'
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    69
	$(TOUCH) '$@'
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    70
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    71
$(CHARSET_GENSRC_JAVA_DIR)/ext/sjis0213.dat: $(CHARSET_DATA_DIR)/sjis0213.map \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    72
    $(CHARSET_DONE)-sbcs $(BUILD_TOOLS)
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    73
	$(TOOL_CHARSETMAPPING) '$<' '$@' sjis0213
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    74
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    75
GENSRC_CHARSETMAPPING += \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    76
    $(CHARSET_DONE)-sbcs \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    77
    $(CHARSET_DONE)-extsbcs \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    78
    $(CHARSET_DONE)-dbcs \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    79
    $(CHARSET_DONE)-hkscs \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    80
    $(CHARSET_DONE)-euctw \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    81
    $(CHARSET_GENSRC_JAVA_DIR)/ext/sjis0213.dat \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    82
    #
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    83
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    84
###
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    85
### Generate the sun/nio/cs/StandardCharsets.java file
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
CHARSET_STANDARD_GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc/standardcharsets
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    89
CHARSET_STANDARD_DATA := $(CHARSET_DATA_DIR)/standard-charsets
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    90
CHARSET_STANDARD_JAVA :=  sun/nio/cs/StandardCharsets.java
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    91
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    92
CHARSET_ALIASES_TABLES_AWK := ' \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    93
    BEGIN { n = 1; m = 1; } \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    94
    /^[ \t]*charset / { \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    95
      csn = $$2; cln = $$3; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    96
      lcsn = tolower(csn); \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    97
      lcsns[n++] = lcsn; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    98
      csns[lcsn] = csn; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
    99
      classMap[lcsn] = cln; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   100
      if (n > 2) \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   101
        printf "    };\n\n"; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   102
      printf "    static final String[] aliases_%s = new String[] {\n", cln; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   103
    } \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   104
    /^[ \t]*alias / { \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   105
      acsns[m++] = tolower($$2); \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   106
      aliasMap[tolower($$2)] = lcsn; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   107
      printf "        \"%s\",\n", $$2; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   108
    } \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   109
    END { \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   110
      printf "    };\n\n"; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   111
    } '
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   112
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   113
CHARSET_ALIASES_MAP_AWK := ' \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   114
    /^[ \t]*charset / { \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   115
      csn = $$2; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   116
      lcsn = tolower(csn); \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   117
    } \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   118
    /^[ \t]*alias / { \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   119
      an = tolower($$2); \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   120
      printf "%-20s \"%s\"\n", an, lcsn; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   121
    } '
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   122
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   123
CHARSET_CLASSES_MAP_AWK := ' \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   124
    /^[ \t]*charset / { \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   125
      csn = $$2; cln = $$3; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   126
      lcsn = tolower(csn); \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   127
      printf "%-20s \"%s\"\n", lcsn, cln; \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   128
    } '
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   129
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   130
# This target should be referenced using the order-only operator (|)
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   131
$(CHARSET_STANDARD_GENSRC_DIR):
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   132
	$(MKDIR) -p '$@'
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   133
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   134
$(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
   135
    | $(CHARSET_STANDARD_GENSRC_DIR)
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   136
	$(NAWK) < '$<' > '$@' $(CHARSET_ALIASES_TABLES_AWK)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   137
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   138
$(CHARSET_STANDARD_GENSRC_DIR)/aliases-map: $(CHARSET_STANDARD_DATA) \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   139
    | $(CHARSET_STANDARD_GENSRC_DIR)
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   140
	$(NAWK) < '$<' > '$@' $(CHARSET_ALIASES_MAP_AWK)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   141
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   142
$(CHARSET_STANDARD_GENSRC_DIR)/classes-map: $(CHARSET_STANDARD_DATA) \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   143
    | $(CHARSET_STANDARD_GENSRC_DIR)
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   144
	$(NAWK) < '$<' > '$@' $(CHARSET_CLASSES_MAP_AWK)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   145
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   146
$(CHARSET_STANDARD_GENSRC_DIR)/aliases-map.java.snippet: $(CHARSET_STANDARD_GENSRC_DIR)/aliases-map \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   147
    $(BUILD_TOOLS) | $(CHARSET_STANDARD_GENSRC_DIR)
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   148
	$(TOOL_HASHER) -i Aliases < '$<' > '$@'
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   149
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   150
$(CHARSET_STANDARD_GENSRC_DIR)/classes-map.java.snippet: $(CHARSET_STANDARD_GENSRC_DIR)/classes-map \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   151
    $(BUILD_TOOLS) | $(CHARSET_STANDARD_GENSRC_DIR)
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   152
	$(TOOL_HASHER) -i Classes < '$<' > '$@'
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   153
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   154
$(CHARSET_STANDARD_GENSRC_DIR)/cache-map.java.snippet: $(CHARSET_STANDARD_GENSRC_DIR)/classes-map \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   155
    $(BUILD_TOOLS) | $(CHARSET_STANDARD_GENSRC_DIR)
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   156
	$(TOOL_HASHER) -i -e Cache -t Charset < '$<' > '$@'
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   157
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   158
$(eval $(call SetupTextFileProcessing, BUILD_CHARSET_STANDARD, \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   159
    SOURCE_FILES := $(JDK_TOPDIR)/src/share/classes/$(CHARSET_STANDARD_JAVA).template, \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   160
    OUTPUT_FILE := $(JDK_OUTPUTDIR)/gensrc/$(CHARSET_STANDARD_JAVA), \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   161
    INCLUDES := \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   162
        _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
   163
        _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
   164
        _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
   165
        _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
   166
))
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   167
22639
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   168
# Processing of template depends on the snippets being generated first
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   169
$(BUILD_CHARSET_STANDARD): \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   170
    $(CHARSET_STANDARD_GENSRC_DIR)/aliases-tables.java.snippet \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   171
    $(CHARSET_STANDARD_GENSRC_DIR)/aliases-map.java.snippet \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   172
    $(CHARSET_STANDARD_GENSRC_DIR)/classes-map.java.snippet \
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   173
    $(CHARSET_STANDARD_GENSRC_DIR)/cache-map.java.snippet
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   174
37f4508257fe 8033236: Update GensrcCharsetMapping.gmk to build-infra standards
ihse
parents: 21805
diff changeset
   175
GENSRC_CHARSETMAPPING += $(BUILD_CHARSET_STANDARD)