Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
18d382a8
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,发现更多精彩内容 >>
提交
18d382a8
编写于
3月 07, 2014
作者:
E
erikj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8036611: Cleanup of handling of properties and other java resources in the build
Reviewed-by: tbell, ihse
上级
535f3331
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
31 addition
and
14 deletion
+31
-14
make/common/JavaCompilation.gmk
make/common/JavaCompilation.gmk
+31
-14
未找到文件。
make/common/JavaCompilation.gmk
浏览文件 @
18d382a8
...
...
@@ -336,7 +336,20 @@ endef
# Previously this was inconsistently done in different repositories.
# This is the new clean standard. Though it is to be superseded by
# a standard annotation processor from with sjavac.
define add_file_to_copy_and_clean
#
# The sed expression does this:
# 1. Add a backslash before any :, = or ! that do not have a backslash already.
# 2. Apply the file unicode2x.sed which does a whole bunch of \u00XX to \xXX
# conversions.
# 3. Delete all lines starting with #.
# 4. Delete empty lines.
# 5. Append lines ending with \ with the next line.
# 6. Remove leading and trailing white space.
# 7. Replace the first \= with just =.
# 8. Finally it's all sorted to create a stable output.
#
# It is assumed that = is the character used for separating names and values.
define add_file_to_clean
# param 1 = BUILD_MYPACKAGE
# parma 2 = The source file to copy and clean.
$2_TARGET:=$2
...
...
@@ -345,7 +358,8 @@ define add_file_to_copy_and_clean
# Now we can setup the depency that will trigger the copying.
$$($1_BIN)$$($2_TARGET) : $2
$(MKDIR) -p $$(@D)
$(CAT) $$< | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
$(CAT) $$< | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' \
-e 's/\([^\\]\)!/\1\\!/g' -e 's/#.*/#/g' \
| $(SED) -f "$(SRC_ROOT)/make/common/support/unicode2x.sed" \
| $(SED) -e '/^#/d' -e '/^$$$$/d' \
-e :a -e '/\\$$$$/N; s/\\\n//; ta' \
...
...
@@ -376,8 +390,9 @@ define SetupJavaCompilation
# INCLUDES:=myapp.foo means will only compile java files in myapp.foo or any of its sub-packages.
# EXCLUDES:=myapp.foo means will do not compile java files in myapp.foo or any of its sub-packages.
# COPY:=.prp means copy all prp files to the corresponding package in BIN.
# CLEAN:=.properties means copy and clean all properties file to the corresponding package in BIN.
# COPY_FILES:=myapp/foo/setting.txt means copy this file over to the package myapp/foo
# CLEAN:=.properties means copy and clean all properties file to the corresponding package in BIN.
# CLEAN_FILES:=myapp/foo/setting.txt means clean this file over to the package myapp/foo
# SRCZIP:=Create a src.zip based on the found sources and copied files.
# INCLUDE_FILES:="com/sun/SolarisFoobar.java" means only compile this file!
# EXCLUDE_FILES:="com/sun/SolarisFoobar.java" means do not compile this particular file!
...
...
@@ -437,7 +452,7 @@ define SetupJavaCompilation
endif
# Find all files to be copied from source to bin.
ifneq (,$$($1_COPY))
ifneq (,$$($1_COPY)
$$($1_COPY_FILES)
)
# Search for all files to be copied.
$1_ALL_COPIES := $$(filter $$(addprefix %,$$($1_COPY)),$$($1_ALL_SRCS))
# Copy these explicitly
...
...
@@ -452,6 +467,7 @@ define SetupJavaCompilation
ifneq (,$$($1_EXCLUDE_FILES))
$1_ALL_COPIES := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$($1_ALL_COPIES))
endif
endif
# All files below META-INF are always copied.
$1_ALL_COPIES += $$(filter $$(addsuffix /META-INF%,$$($1_SRC)),$$($1_ALL_SRCS))
ifneq (,$$($1_ALL_COPIES))
...
...
@@ -460,12 +476,13 @@ define SetupJavaCompilation
$$(foreach i,$$($1_ALL_COPIES),$$(eval $$(call add_file_to_copy,$1,$$i)))
# Now we can depend on $$($1_ALL_COPY_TARGETS) to copy all files!
endif
endif
# Find all property files to be copied and cleaned from source to bin.
ifneq (,$$($1_CLEAN))
ifneq (,$$($1_CLEAN)
$$($1_CLEAN_FILES)
)
# Search for all files to be copied.
$1_ALL_CLEANS := $$(filter $$(addprefix %,$$($1_CLEAN)),$$($1_ALL_SRCS))
# Clean these explicitly
$1_ALL_CLEANS += $$($1_CLEAN_FILES)
# Copy and clean must also respect filters.
ifneq (,$$($1_INCLUDES))
$1_ALL_CLEANS := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_CLEANS))
...
...
@@ -479,7 +496,7 @@ define SetupJavaCompilation
ifneq (,$$($1_ALL_CLEANS))
# Yep, there are files to be copied and cleaned!
$1_ALL_COPY_CLEAN_TARGETS:=
$$(foreach i,$$($1_ALL_CLEANS),$$(eval $$(call add_file_to_c
opy_and_c
lean,$1,$$i)))
$$(foreach i,$$($1_ALL_CLEANS),$$(eval $$(call add_file_to_clean,$1,$$i)))
# Now we can depend on $$($1_ALL_COPY_CLEAN_TARGETS) to copy all files!
endif
endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录