Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
2cf6bf87
R
Rust
项目概览
int
/
Rust
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2cf6bf87
编写于
7月 11, 2012
作者:
G
Graydon Hoare
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Reorganize lib-glob code to avoid accidentally duplicating lib/ subdirectory.
上级
aa7b3cc9
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
41 addition
and
52 deletion
+41
-52
Makefile.in
Makefile.in
+4
-8
mk/clean.mk
mk/clean.mk
+8
-8
mk/host.mk
mk/host.mk
+4
-15
mk/install.mk
mk/install.mk
+21
-16
mk/platform.mk
mk/platform.mk
+4
-5
未找到文件。
Makefile.in
浏览文件 @
2cf6bf87
...
...
@@ -118,14 +118,10 @@ CFG_STDLIB :=$(call CFG_LIB_NAME,std)
CFG_LIBRUSTC
:=
$(
call
CFG_LIB_NAME,rustc
)
CFG_LIBSYNTAX
:=
$(
call
CFG_LIB_NAME,syntax
)
STDLIB_GLOB
:=
$(
call
CFG_LIB_GLOB,std
)
CORELIB_GLOB
:=
$(
call
CFG_LIB_GLOB,core
)
LIBRUSTC_GLOB
:=
$(
call
CFG_LIB_GLOB,rustc
)
LIBSYNTAX_GLOB
:=
$(
call
CFG_LIB_GLOB,syntax
)
STDLIB_DSYM_GLOB
:=
$(
call
CFG_LIB_DSYM_GLOB,std
)
CORELIB_DSYM_GLOB
:=
$(
call
CFG_LIB_DSYM_GLOB,core
)
LIBRUSTC_DSYM_GLOB
:=
$(
call
CFG_LIB_DSYM_GLOB,rustc
)
LIBSYNTAX_DSYM_GLOB
:=
$(
call
CFG_LIB_DSYM_GLOB,syntax
)
STDLIB_GLOB
=
$(
call
CFG_LIB_GLOB,
$(1)
,std
)
CORELIB_GLOB
=
$(
call
CFG_LIB_GLOB,
$(1)
,core
)
LIBRUSTC_GLOB
=
$(
call
CFG_LIB_GLOB,
$(1)
,rustc
)
LIBSYNTAX_GLOB
=
$(
call
CFG_LIB_GLOB,
$(1)
,syntax
)
# version-string calculation
CFG_GIT_DIR
:=
$(CFG_SRC_DIR)
.git
...
...
mk/clean.mk
浏览文件 @
2cf6bf87
...
...
@@ -62,10 +62,10 @@ clean$(1)_H_$(2):
$(Q)
rm
-f
$$
(
HLIB
$(1)
_H_
$(2)
)
/
$(CFG_STDLIB)
$(Q)
rm
-f
$$
(
HLIB
$(1)
_H_
$(2)
)
/
$(CFG_LIBRUSTC)
$(Q)
rm
-f
$$
(
HLIB
$(1)
_H_
$(2)
)
/
$(CFG_LIBSYNTAX)
$(Q)
rm
-f
$$
(
HLIB
$(1)
_H_
$(2)
)
/
$(CORELIB_GLOB
)
$(Q)
rm
-f
$$
(
HLIB
$(1)
_H_
$(2)
)
/
$(STDLIB_GLOB
)
$(Q)
rm
-f
$$
(
HLIB
$(1)
_H_
$(2)
)
/
$(LIBRUSTC_GLOB
)
$(Q)
rm
-f
$$
(
HLIB
$(1)
_H_
$(2)
)
/
$(LIBSYNTAX_GLOB
)
$(Q)
rm
-f
$
$(
call
CORELIB_GLOB,
$$
(
HLIB
$(1)
_H_
$(2)
)
)
$(Q)
rm
-f
$
$(
call
STDLIB_GLOB,
$$
(
HLIB
$(1)
_H_
$(2)
))
)
$(Q)
rm
-f
$
$(
call
LIBRUSTC_GL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)_H_$(4))/$$(CFG_RUNTIME)
@
$
$(
call
E,
cp
:
$$
@
)
$
$(Q)
cp
$$
<
$$
@
# Subtle: We do not let the shell expand $(CORELIB_DSYM_GLOB) directly rather
# we use Make's $$(wildcard) facility. The reason is that, on mac, when using
# USE_SNAPSHOT_CORELIB, we copy the core.dylib file out of the snapshot.
# In that case, there is no .dSYM file. Annoyingly, bash then refuses to expand
# glob, and cp reports an error because libcore-*.dylib.dsym does not exist.
# Make instead expands the glob to nothing, which gives us the correct behavior.
# (Copy .dsym file if it exists, but do nothing otherwise)
$$(Q)cp
-R
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CORELIB_GLOB)
\
$$(wildcard
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CORELIB_DSYM_GLOB))
\
$
$(Q)
cp
-R
$
$(
call
CORELIB_GLOB,
$$
(
TLIB
$(1)
_T_
$(4)
_H_
$(3)
))
\
$$
(
HLIB
$(2)
_H_
$(4)
)
$$(HLIB$(2)_H_$(4))/$$(CFG_STDLIB)
:
\
...
...
@@ -73,8 +63,7 @@ $$(HLIB$(2)_H_$(4))/$$(CFG_STDLIB): \
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME)
@
$
$(
call
E,
cp
:
$$
@
)
$
$(Q)
cp
$$
<
$$
@
$
$(Q)
cp
-R
$$
(
TLIB
$(1)
_T_
$(4)
_H_
$(3)
)
/
$(STDLIB_GLOB)
\
$
$(
wildcard
$$
(
TLIB
$(1)
_T_
$(4)
_H_
$(3)
)
/
$(STDLIB_DSYM_GLOB)
)
\
$
$(Q)
cp
-R
$
$(
call
STDLIB_GLOB,
$$
(
TLIB
$(1)
_T_
$(4)
_H_
$(3)
))
\
$$
(
HLIB
$(2)
_H_
$(4)
)
$$(HLIB$(2)_H_$(4))/libcore.rlib
:
\
...
...
mk/install.mk
浏览文件 @
2cf6bf87
...
...
@@ -6,11 +6,12 @@
# destination directory as arg 2, and filename/libname-glob as arg 3
ifdef
VERBOSE
INSTALL
=
install
-m755
$(1)
/
$(3)
$(2)
/
$(3)
INSTALL_LIB
=
install
-m644
`
ls
-rt1
$(1)
/
$(3)
|
tail
-1
`
$(2)
/
INSTALL_LIB
=
install
-m644
$(3)
$(2)
/
else
INSTALL
=
$(Q)
$(
call
E,
install
:
$(2)
/
$(3)
)
&&
install
-m755
$(1)
/
$(3)
$(2)
/
$(3)
INSTALL_LIB
=
$(Q)
$(
call
E, install_lib:
$(2)
/
$(3)
)
&&
\
install
-m644
`
ls
-rt1
$(1)
/
$(3)
|
tail
-1
`
$(2)
/
INSTALL_LIB
=
$(Q)
$(
call
E, install_lib:
\
$(
addprefix
$(2)
/,
$(
basename
$(3)
)))
&&
\
install
-m644
$(3)
$(2)
/
endif
# The stage we install from
...
...
@@ -37,13 +38,17 @@ install-target-$(1)-host-$(2): $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2))
$
$(Q)
mkdir
-p
$$
(
PTL
$(1)$(2)
)
$
$(Q)
$
$(
call
INSTALL,
$$
(
TL
$(1)$(2)
)
,
$$
(
PTL
$(1)$(2)
)
,
$
$(CFG_RUNTIME)
)
$
$(Q)
$
$(
call
INSTALL_LIB,
\
$$
(
TL
$(1)$(2)
)
,
$$
(
PTL
$(1)$(2)
)
,
$
$(CORELIB_GLOB)
)
$$
(
TL
$(1)$(2)
)
,
$$
(
PTL
$(1)$(2)
)
,
\
$
$(
call
CORELIB_GLOB,
$$
(
TL
$(1)$(2)
)))
$
$(Q)
$
$(
call
INSTALL_LIB,
\
$$
(
TL
$(1)$(2)
)
,
$$
(
PTL
$(1)$(2)
)
,
$
$(STDLIB_GLOB)
)
$$
(
TL
$(1)$(2)
)
,
$$
(
PTL
$(1)$(2)
)
,
\
$
$(
call
STDLIB_GLOB,
$$
(
TL
$(1)$(2)
)))
$
$(Q)
$
$(
call
INSTALL_LIB,
\
$$
(
TL
$(1)$(2)
)
,
$$
(
PTL
$(1)$(2)
)
,
$
$(LIBRUSTC_GLOB)
)
$$
(
TL
$(1)$(2)
)
,
$$
(
PTL
$(1)$(2)
)
,
\
$
$(
call
LIBRUSTC_GLOB,
$$
(
TL
$(1)$(2)
)))
$
$(Q)
$
$(
call
INSTALL_LIB,
\
$$
(
TL
$(1)$(2)
)
,
$$
(
PTL
$(1)$(2)
)
,
$
$(LIBSYNTAX_GLOB)
)
$$
(
TL
$(1)$(2)
)
,
$$
(
PTL
$(1)$(2)
)
,
\
$
$(
call
LIBSYNTAX_GLOB,
$$
(
TL
$(1)$(2)
)))
$
$(Q)
$
$(
call
INSTALL,
$$
(
TL
$(1)$(2)
)
,
$$
(
PTL
$(1)$(2)
)
,libmorestack.a
)
endef
...
...
@@ -74,10 +79,10 @@ install-host: $(SREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE))
$(Q)
$(
call
INSTALL,
$(HB2)
,
$(PHB)
,cargo
$(X)
)
$(Q)
$(
call
INSTALL,
$(HB2)
,
$(PHB)
,rustdoc
$(X)
)
$(Q)
$(
call
INSTALL,
$(HL)
,
$(PHL)
,
$(CFG_RUNTIME)
)
$(Q)
$(
call
INSTALL_LIB,
$(HL)
,
$(PHL)
,
$(
CORELIB_GLOB
)
)
$(Q)
$(
call
INSTALL_LIB,
$(HL)
,
$(PHL)
,
$(
STDLIB_GLOB
)
)
$(Q)
$(
call
INSTALL_LIB,
$(HL)
,
$(PHL)
,
$(
LIBRUSTC_GLOB
)
)
$(Q)
$(
call
INSTALL_LIB,
$(HL)
,
$(PHL)
,
$(
LIBSYNTAX_GLOB
)
)
$(Q)
$(
call
INSTALL_LIB,
$(HL)
,
$(PHL)
,
$(
call
CORELIB_GLOB,
$(PHL)
))
$(Q)
$(
call
INSTALL_LIB,
$(HL)
,
$(PHL)
,
$(
call
STDLIB_GLOB,
$(PHL)
))
$(Q)
$(
call
INSTALL_LIB,
$(HL)
,
$(PHL)
,
$(
call
LIBRUSTC_GLOB,
$(PHL)
))
$(Q)
$(
call
INSTALL_LIB,
$(HL)
,
$(PHL)
,
$(
call
LIBSYNTAX_GLOB,
$(PHL)
))
$(Q)
$(
call
INSTALL,
$(HL)
,
$(PHL)
,
$(CFG_RUSTLLVM)
)
$(Q)
$(
call
INSTALL,
$(S)
/man,
\
$(PREFIX_ROOT)
/share/man/man1,rustc.1
)
...
...
@@ -86,7 +91,7 @@ install-targets: $(INSTALL_TARGET_RULES)
HOST_LIB_FROM_HL_GLOB
=
\
$(
patsubst
$(HL)
/%,
$(PHL)
/%,
$(
wildcard
$(HL)
/
$(1)
))
$(
patsubst
$(HL)
/%,
$(PHL)
/%,
$(
1
)
)
uninstall
:
$(Q)
rm
-f
$(PHB)
/rustc
$(X)
...
...
@@ -95,10 +100,10 @@ uninstall:
$(Q)
rm
-f
$(PHL)
/
$(CFG_RUSTLLVM)
$(Q)
rm
-f
$(PHL)
/
$(CFG_RUNTIME)
$(Q)
for
i
in
\
$(
call
HOST_LIB_FROM_HL_GLOB,
$(
CORELIB_GLOB
)
)
\
$(
call
HOST_LIB_FROM_HL_GLOB,
$(
STDLIB_GLOB
)
)
\
$(
call
HOST_LIB_FROM_HL_GLOB,
$(
LIBRUSTC_GLOB
)
)
\
$(
call
HOST_LIB_FROM_HL_GLOB,
$(
LIBSYNTAX_GLOB
)
)
\
$(
call
HOST_LIB_FROM_HL_GLOB,
$(
call
CORELIB_GLOB,
$(HL)
))
\
$(
call
HOST_LIB_FROM_HL_GLOB,
$(
call
STDLIB_GLOB,
$(HL)
))
\
$(
call
HOST_LIB_FROM_HL_GLOB,
$(
call
LIBRUSTC_GLOB,
$(HL)
))
\
$(
call
HOST_LIB_FROM_HL_GLOB,
$(
call
LIBSYNTAX_GLOB,
$(HL)
))
\
;
\
do
rm
-f
$$
i
;
\
done
...
...
mk/platform.mk
浏览文件 @
2cf6bf87
...
...
@@ -21,7 +21,7 @@ CFG_DSYMUTIL := true
ifneq
($(findstring freebsd,$(CFG_OSTYPE)),)
CFG_LIB_NAME
=
lib
$(1)
.so
CFG_LIB_GLOB
=
lib
$(1)
-
*
.so
CFG_LIB_GLOB
=
$(
wildcard
$(1)
/lib
$(2)
-
*
.so
)
CFG_GCCISH_CFLAGS
+=
-fPIC
-I
/usr/local/include
CFG_GCCISH_LINK_FLAGS
+=
-shared
-fPIC
-lpthread
-lrt
CFG_GCCISH_DEF_FLAG
:=
-Wl
,--export-dynamic,--dynamic-list
=
...
...
@@ -40,7 +40,7 @@ endif
ifneq
($(findstring linux,$(CFG_OSTYPE)),)
CFG_LIB_NAME
=
lib
$(1)
.so
CFG_LIB_GLOB
=
lib
$(1)
-
*
.so
CFG_LIB_GLOB
=
$(
wildcard
$(1)
/lib
$(2)
-
*
.so
)
CFG_GCCISH_CFLAGS
+=
-fPIC
CFG_GCCISH_LINK_FLAGS
+=
-shared
-fPIC
-ldl
-lpthread
-lrt
CFG_GCCISH_DEF_FLAG
:=
-Wl
,--export-dynamic,--dynamic-list
=
...
...
@@ -76,8 +76,7 @@ endif
ifneq
($(findstring darwin,$(CFG_OSTYPE)),)
CFG_LIB_NAME
=
lib
$(1)
.dylib
CFG_LIB_GLOB
=
lib
$(1)
-
*
.dylib
CFG_LIB_DSYM_GLOB
=
lib
$(1)
-
*
.dylib.dSYM
CFG_LIB_GLOB
=
$(
wildcard
$(1)
/lib
$(2)
-
*
.dylib
$(1)
/lib
$(2)
-
*
.dylib.dSYM
)
CFG_UNIXY
:=
1
CFG_LDENV
:=
DYLD_LIBRARY_PATH
CFG_GCCISH_LINK_FLAGS
+=
-dynamiclib
-lpthread
-framework
CoreServices
-Wl
,-no_compact_unwind
...
...
@@ -174,7 +173,7 @@ ifdef CFG_WINDOWSY
CFG_EXE_SUFFIX
:=
.exe
CFG_LIB_NAME
=
$(1)
.dll
CFG_LIB_GLOB
=
$(
1)
-
*
.dll
CFG_LIB_GLOB
=
$(
wildcard
$(1)
/
$(2)
-
*
.dll
)
CFG_DEF_SUFFIX
:=
.def
ifdef
MSYSTEM
CFG_LDPATH
:=
$(CFG_LDPATH)
:
$$
PATH
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录