Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
011a74e0
D
dragonwell11
项目概览
openanolis
/
dragonwell11
通知
7
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
011a74e0
编写于
11月 10, 2015
作者:
I
ihse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8142383: Use named arguments for SetupCompileProperties in jdk
Reviewed-by: erikj
上级
6b43385c
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
73 addition
and
65 deletion
+73
-65
jdk/make/gensrc/Gensrc-java.base.gmk
jdk/make/gensrc/Gensrc-java.base.gmk
+9
-9
jdk/make/gensrc/Gensrc-java.desktop.gmk
jdk/make/gensrc/Gensrc-java.desktop.gmk
+6
-6
jdk/make/gensrc/Gensrc-java.logging.gmk
jdk/make/gensrc/Gensrc-java.logging.gmk
+5
-5
jdk/make/gensrc/Gensrc-java.management.gmk
jdk/make/gensrc/Gensrc-java.management.gmk
+5
-5
jdk/make/gensrc/Gensrc-jdk.dev.gmk
jdk/make/gensrc/Gensrc-jdk.dev.gmk
+5
-6
jdk/make/gensrc/Gensrc-jdk.jartool.gmk
jdk/make/gensrc/Gensrc-jdk.jartool.gmk
+4
-5
jdk/make/gensrc/Gensrc-jdk.jdi.gmk
jdk/make/gensrc/Gensrc-jdk.jdi.gmk
+6
-6
jdk/make/gensrc/Gensrc-jdk.localedata.gmk
jdk/make/gensrc/Gensrc-jdk.localedata.gmk
+5
-5
jdk/make/gensrc/GensrcProperties.gmk
jdk/make/gensrc/GensrcProperties.gmk
+28
-18
未找到文件。
jdk/make/gensrc/Gensrc-java.base.gmk
浏览文件 @
011a74e0
#
# Copyright (c) 2011, 201
3
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 201
5
, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
...
...
@@ -38,15 +38,15 @@ include GensrcExceptions.gmk
include GensrcProperties.gmk
$(eval $(call SetupCompileProperties,LIST_RESOURCE_BUNDLE, \
$(filter %.properti
es, \
$(call CacheFind, $(JDK_TOPDIR)/src/java.base/share/classes/sun/launcher/resources))
, \
ListResourceBundle
))
$(eval $(call SetupCompileProperties,
LIST_RESOURCE_BUNDLE, \
SRC_DIRS := $(JDK_TOPDIR)/src/java.base/share/classes/sun/launcher/resourc
es, \
CLASS := ListResourceBundle
, \
))
$(eval $(call SetupCompileProperties,SUN_UTIL, \
$(filter %.properti
es, \
$(call CacheFind, $(JDK_TOPDIR)/src/java.base/share/classes/sun/util/resources))
, \
sun.util.resources.LocaleNamesBundle
))
$(eval $(call SetupCompileProperties,
SUN_UTIL, \
SRC_DIRS := $(JDK_TOPDIR)/src/java.base/share/classes/sun/util/resourc
es, \
CLASS := sun.util.resources.LocaleNamesBundle
, \
))
GENSRC_JAVA_BASE += $(LIST_RESOURCE_BUNDLE) $(SUN_UTIL)
...
...
jdk/make/gensrc/Gensrc-java.desktop.gmk
浏览文件 @
011a74e0
#
# Copyright (c) 2011, 201
4
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 201
5
, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
...
...
@@ -66,11 +66,11 @@ else
PROP_SRC_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources
endif
PROP_SRC_FILES := $(filter-out %cursors.properties
, \
$(filter %.properties, $(call CacheFind, $(PROP_SRC_DIRS))))
$(eval $(call SetupCompileProperties,COMPILE_PROPERTIES
, \
$(PROP_SRC_FILES), ListResourceBundle
))
$(eval $(call SetupCompileProperties, COMPILE_PROPERTIES
, \
SRC_DIRS := $(PROP_SRC_DIRS), \
EXCLUDE := %cursors.properties, \
CLASS := ListResourceBundle
, \
))
GENSRC_JAVA_DESKTOP += $(COMPILE_PROPERTIES)
...
...
jdk/make/gensrc/Gensrc-java.logging.gmk
浏览文件 @
011a74e0
#
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014,
2015,
Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
...
...
@@ -29,10 +29,10 @@ include GensrcCommon.gmk
include GensrcProperties.gmk
$(eval $(call SetupCompileProperties,COMPILE_PROPERTIES, \
$(filter %.properti
es, \
$(call CacheFind, $(JDK_TOPDIR)/src/java.logging/share/classes/sun/util/logging/resources))
, \
ListResourceBundle
))
$(eval $(call SetupCompileProperties,
COMPILE_PROPERTIES, \
SRC_DIRS := $(JDK_TOPDIR)/src/java.logging/share/classes/sun/util/logging/resourc
es, \
CLASS := ListResourceBundle
, \
))
TARGETS += $(COMPILE_PROPERTIES)
...
...
jdk/make/gensrc/Gensrc-java.management.gmk
浏览文件 @
011a74e0
#
# Copyright (c) 2011, 201
3
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 201
5
, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
...
...
@@ -32,10 +32,10 @@ $(eval $(call IncludeCustomExtension, jdk, gensrc/Gensrc-java.management.gmk))
include GensrcProperties.gmk
$(eval $(call SetupCompileProperties,COMPILE_PROPERTIES, \
$(filter %.properti
es, \
$(call CacheFind, $(JDK_TOPDIR)/src/java.management/share/classes/sun/management/resources))
, \
ListResourceBundle
))
$(eval $(call SetupCompileProperties,
COMPILE_PROPERTIES, \
SRC_DIRS := $(JDK_TOPDIR)/src/java.management/share/classes/sun/management/resourc
es, \
CLASS := ListResourceBundle
, \
))
TARGETS += $(COMPILE_PROPERTIES)
...
...
jdk/make/gensrc/Gensrc-jdk.dev.gmk
浏览文件 @
011a74e0
#
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014,
2015,
Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
...
...
@@ -29,11 +29,10 @@ include GensrcCommon.gmk
include GensrcProperties.gmk
$(eval $(call SetupCompileProperties,COMPILE_PROPERTIES, \
$(filter %.properties, \
$(call CacheFind, \
$(JDK_TOPDIR)/src/jdk.dev/share/classes/jdk/tools/jimage/resources)), \
ListResourceBundle))
$(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \
SRC_DIRS := $(JDK_TOPDIR)/src/jdk.dev/share/classes/jdk/tools/jimage/resources, \
CLASS := ListResourceBundle, \
))
TARGETS += $(COMPILE_PROPERTIES)
...
...
jdk/make/gensrc/Gensrc-jdk.jartool.gmk
浏览文件 @
011a74e0
...
...
@@ -29,11 +29,10 @@ include GensrcCommon.gmk
include GensrcProperties.gmk
$(eval $(call SetupCompileProperties,COMPILE_PROPERTIES, \
$(filter %.properties, \
$(call CacheFind, \
$(JDK_TOPDIR)/src/jdk.jartool/share/classes/sun/tools/jar/resources)), \
ListResourceBundle))
$(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \
SRC_DIRS := $(JDK_TOPDIR)/src/jdk.jartool/share/classes/sun/tools/jar/resources, \
CLASS := ListResourceBundle, \
))
TARGETS += $(COMPILE_PROPERTIES)
...
...
jdk/make/gensrc/Gensrc-jdk.jdi.gmk
浏览文件 @
011a74e0
#
# Copyright (c) 2011, 201
4
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 201
5
, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
...
...
@@ -34,7 +34,7 @@ HEADER_FILE := $(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent/JDWPCommands.h
JAVA_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java
# Both the header and java file are created using the same recipe. By declaring
# this rule and adding header file to dependencies for java file, both are
# this rule and adding header file to dependencies for java file, both are
# rebuilt if either is missing
$(HEADER_FILE): $(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK)
...
...
@@ -90,10 +90,10 @@ endif
include GensrcProperties.gmk
$(eval $(call SetupCompileProperties,COMPILE_PROPERTIES, \
$(filter %.properti
es, \
$(call CacheFind, $(JDK_TOPDIR)/src/jdk.jdi/share/classes/com/sun/tools/jdi/resources))
, \
ListResourceBundle
))
$(eval $(call SetupCompileProperties,
COMPILE_PROPERTIES, \
SRC_DIRS := $(JDK_TOPDIR)/src/jdk.jdi/share/classes/com/sun/tools/jdi/resourc
es, \
CLASS := ListResourceBundle
, \
))
GENSRC_JDK_JDI += $(COMPILE_PROPERTIES)
...
...
jdk/make/gensrc/Gensrc-jdk.localedata.gmk
浏览文件 @
011a74e0
#
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014,
2015,
Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
...
...
@@ -35,10 +35,10 @@ include GensrcCLDR.gmk
include GensrcProperties.gmk
$(eval $(call SetupCompileProperties,COMPILE_PROPERTIES, \
$(filter %.properti
es, \
$(call CacheFind, $(JDK_TOPDIR)/src/jdk.localedata/share/classes/sun/util/resources))
, \
sun.util.resources.LocaleNamesBundle
))
$(eval $(call SetupCompileProperties,
COMPILE_PROPERTIES, \
SRC_DIRS := $(JDK_TOPDIR)/src/jdk.localedata/share/classes/sun/util/resourc
es, \
CLASS := sun.util.resources.LocaleNamesBundle
, \
))
# Skip generating zh_HK from zh_TW for this module.
GENSRC_JDK_LOCALEDATA += $(filter-out %_zh_HK.java, $(COMPILE_PROPERTIES))
...
...
jdk/make/gensrc/GensrcProperties.gmk
浏览文件 @
011a74e0
#
# Copyright (c) 2011, 201
4
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 201
5
, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
...
...
@@ -49,30 +49,40 @@ define SetupCopy-zh_HK
endef
################################################################################
# Creates a rule that runs CompileProperties on a set of properties files.
# Param 1 - Variable to add targets to, must not contain space
# Param 2 - Properties files to process
# Param 3 - The super class for the generated classes
# Param 4 - Module path root, defaults to $(JDK_TOPDIR)/src
define SetupCompileProperties
$1_SRCS := $2
$1_CLASS := $3
$1_MODULE_PATH_ROOT := $4
# Setup make rules that runs CompileProperties on a set of properties files.
#
# Parameter 1 is the name of the rule. This name is used as variable prefix,
# and the targets generated are listed in a variable by that name.
#
# Remaining parameters are named arguments. These include:
# SRC_DIRS Directories containing properties files to process.
# EXCLUDE Exclude files matching this pattern.
# CLASS The super class for the generated classes.
# MODULE_PATH_ROOT Module path root, defaults to $(JDK_TOPDIR)/src.
SetupCompileProperties = $(NamedParamsMacroTemplate)
define SetupCompilePropertiesBody
# Set default value unless overridden
ifeq ($$($1_MODULE_PATH_ROOT), )
$1_MODULE_PATH_ROOT := $(JDK_TOPDIR)/src
endif
# Locate all properties files in the given source dirs.
$1_SRC_FILES := $$(filter %.properties, $$(call CacheFind, $$($1_SRC_DIRS)))
ifneq ($$($1_EXCLUDE), )
$1_SRC_FILES := $$(filter-out $$($1_EXCLUDE), $$($1_SRC_FILES))
endif
# Convert .../src/<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties
# to .../support/gensrc/<module>/com/sun/tools/javac/resources/javac_zh_CN.java
# Strip away prefix and suffix, leaving for example only:
# Strip away prefix and suffix, leaving for example only:
# "<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN"
$1_JAVAS := $$(patsubst $$($1_MODULE_PATH_ROOT)/%, \
$(SUPPORT_OUTPUTDIR)/gensrc/%, \
$$(patsubst %.properties, %.java, \
$$(subst /$(OPENJDK_TARGET_OS)/classes,, \
$$(subst /$(OPENJDK_TARGET_OS_TYPE)/classes,, \
$$(subst /share/classes,, $$($1_SRCS))))))
$$(subst /share/classes,, $$($1_SRC
_FILE
S))))))
# Generate the package dirs for the to be generated java files. Sort to remove
# duplicates.
...
...
@@ -82,22 +92,22 @@ define SetupCompileProperties
# "-compile ...javac_zh_CN.properties ...javac_zh_CN.java java.util.ListResourceBundle"
# suitable to be fed into the CompileProperties command.
$1_CMDLINE := $$(subst _SPACE_, $(SPACE), \
$$(join $$(addprefix -compile_SPACE_, $$($1_SRCS)), \
$$(join $$(addprefix -compile_SPACE_, $$($1_SRC
_FILE
S)), \
$$(addsuffix _SPACE_$$($1_CLASS), \
$$(addprefix _SPACE_, $$($1_JAVAS)))))
$1_TARGET := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the.$1.
done
$1_TARGET := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the.$1.
marker
$1_CMDLINE_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the.$1.cmdline
# Now setup the rule for the generation of the resource bundles.
$$($1_TARGET): $$($1_SRCS) $$($1_JAVAS) $(BUILD_TOOLS_JDK)
$$($1_TARGET): $$($1_SRC
_FILE
S) $$($1_JAVAS) $(BUILD_TOOLS_JDK)
$(MKDIR) -p $$(@D) $$($1_DIRS)
$(ECHO) Compiling $$(words $$($1_SRCS)) properties into resource bundles for $(MODULE)
$(ECHO) Compiling $$(words $$($1_SRC
_FILE
S)) properties into resource bundles for $(MODULE)
$$(eval $$(call ListPathsSafely, $1_CMDLINE, $$($1_CMDLINE_FILE)))
$(TOOL_COMPILEPROPERTIES) -quiet @$$($1_CMDLINE_FILE)
$(TOUCH) $$@
$$($1_JAVAS): $$($1_SRCS)
$$($1_JAVAS): $$($1_SRC
_FILE
S)
# Create zh_HK versions of all zh_TW files created above
$$(eval $$(call SetupCopy-zh_HK,$1_HK,$$(filter %_zh_TW.java, $$($1_JAVAS))))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录