Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
94731fa4
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,发现更多精彩内容 >>
提交
94731fa4
编写于
3月 30, 2011
作者:
G
Graydon Hoare
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add support for --enable-foo and --disable-foo flags to configure, that Makefile.in respects.
上级
301cfe13
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
87 addition
and
14 deletion
+87
-14
Makefile.in
Makefile.in
+10
-6
configure
configure
+77
-8
未找到文件。
Makefile.in
浏览文件 @
94731fa4
...
...
@@ -162,14 +162,14 @@ else
$(info cfg
:
have only ocaml bytecode compiler)
endif
ifdef
BOOT_PROFILE
$(info cfg
:
forcing native bootstrap compiler (BOOT_PROFILE))
ifdef
CFG_
BOOT_PROFILE
$(info cfg
:
forcing native bootstrap compiler (
CFG_
BOOT_PROFILE))
CFG_BOOT_NATIVE
:=
1
CFG_OCAMLOPT_PROFILE_FLAGS
:=
-p
endif
ifdef
BOOT_DEBUG
$(info cfg
:
forcing bytecode bootstrap compiler (DEBUG))
ifdef
CFG_
BOOT_DEBUG
$(info cfg
:
forcing bytecode bootstrap compiler (
CFG_BOOT_
DEBUG))
CFG_BOOT_NATIVE
:=
endif
...
...
@@ -179,8 +179,8 @@ else
$(info cfg
:
building bytecode bootstrap compiler)
endif
ifdef
NO
_VALGRIND
$(info cfg
:
disabling valgrind (
NO
_VALGRIND))
ifdef
CFG_DISABLE
_VALGRIND
$(info cfg
:
disabling valgrind (
CFG_DISABLE
_VALGRIND))
CFG_VALGRIND
:=
endif
...
...
@@ -201,6 +201,10 @@ else
endif
endif
ifdef
CFG_DISABLE_DOCS
$(info cfg
:
disabling doc build (CFG_DISABLE_DOCS))
DOCS
:=
endif
######################################################################
# Target-and-rule "utility variables"
...
...
configure
浏览文件 @
94731fa4
...
...
@@ -4,6 +4,12 @@ msg() {
echo
"configure:
$1
"
}
step_msg
()
{
msg
msg
"
$1
"
msg
}
err
()
{
echo
"configure: error:
$1
"
exit
1
...
...
@@ -67,6 +73,44 @@ probe_need() {
fi
}
opt
()
{
local
OP
=
$1
local
DEFAULT
=
$2
shift
shift
local
DOC
=
"
$*
"
local
FLAG
=
""
if
[
$DEFAULT
-eq
0
]
then
FLAG
=
"enable"
else
FLAG
=
"disable"
DOC
=
"don't
$DOC
"
fi
if
[
$HELP
-eq
0
]
then
for
arg
in
$CFG_CONFIGURE_ARGS
do
if
[
"
$arg
"
=
"--
${
FLAG
}
-
${
OP
}
"
]
then
OP
=
$(
echo
$OP
|
tr
'a-z'
'A-Z'
)
FLAG
=
$(
echo
$FLAG
|
tr
'a-z'
'A-Z'
)
local
V
=
"CFG_
${
FLAG
}
_
${
OP
}
"
eval
$V
=
1
putvar
$V
fi
done
else
if
[
!
-z
"
$META
"
]
then
OP
=
"
$OP
=<
$META
>"
fi
printf
" --%-30s %s
\n
"
"
$FLAG
-
$OP
"
"
$DOC
"
fi
}
msg
"looking for configure programs"
need_cmd
mkdir
need_cmd
printf
...
...
@@ -84,16 +128,40 @@ msg "inspecting environment"
CFG_OSTYPE
=
$(
uname
-s
)
CFG_CPUTYPE
=
$(
uname
-m
)
CFG_SELF
=
$(
echo
$0
|
tr
'\'
'/'
)
CFG_SELF
=
$(
echo
$0
|
tr
'\
\
'
'/'
)
CFG_SRC_DIR
=
${
CFG_SELF
%
${
CFG_SELF
##*/
}}
CFG_BUILD_DIR
=
$(
echo
$PWD
|
tr
'\'
'/'
)
CFG_BUILD_DIR
=
$(
echo
$PWD
|
tr
'\
\
'
'/'
)
CFG_CONFIGURE_ARGS
=
"
$@
"
OPTIONS
=
""
HELP
=
0
if
[
"
$1
"
=
"--help"
]
then
HELP
=
1
shift
echo
""
echo
"Usage:
$CFG_SELF
[options]"
echo
""
echo
"Options:"
echo
""
else
msg
"recreating config.mk"
echo
''
>
config.mk
step_msg
"processing
$CFG_SELF
args"
fi
msg
"recreating config.mk"
echo
''
>
config.mk
opt valgrind 1
"run tests with valgrind"
opt docs 1
"build documentation"
if
[
$HELP
-eq
1
]
then
echo
""
exit
0
fi
msg
"making directories"
step_
msg
"making directories"
for
i
in
\
doc
\
boot/fe boot/me boot/be boot/driver boot/util
\
...
...
@@ -106,13 +174,14 @@ do
make_dir
$i
done
step_msg
"writing out basic parameters"
putvar CFG_SRC_DIR
putvar CFG_BUILD_DIR
putvar CFG_OSTYPE
putvar CFG_CPUTYPE
putvar CFG_CONFIGURE_ARGS
msg
"looking for build programs"
step_
msg
"looking for build programs"
probe_need CFG_GCC gcc
probe_need CFG_GIT git
probe_need CFG_OCAMLC ocamlc
...
...
@@ -160,7 +229,7 @@ fi
case
$CFG_LLVM_VERSION
in
(
3.0svn
|
3.0
)
msg
"found ok version of LLVM:
$CFG_LLVM_VERSION
"
step_
msg
"found ok version of LLVM:
$CFG_LLVM_VERSION
"
;;
(
*
)
err
"bad LLVM version:
$CFG_LLVM_VERSION
, need >=3.0svn"
...
...
@@ -181,4 +250,4 @@ rm -f config.mk.bak
copy
${
CFG_SRC_DIR
}
Makefile.in ./Makefile
echo
"configure:
complete"
step_msg
"
complete"
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录