aboutsummaryrefslogtreecommitdiff
path: root/old
diff options
context:
space:
mode:
authorruki <waruqi@gmail.com>2019-06-23 10:21:53 +0800
committerruki <waruqi@gmail.com>2019-06-23 10:21:53 +0800
commit2971f432b0da0d787507ed098d5bbfd417d6f949 (patch)
treebb8fe6136941f18c88e4ac054510a0974eca6639 /old
parent151abcd668b6eb129acb0bc028e0bef3ed87bd35 (diff)
downloadxmake-docs-2971f432b0da0d787507ed098d5bbfd417d6f949.tar.gz
xmake-docs-2971f432b0da0d787507ed098d5bbfd417d6f949.zip
fix tip and warn
Diffstat (limited to 'old')
-rw-r--r--old/README.md14
-rw-r--r--old/manual.md50
-rw-r--r--old/zh/README.md14
-rw-r--r--old/zh/manual.md52
-rw-r--r--old/zh/plugins.md2
5 files changed, 66 insertions, 66 deletions
diff --git a/old/README.md b/old/README.md
index 594da19f..c30d01b1 100644
--- a/old/README.md
+++ b/old/README.md
@@ -807,7 +807,7 @@ $ xmake f -p linux --sdk=/home/toolchains_sdkdir --bin=/usr/opt/bin
$ xmake
```
-<p class="tips">
+<p class="tip">
Before v2.2.1 version, this parameter name is `--toolchains`, exists more ambiguous, so we changed to `--bin=` to set the bin directory.
</p>
@@ -839,7 +839,7 @@ $ xmake f -p linux --sdk=/user/toolsdk --as=armv7-linux-as
If the 'AS' environment variable exists, it will use the values specified in the current environment variables.
-<p class="tips">
+<p class="tip">
We can set a unknown compiler as like-gcc/clang compiler, .e.g `xmake f --as=gcc@/home/xxx/asmips.exe`
</p>
@@ -853,7 +853,7 @@ $ xmake f -p linux --sdk=/user/toolsdk --cc=armv7-linux-clang
If the 'CC' environment variable exists, it will use the values specified in the current environment variables.
-<p class="tips">
+<p class="tip">
We can set a unknown compiler as like-gcc/clang compiler, .e.g `xmake f --cc=gcc@/home/xxx/ccmips.exe`
</p>
@@ -867,7 +867,7 @@ $ xmake f -p linux --sdk=/user/toolsdk --cxx=armv7-linux-clang++
If the 'CXX' environment variable exists, it will use the values specified in the current environment variables.
-<p class="tips">
+<p class="tip">
We can set a unknown compiler as like-gcc/clang compiler, .e.g `xmake f --cxx=g++@/home/xxx/c++mips.exe`
</p>
@@ -881,7 +881,7 @@ $ xmake f -p linux --sdk=/user/toolsdk --ld=armv7-linux-clang++
If the 'LD' environment variable exists, it will use the values specified in the current environment variables.
-<p class="tips">
+<p class="tip">
We can set a unknown compiler as like-gcc/clang linker, .e.g `xmake f --ld=g++@/home/xxx/c++mips.exe`
</p>
@@ -895,7 +895,7 @@ $ xmake f -p linux --sdk=/user/toolsdk --sh=armv7-linux-clang++
If the 'SH' environment variable exists, it will use the values specified in the current environment variables.
-<p class="tips">
+<p class="tip">
We can set a unknown compiler as like-gcc/clang linker, .e.g `xmake f --sh=g++@/home/xxx/c++mips.exe`
</p>
@@ -909,7 +909,7 @@ $ xmake f -p linux --sdk=/user/toolsdk --ar=armv7-linux-ar
If the 'AR' environment variable exists, it will use the values specified in the current environment variables.
-<p class="tips">
+<p class="tip">
We can set a unknown compiler as like-ar archiver, .e.g `xmake f --ar=ar@/home/xxx/armips.exe`
</p>
diff --git a/old/manual.md b/old/manual.md
index 6e775f5c..89e85fd4 100644
--- a/old/manual.md
+++ b/old/manual.md
@@ -226,7 +226,7 @@ $ xmake
###### Is the given options enabled
-<p class="tips">
+<p class="tip">
This interface has been deprecated after v2.2.2, please use [has_config](#has_config) instead.
</p>
@@ -271,7 +271,7 @@ if is_config("test", "hello.*") then
end
```
-<p class="tips">
+<p class="tip">
This interface is not only able to determine the custom options defined through the [option](#option),
but also to determine the built-in global and local configuration.
</p>
@@ -309,7 +309,7 @@ $ xmake f --test1=no
$ xmake f --test1=false
```
-<p class="tips">
+<p class="tip">
This interface can determine not only the built-in global and local configs,
but also the custom options defined through the [option](#option).
</p>
@@ -338,7 +338,7 @@ target("test")
If the remote dependencies are added via the optional add-on package added by `add_requires`, or the current platform does not support the actual installation, then `has_package` will return false.
Indicates that it does not exist, and then does some special processing for other flags definitions and even source file compilation controls.
-<p class="tips">
+<p class="tip">
The difference between this interface and [has_config](#has_config) is that [has_config](#has_config) is used for [option](#option) whereas this is used for [add_requires](#add_requires).
</p>
@@ -457,7 +457,7 @@ set_xmakever("2.1.0")
###### Add sub-project directories
-<p class="tips">
+<p class="tip">
For xmake 2.x and above, try to use the [includes](#includes) interface, which is a generic version of add_subdirs and add_subfiles, and supports some built-in extensions.
</p>
@@ -495,7 +495,7 @@ $ xmake build tbox
###### Add sub-project files
-<p class="tips">
+<p class="tip">
For xmake 2.x and above, try to use the [includes](#includes) interface, which is a generic version of add_subdirs and add_subfiles, and supports some built-in extensions.
</p>
@@ -1125,7 +1125,7 @@ target("test")
set_options("hello")
```
-<p class="warning">
+<p class="warn">
Some settings defined in [option](#option) will affect this `target` target only after calling `set_options` for the association to take effect, such as macro definitions, link libraries, compile options, etc.
</p>
@@ -1272,7 +1272,7 @@ The c standard and the c++ standard can be set at the same time, for example:
set_languages("c99", "cxx11")
```
-<p class="warning">
+<p class="warn">
Instead of setting the specified standard, the compiler will compile according to this standard. After all, each compiler supports different strengths, but xmake will try to adapt the support standard of the current compiler tool to the greatest extent possible. . .
<br><br>
E.g:
@@ -1285,7 +1285,7 @@ Users do not need to make any additional modifications. .
###### Set output directories for header files
-<p class="warning">
+<p class="warn">
Note that this interface has been deprecated after version 2.2.5, please use [add_headerfiles](#targetadd_headerfiles) instead.
</p>
@@ -1898,7 +1898,7 @@ target("test")
###### Set auto-generated config header file
-<p class="warning">
+<p class="warn">
After the 2.2.5 version, this interface has been deprecated, please use [add_configfiles](#targetadd_configfiles).
After the 2.1.5 version, this interface has been deprecated, please use [set_config_header](#targetset_config_header).
</p>
@@ -1949,7 +1949,7 @@ target("test")
###### Set macro prefix in auto-generated config header
-<p class="warning">
+<p class="warn">
After the 2.2.5 version, this interface has been deprecated, please use [add_configfiles](#targetadd_configfiles).
After the 2.1.5 version, this interface has been deprecated, please use [set_config_header](#targetset_config_header).
</p>
@@ -1970,7 +1970,7 @@ Then, the $(prefix) of `add_defines_h("$(prefix)_TYPE_HAVE_WCHAR")` in the optio
###### Set macro prefix in auto-generated config header and prefix
-<p class="warning">
+<p class="warn">
After the 2.2.5 version, this interface has been deprecated, please use [add_configfiles](#targetadd_configfiles).
After the 2.1.5 version, this interface has been deprecated, please use [set_config_header](#targetset_config_header).
</p>
@@ -2299,7 +2299,7 @@ And exclude `src/subdir/xxx.c` (that is, don't delete this file).
###### Add installed header files
-<p class="warning">
+<p class="warn">
Note that this interface has been deprecated after version 2.2.5, please use [add_headerfiles](#targetadd_headerfiles) instead.
</p>
@@ -2437,7 +2437,7 @@ In the code is equivalent to: `#undef DEBUG`
###### Add macro definition to auto-generated config header
-<p class="warning">
+<p class="warn">
After the 2.2.5 version, this interface has been deprecated, please use [add_configfiles](#targetadd_configfiles).
</p>
@@ -2447,7 +2447,7 @@ Add macro definitions to the `config.h` configuration file, `config.h` settings,
###### Add macro undefinition to auto-generated config header
-<p class="warning">
+<p class="warn">
After the 2.2.5 version, this interface has been deprecated, please use [add_configfiles](#targetadd_configfiles).
</p>
@@ -2463,7 +2463,7 @@ Add compilation options only for c code
add_cflags("-g", "-O2", "-DDEBUG")
```
-<p class="warning">
+<p class="warn">
All option values ​​are based on the definition of gcc as standard. If other compilers are not compatible (for example: vc), xmake will automatically convert it internally to the corresponding option values ​​supported by the compiler.
Users don't have to worry about compatibility. If other compilers don't have matching values, xmake will automatically ignore the settings.
</p>
@@ -2674,7 +2674,7 @@ Similar to [add_cfunc](#targetadd_cfunc), only the function interface detected i
###### Add c functions for checking
-<p class="warning">
+<p class="warn">
This interface is the interface shared by `target` and `option`, but the interface behavior is slightly different.
</p>
@@ -2698,7 +2698,7 @@ target("test")
This option detects if there are some interfaces of `setjmp`. If the test passes, then the `test` target program will add the macro definition of `HAVE_SETJMP`.
-<p class="warning">
+<p class="warn">
Note that using this interface to detect dependencies in `option` requires adding a separate [add_cincludes](#targetadd_cincludes) header file search path and specifying [add_links](#targetadd_links) link library (optional). Otherwise the specified function is not detected.
<br><br>
And some header file interfaces are defined by macro switches, so it is best to pass the dependent macro switch with [add_defines](#targetadd_defines) when detecting.
@@ -3678,7 +3678,7 @@ option("smallest")
add_rbindings("zlib", "mysql", "sqlite3", "openssl", "polarssl", "pcre2", "pcre", "base")
```
-<p class="warning">
+<p class="warn">
It should be noted that the command line configuration is sequential. You can disable all modules by enabling smallest and then add other options to enable them one by one.
</p>
@@ -4073,7 +4073,7 @@ The last variable argument list is retrieved by `option.get("contents")` in the
It is only used for grouping of menus. Of course, the plugin will use `plugin` by default. The built-in task will use `action` by default, but it is just a convention.
-<p class="tips">
+<p class="tip">
You can use any name you define yourself. The same name will be grouped and displayed together. If it is set to `plugin`, it will be displayed in the Plugins group of xmake.
</p>
@@ -4227,7 +4227,7 @@ target("test")
A target can be superimposed to apply multiple rules to more customize its own build behavior, and even support different build environments.
-<p class="tips">
+<p class="tip">
Rules specified by `add_files("*.md", {rule = "markdown"})`, with a higher priority than the rule set by `add_rules("markdown")`.
</p>
@@ -5163,7 +5163,7 @@ on_run(function (target)
end)
```
-<p class="warning">
+<p class="warn">
In order to ensure that the description field of the outer layer is as simple and secure as possible, it is generally not recommended to use the interface and module operation api in this domain. Therefore, most module interfaces can only be used in the script domain to implement complex functions. </br>
Of course, a small number of read-only built-in interfaces can still be used in the description field, as shown in the following table:
</p>
@@ -5790,7 +5790,7 @@ The system operation module belongs to the built-in module. It can be called dir
This module is also a native module of lua, and xmake has been extended to provide more practical interfaces.
-<p class="tips">
+<p class="tip">
Only some readonly interfaces (for example: `os.getenv`, `os.arch`) in the os module can be used in the description field. Other interfaces can only be used in the script domain, for example: `os.cp`, `os .rm`etc.
</p>
@@ -6054,7 +6054,7 @@ os.run("echo hello %s!", "xmake")
os.run("ls -l $(buildir)")
```
-<p class="warning">
+<p class="warn">
Using this interface to execute shell commands can easily reduce the cross-platform build. For `os.run("cp ..")`, try to use `os.cp` instead. <br>
If you must use this interface to run the shell program, please use the [config.plat](#config-plat) interface to determine the platform support.
</p>
@@ -8501,7 +8501,7 @@ http.download("https://xmake.io", "/tmp/index.html")
This interface is used to run commands via `sudo` and provides platform consistency handling, which can be used for scripts that require root privileges to run.
-<p class="warning">
+<p class="warn">
In order to ensure security, unless you must use it, try not to use this interface in other cases.
</p>
diff --git a/old/zh/README.md b/old/zh/README.md
index 73c63a7a..5db6935d 100644
--- a/old/zh/README.md
+++ b/old/zh/README.md
@@ -842,7 +842,7 @@ $ xmake f -p linux --sdk=/home/toolchains_sdkdir --bin=/usr/opt/bin
$ xmake
```
-<p class="tips">
+<p class="tip">
v2.2.1版本之前,这个参数名是`--toolchains`,比较有歧义,因此新版本中,统一改成`--bin=`来设置bin目录。
</p>
@@ -880,7 +880,7 @@ $ xmake f -p linux --sdk=/user/toolsdk --as=armv7-linux-as
如果存在`AS`环境变量的话,会优先使用当前环境变量中指定的值。
-<p class="tips">
+<p class="tip">
如果指定的编译器名不是那些xmake内置可识别的名字(带有gcc, clang等字样),那么编译器工具检测就会失败。
这个时候我们可以通过:`xmake f --as=gcc@/home/xxx/asmips.exe` 设置ccmips.exe编译器作为类gcc的使用方式来编译。
也就是说,在指定编译器为`asmips.exe`的同时,告诉xmake,它跟gcc用法和参数选项基本相同。
@@ -898,7 +898,7 @@ $ xmake f -p linux --sdk=/user/toolsdk --cc=armv7-linux-clang
如果存在`CC`环境变量的话,会优先使用当前环境变量中指定的值。
-<p class="tips">
+<p class="tip">
如果指定的编译器名不是那些xmake内置可识别的名字(带有gcc, clang等字样),那么编译器工具检测就会失败。
这个时候我们可以通过:`xmake f --cc=gcc@/home/xxx/ccmips.exe` 设置ccmips.exe编译器作为类gcc的使用方式来编译。
也就是说,在指定编译器为`ccmips.exe`的同时,告诉xmake,它跟gcc用法和参数选项基本相同。
@@ -916,7 +916,7 @@ $ xmake f -p linux --sdk=/user/toolsdk --cxx=armv7-linux-clang++
如果存在`CXX`环境变量的话,会优先使用当前环境变量中指定的值。
-<p class="tips">
+<p class="tip">
如果指定的编译器名不是那些xmake内置可识别的名字(带有gcc, clang等字样),那么编译器工具检测就会失败。
这个时候我们可以通过:`xmake f --cxx=clang++@/home/xxx/c++mips.exe` 设置c++mips.exe编译器作为类clang++的使用方式来编译。
也就是说,在指定编译器为`c++mips.exe`的同时,告诉xmake,它跟clang++用法和参数选项基本相同。
@@ -934,7 +934,7 @@ $ xmake f -p linux --sdk=/user/toolsdk --ld=armv7-linux-clang++
如果存在`LD`环境变量的话,会优先使用当前环境变量中指定的值。
-<p class="tips">
+<p class="tip">
如果指定的编译器名不是那些xmake内置可识别的名字(带有gcc, clang等字样),那么链接器工具检测就会失败。
这个时候我们可以通过:`xmake f --ld=g++@/home/xxx/c++mips.exe` 设置c++mips.exe链接器作为类g++的使用方式来编译。
也就是说,在指定链接器为`c++mips.exe`的同时,告诉xmake,它跟g++用法和参数选项基本相同。
@@ -950,7 +950,7 @@ $ xmake f -p linux --sdk=/user/toolsdk --sh=armv7-linux-clang++
如果存在`SH`环境变量的话,会优先使用当前环境变量中指定的值。
-<p class="tips">
+<p class="tip">
如果指定的编译器名不是那些xmake内置可识别的名字(带有gcc, clang等字样),那么链接器工具检测就会失败。
这个时候我们可以通过:`xmake f --sh=g++@/home/xxx/c++mips.exe` 设置c++mips.exe链接器作为类g++的使用方式来编译。
也就是说,在指定链接器为`c++mips.exe`的同时,告诉xmake,它跟g++用法和参数选项基本相同。
@@ -966,7 +966,7 @@ $ xmake f -p linux --sdk=/user/toolsdk --ar=armv7-linux-ar
如果存在`AR`环境变量的话,会优先使用当前环境变量中指定的值。
-<p class="tips">
+<p class="tip">
如果指定的编译器名不是那些xmake内置可识别的名字(带有ar等字样),那么链接器工具检测就会失败。
这个时候我们可以通过:`xmake f --ar=ar@/home/xxx/armips.exe` 设置armips.exe链接器作为类ar的使用方式来编译。
也就是说,在指定链接器为`armips.exe`的同时,告诉xmake,它跟ar用法和参数选项基本相同。
diff --git a/old/zh/manual.md b/old/zh/manual.md
index 38c718e4..2aec722f 100644
--- a/old/zh/manual.md
+++ b/old/zh/manual.md
@@ -241,7 +241,7 @@ $ xmake
###### 判断选项是否启用
-<p class="tips">
+<p class="tip">
此接口在2.2.2版本之后已经弃用,请使用[has_config](#has_config)来代替。
</p>
@@ -292,7 +292,7 @@ if is_config("test", "hello.*") then
end
```
-<p class="tips">
+<p class="tip">
此接口不仅能够判断通过[option](#option)定义的自定义配置选项,同时还能判断内置的全局配置、本地配置。
</p>
@@ -330,7 +330,7 @@ $ xmake f --test1=no
$ xmake f --test1=false
```
-<p class="tips">
+<p class="tip">
此接口不仅能够判断内置的全局配置、本地配置,同时还可以判断通过[option](#option)定义的自定义配置选项。
</p>
@@ -359,7 +359,7 @@ target("test")
如果通过`add_requires`添加的可选依赖包,远程下载安装失败,或者当前平台不支持导致实际上没有被正常安装上,那么`has_package`就会返回false,
表示不存在,然后对其他flags定义甚至源文件编译控制做一些特殊处理。
-<p class="tips">
+<p class="tip">
此接口跟[has_config](#has_config)的区别在于,[has_config](#has_config)用于[option](#option),而它用于[add_requires](#add_requires)。
</p>
@@ -478,7 +478,7 @@ set_xmakever("2.1.0")
###### 添加子工程目录
-<p class="tips">
+<p class="tip">
xmake 2.x以上版本,请尽量使用[includes](#includes)这个接口,这个是add_subdirs和add_subfiles的通用版本,并且支持一些内建扩展模块。
</p>
@@ -523,7 +523,7 @@ $ xmake build tbox
###### 添加子工程文件
-<p class="tips">
+<p class="tip">
xmake 2.x以上版本,请尽量使用[includes](#includes)这个接口,这个是add_subdirs和add_subfiles的通用版本,并且支持一些内建扩展模块。
</p>
@@ -1150,7 +1150,7 @@ target("test")
set_options("hello")
```
-<p class="warning">
+<p class="warn">
只有调用`set_options`进行关联生效后,[option](#option) 中定义的一些设置才会影响到此`target`目标,例如:宏定义、链接库、编译选项等等
</p>
@@ -1298,7 +1298,7 @@ c标准和c++标准可同时进行设置,例如:
set_languages("c99", "cxx11")
```
-<p class="warning">
+<p class="warn">
并不是设置了指定的标准,编译器就一定会按这个标准来编译,毕竟每个编译器支持的力度不一样,但是xmake会尽最大可能的去适配当前编译工具的支持标准。。。
<br><br>
例如:
@@ -1311,7 +1311,7 @@ windows下vs的编译器并不支持按c99的标准来编译c代码,只能支
###### 设置头文件安装目录
-<p class="warning">
+<p class="warn">
注,2.2.5版本之后,此接口已废弃,请使用[add_headerfiles](#targetadd_headerfiles)代替。
</p>
@@ -1922,7 +1922,7 @@ target("test")
###### 设置自动生成的配置头文件路径
-<p class="warning">
+<p class="warn">
2.2.5版本之后,此接口已废弃,请使用[add_configfiles](#targetadd_configfiles)。
2.1.5版本之后,此接口已废弃,请使用[set_config_header](#targetset_config_header)。
</p>
@@ -1973,7 +1973,7 @@ target("test")
###### 设置自动生成的头文件中宏定义命名前缀
-<p class="warning">
+<p class="warn">
2.2.5版本之后,此接口已废弃,请使用[add_configfiles](#targetadd_configfiles)。
2.1.5版本之后,此接口已废弃,请使用[set_config_header](#targetset_config_header)。
</p>
@@ -1993,7 +1993,7 @@ target("test")
###### 设置自动生成的配置头文件路径和前缀
-<p class="warning">
+<p class="warn">
2.2.5版本之后,此接口已废弃,请使用[add_configfiles](#targetadd_configfiles)。
</p>
@@ -2319,7 +2319,7 @@ target("test")
###### 添加安装的头文件
-<p class="warning">
+<p class="warn">
注,2.2.5版本之后,此接口已废弃,请使用[add_headerfiles](#targetadd_headerfiles)代替。
</p>
@@ -2457,7 +2457,7 @@ add_undefines("DEBUG")
###### 添加宏定义到头文件
-<p class="warning">
+<p class="warn">
2.2.5版本之后,此接口已废弃,请使用[add_configfiles](#targetadd_configfiles)。
</p>
@@ -2467,7 +2467,7 @@ add_undefines("DEBUG")
###### 取消宏定义到头文件
-<p class="warning">
+<p class="warn">
2.2.5版本之后,此接口已废弃,请使用[add_configfiles](#targetadd_configfiles)。
</p>
@@ -2483,7 +2483,7 @@ add_undefines("DEBUG")
add_cflags("-g", "-O2", "-DDEBUG")
```
-<p class="warning">
+<p class="warn">
所有选项值都基于gcc的定义为标准,如果其他编译器不兼容(例如:vc),xmake会自动内部将其转换成对应编译器支持的选项值。
用户无需操心其兼容性,如果其他编译器没有对应的匹配值,那么xmake会自动忽略器设置。
</p>
@@ -2695,7 +2695,7 @@ target("demo")
###### 添加c库函数检测
-<p class="warning">
+<p class="warn">
此接口是`target`和`option`共用的接口,但是接口行为稍有不同。
</p>
@@ -2719,7 +2719,7 @@ target("test")
此选项检测是否存在`setjmp`的一些接口,如果检测通过那么`test`目标程序将会加上`HAVE_SETJMP`的宏定义。
-<p class="warning">
+<p class="warn">
需要注意的是,在`option`中使用此接口检测依赖函数,需要同时使用独立的[add_cincludes](#targetadd_cincludes)增加头文件搜索路径,指定[add_links](#targetadd_links)链接库(可选),否则检测不到指定函数。
<br><br>
并且某些头文件接口是通过宏开关分别定义的,那么检测的时候最好通过[add_defines](#targetadd_defines)带上依赖的宏开关。
@@ -3087,7 +3087,7 @@ target("test")
并且此接口对于`xmake project -k vs201x`等插件生成的IDE文件,也会添加对应的头文件进去。
-<p class="tips">
+<p class="tip">
需要注意的是,之前的[add_headers](#targetadd_headers)接口已经被废弃,新版本请用此接口替代,这个老接口在编译过程中也会自动复制头文件到build目录,这个逻辑设计的并不是很好。
</p>
@@ -3757,7 +3757,7 @@ option("smallest")
add_rbindings("zlib", "mysql", "sqlite3", "openssl", "polarssl", "pcre2", "pcre", "base")
```
-<p class="warning">
+<p class="warn">
需要注意的是,命令行配置是有顺序的,你可以先通过启用smallest禁用所有模块,然后添加其他选项,逐一启用。
</p>
@@ -4152,7 +4152,7 @@ $ xmake echo --color=red --bright hello xmake!
仅仅用于菜单的分组显示,当然插件默认会用`plugin`,内置任务默认会用:`action`,但也仅仅只是个约定。
-<p class="tips">
+<p class="tip">
你可以使用任何自己定义的名字,相同名字会分组归类到一起显示,如果设置为`plugin`,就会显示到xmake的Plugins分组中去。
</p>
@@ -4306,7 +4306,7 @@ target("test")
一个target可以叠加应用多个rules去更加定制化实现自己的构建行为,甚至支持不同的构建环境。
-<p class="tips">
+<p class="tip">
通过`add_files("*.md", {rule = "markdown"})`方式指定的规则,优先级高于`add_rules("markdown")`设置的规则。
</p>
@@ -5238,7 +5238,7 @@ on_run(function (target)
end)
```
-<p class="warning">
+<p class="warn">
为了保证外层的描述域尽可能简洁、安全,一般不建议在这个域使用接口和模块操作api,因此大部分模块接口只能脚本域使用,来实现复杂功能。</br>
当然少部分只读的内置接口还是可以在描述域使用的,具体见下表:
</p>
@@ -5865,7 +5865,7 @@ target("test")
此模块也是lua的原生模块,xmake在其基础上进行了扩展,提供更多实用的接口。
-<p class="tips">
+<p class="tip">
os模块里面只有部分readonly接口(例如:`os.getenv`, `os.arch`)是可以在描述域中使用,其他接口只能在脚本域中使用,例如:`os.cp`, `os.rm`等
</p>
@@ -6129,7 +6129,7 @@ os.run("echo hello %s!", "xmake")
os.run("ls -l $(buildir)")
```
-<p class="warning">
+<p class="warn">
使用此接口执行shell命令,容易使构建跨平台性降低,对于`os.run("cp ..")`这种尽量使用`os.cp`代替。<br>
如果必须使用此接口运行shell程序,请自行使用[config.plat](#config-plat)接口判断平台支持。
</p>
@@ -8553,7 +8553,7 @@ http.download("https://xmake.io", "/tmp/index.html")
此接口用于通过`sudo`来运行命令,并且提供了平台一致性处理,对于一些需要root权限运行的脚本,可以使用此接口。
-<p class="warning">
+<p class="warn">
为了保证安全性,除非必须使用的场合,其他情况下尽量不要使用此接口。
</p>
diff --git a/old/zh/plugins.md b/old/zh/plugins.md
index 964b1204..64e779f0 100644
--- a/old/zh/plugins.md
+++ b/old/zh/plugins.md
@@ -447,7 +447,7 @@ hello xmake!
XMake跟`cmake`, `premake`等其他一些构建工具的区别在于:
-<p class="warning">
+<p class="warn">
`xmake`默认是直接构建运行的,生成第三方的IDE的工程文件仅仅作为`插件`来提供。
</p>