2012-06-08 03:40:50 +00:00
|
|
|
#
|
2020-05-19 13:59:51 +00:00
|
|
|
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
2012-06-08 03:40:50 +00:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# This code is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License version 2 only, as
|
|
|
|
# published by the Free Software Foundation. Oracle designates this
|
|
|
|
# particular file as subject to the "Classpath" exception as provided
|
|
|
|
# by Oracle in the LICENSE file that accompanied this code.
|
|
|
|
#
|
|
|
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
# version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
# accompanied this code).
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License version
|
|
|
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
|
|
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
# or visit www.oracle.com if you need additional information or have any
|
|
|
|
# questions.
|
|
|
|
#
|
|
|
|
|
2014-09-19 07:59:36 +00:00
|
|
|
################################################################################
|
|
|
|
#
|
2015-02-16 22:53:59 +00:00
|
|
|
# Generate StandardCharsets.java and individul sun.nio.cs charset class using
|
|
|
|
# the charsetmapping tool
|
2014-09-19 07:59:36 +00:00
|
|
|
#
|
2017-09-12 17:03:56 +00:00
|
|
|
CHARSET_DATA_DIR := $(TOPDIR)/make/data/charsetmapping
|
|
|
|
CHARSET_EXTSRC_DIR := $(TOPDIR)/src/jdk.charsets/share/classes/sun/nio/cs/ext
|
2014-12-03 14:22:58 +00:00
|
|
|
CHARSET_GENSRC_JAVA_DIR_BASE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/cs
|
2014-08-17 14:54:13 +00:00
|
|
|
CHARSET_DONE_BASE := $(CHARSET_GENSRC_JAVA_DIR_BASE)/_the.charsetmapping
|
2017-09-12 17:03:56 +00:00
|
|
|
CHARSET_COPYRIGHT_HEADER := $(TOPDIR)/make/jdk/src/classes/build/tools/charsetmapping
|
2014-02-04 09:00:24 +00:00
|
|
|
CHARSET_TEMPLATES := \
|
|
|
|
$(CHARSET_DATA_DIR)/SingleByte-X.java.template \
|
|
|
|
$(CHARSET_DATA_DIR)/DoubleByte-X.java.template
|
2015-02-16 22:53:59 +00:00
|
|
|
CHARSET_STANDARD_JAVA_TEMPLATES := \
|
2017-09-12 17:03:56 +00:00
|
|
|
$(TOPDIR)/src/java.base/share/classes/sun/nio/cs/StandardCharsets.java.template
|
2015-02-16 22:53:59 +00:00
|
|
|
CHARSET_STANDARD_OS := stdcs-$(OPENJDK_TARGET_OS)
|
2014-02-04 09:00:24 +00:00
|
|
|
|
2015-02-16 22:53:59 +00:00
|
|
|
$(CHARSET_DONE_BASE)-stdcs: $(CHARSET_DATA_DIR)/charsets \
|
2015-02-18 10:18:00 +00:00
|
|
|
$(wildcard $(CHARSET_DATA_DIR)/$(CHARSET_STANDARD_OS)) \
|
|
|
|
$(CHARSET_TEMPLATES) $(CHARSET_STANDARD_JAVA_TEMPLATES) \
|
|
|
|
$(BUILD_TOOLS_JDK)
|
2016-01-16 12:01:44 +00:00
|
|
|
$(call LogInfo, Generating java.base charset mapping)
|
|
|
|
$(call MakeDir, $(@D))
|
2015-02-16 22:53:59 +00:00
|
|
|
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_BASE) \
|
2015-02-18 10:18:00 +00:00
|
|
|
stdcs charsets $(CHARSET_STANDARD_OS) \
|
2015-02-25 21:04:31 +00:00
|
|
|
$(CHARSET_STANDARD_JAVA_TEMPLATES) $(CHARSET_EXTSRC_DIR) \
|
|
|
|
$(CHARSET_COPYRIGHT_HEADER) \
|
2016-01-16 12:01:44 +00:00
|
|
|
$(LOG_DEBUG)
|
2014-02-04 09:00:24 +00:00
|
|
|
$(TOUCH) '$@'
|
|
|
|
|
2020-05-19 13:59:51 +00:00
|
|
|
TARGETS += $(CHARSET_DONE_BASE)-stdcs
|