#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# 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.
#
#
# Generic mechanism for installing properties files, resource bundles,
# and other resource files.
#
# FILES_properties should be defined.
# FILES_compiled_properties should be defined.
#
# If COMPILED_PROPERTIES_SUPERCLASS is defined, ALL the FILES_properties
# files will be compiled into java with this super class.
#
# You can add locales to LOCALE_SUFFIXES explicitly, or use the
# LOCALE_SET_DEFINITION variable to add some pre-defined locale lists.
# The LOCALE_SET_DEFINITION can have the value: jre, plugin, or jdk.
#
# Resource bundles to be installed are identified using the following variables.
# Note that only the file name of the base bundle is given; localized versions
# are added automatically. For Java files, use a format suitable for inclusion
# in the FILES_java list; dito for properties, all relative paths.
#
# NEW_RESOURCE_BUNDLES_JAVA - new resource bundles implemented in
# Java, not localized
# RESOURCE_BUNDLES_JAVA - resource bundles implemented in
# Java, localized
#
# The following variable is now used for most .properties files in the JDK.
# These properties files are converted into java and compiled with javac.
# The resulting .class files are usually smaller and are always faster to load.
# The relative path to the properties file becomes a relative path to a
# java source file.
#
# RESOURCE_BUNDLES_COMPILED_PROPERTIES - resource bundles implemented as
# properties files, localized
# NEW_RESOURCE_BUNDLES_COMPILED_PROPERTIES - same as above, not localized
#
# For non-compiled properties files, use the following variables:
#
# NEW_RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES - new resource bundles implemented as
# properties files, not localized
# RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES - resource bundles implemented as
# properties files, localized
#
# Other properties files to be installed are identified using the variable:
#
# OTHER_PROPERTIES
#
# Compile properties files into java source?
# Add all properties files to the compiled properties list (all or nothing)
else
# Determine the locale suffixes needed beyond the base bundle
LOCALE_SUFFIXES += $(JDK_LOCALES)
LOCALE_SUFFIXES += $(JRE_LOCALES)
# Java files get tacked onto the standard list of files to compile
# Add to java sources list
# Compiled properties files are translated to .java.
# The .java files are generated into GENSRCDIR.
# Add to java sources list
FILES_java += $(COMPILED_PROPERTIES:%.properties=%.java)
# Non-compiled files
# other properties
#
# Compile Properties tool
#
#
# Strip Properties tool
#
#
# Process and strip all non-compiled properties files (in a batch mode)
#
# To efficiently strip properties we use one run of StripProperties.
# This macro gathers an option for use later.
@$(ECHO) "# Adding to strip properties list: $@"
# Constructs command line options file
@$(TOUCH) $@
@$(RM) $(STRIP_PROP_options)
# Strip the properties files
@if [ -s $(STRIP_PROP_options) ] ; then \
fi
#
# Creates files in CLASSDESTDIR
#
# In some cases, we move files from package to resources subdir
#
# To efficiently compile properties into java sources we use one run
# of compileproperties. This macro gathers an option for use later.
# Note: The properties file and java source name can be different
# locales, e.g. zh_TW and zh_HK. The java source filename
# determines the name of the class.
@$(ECHO) "# Adding to compile properties list: $? -> $@"
>> $(COMPILE_PROP_options)
# Create HK java file from zh_TW (explicit resource bundles only)
# Explicit resource bundles
# Compile of zh_HK properties just uses the zh_TW properties files
# Simple delivery of zh_HK properties files just copies zh_TW properties files
$(CLASSDESTDIR)/%_zh_HK.properties: \
$(CLASSDESTDIR)/%_zh_HK.properties: \
# List of java files converted from properties files needed
# Constructs command line options file
@$(TOUCH) $@
@$(RM) $(COMPILE_PROP_options)
# Make sure all are compiled, one compiler run
fi
# Make sure the build rule creates all the properties