diff options
| -rw-r--r-- | README.md | 28 | ||||
| -rw-r--r-- | zh/README.md | 30 |
2 files changed, 53 insertions, 5 deletions
@@ -682,12 +682,36 @@ And add `--backtrace` to get the verbose backtrace info, then you can submit the $ xmake -v --backtrace ``` -#### How to see verbose compiling warnings and arguments? +#### How to see verbose compiling warnings? ```bash -$ xmake [-v|--verbose] +$ xmake [-w|--warning] ``` +#### How to scan source code and generate xmake.lua automaticlly + +You only need run the following command: + +```bash +$ xmake +``` + +xmake will scan all source code in current directory and build it automaticlly. + +And we can run it directly. + +```bash +$ xmake run +``` + +If we only want to generate xmake.lua file, we can run: + +```bash +$ xmake f -y +``` + +If you want to known more information please see [Scan source codes and build project without makefile](http://tboox.org/2017/01/07/build-without-makefile/) + ## Backers Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/xmake#backer)] diff --git a/zh/README.md b/zh/README.md index 2a2ef95d..98fd70a1 100644 --- a/zh/README.md +++ b/zh/README.md @@ -737,14 +737,38 @@ $ xmake [-v|--verbose] $ xmake -v --backtrace ``` -#### 怎样看实时编译警告和详细的编译参数? +#### 怎样看实时编译警告信息? -加上`-v`选项启用详细输出就行了。 +为了避免刷屏,在构建时候,默认是不实时输出警告信息的,如果想要看的话可以加上`-w`选项启用编译警告输出就行了。 ```bash -$ xmake [-v|--verbose] +$ xmake [-w|--warning] ``` +#### 怎样基于源码自动生成xmake.lua + +如果你想临时写一两个测试代码、或者手上有一些移植过来的零散源码想要快速编译运行,可以不用专门xmake.lua,直接运行: + +```bash +$ xmake +``` + +xmake会自动扫描分析当前的源码目录,识别程序结构和类型,生成一个xmake.lua,并且会尝试直接构建它。 + +如果编译成功,可以直接运行: + +```bash +$ xmake run +``` + +当然,如果仅仅只是想要生成xmake.lua,默认不去构建,可以执行: + +```bash +$ xmake f -y +``` + +更多相关介绍,请参考文章:[xmake新增智能代码扫描编译模式,无需手写任何make文件](http://tboox.org/cn/2017/01/07/build-without-makefile/) + ## 支持项目 xmake项目属于个人开源项目,它的发展需要您的帮助,如果您愿意支持xmake项目的开发,欢迎为其捐赠,支持它的发展。 🙏 [[支持此项目](https://opencollective.com/xmake#backer)] |
