Skip to content

Commit f7f9026

Browse files
committed
improve cross refs
1 parent 06d69be commit f7f9026

30 files changed

Lines changed: 59 additions & 0 deletions

docs/api/description/builtin-policies.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Xmake incorporates many default behaviors, such as automatically detecting and m
55
Therefore, xmake provides a way to override its default build policies, giving users a higher degree of control.
66
This is primarily achieved through the [set_policy](/api/description/project-target#set-policy) API, which can be used to modify the default behavior of targets, packages, or the entire project.
77

8+
Policies are configured via [set_policy()](/api/description/project-target#set-policy) and can be used in [target()](/api/description/project-target#target), [package()](/api/description/package-dependencies#package), or at the global scope.
9+
810
## Usage
911

1012
::: tip NOTE

docs/api/description/builtin-rules.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ We can view the complete list of built-in rules by running the following command
99
$ xmake show -l rules
1010
```
1111

12+
Built-in rules are applied to targets via [add_rules()](/api/description/project-target#add-rules). To create custom rules, see [Custom Rule API](/api/description/custom-rule). For related policy configurations, see [Built-in Policies](/api/description/builtin-policies).
13+
1214
## mode.debug
1315

1416
Add the configuration rules for the debug compilation mode for the current project xmake.lua, for example:

docs/api/description/builtin-variables.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ What are the specific parameters, you can check it out by `xmake f -h`.
4747
Since the support is directly obtained from the configuration options, it is of course convenient to extend the custom options to get the custom variables.
4848
For details on how to customize the options, see: [option](/api/description/configuration-option)
4949

50+
Built-in variables can be used in most string parameters in the description domain. For related conditional APIs, see [Conditions](/api/description/conditions) such as [is_os()](/api/description/conditions#is-os), [is_arch()](/api/description/conditions#is-arch), etc. In the script domain, use [vformat()](/api/scripts/builtin-modules/vformat) to expand built-in variables.
51+
5052
## var.$(os)
5153

5254
- Get the operating system of the current build platform

docs/api/description/conditions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Conditions are generally used to handle some special compilation platforms.
44

5+
These conditional APIs are typically used with [if-then](/guide/project-configuration/syntax-description) statements. For related built-in variables, see [Built-in Variables](/api/description/builtin-variables).
6+
57
## is_os
68

79
### Is the current compilation target system

docs/api/description/configuration-option.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ option("test2")
2626
The `option` field can be repeatedly entered to implement separate settings. If you want to display the scope settings away from the current option, you can manually call the [option_end](#option-end) interface.
2727
:::
2828

29+
Option values can be checked via [has_config()](/api/description/conditions#has-config) and [get_config()](/api/description/conditions#get-config) in conditional logic. Xmake also provides [helper detection interfaces](/api/description/helper-interfaces) for auto-detecting compiler features. For a guide on defining options, see [Define Options Guide](/guide/project-configuration/define-options).
30+
2931
## option
3032

3133
### Defining options

docs/api/description/custom-toolchain.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ Before customizing the tool, we can run the following command to view the comple
7373
$ xmake show -l toolchains
7474
```
7575

76+
Custom toolchains are applied to targets via [set_toolchains()](/api/description/project-target#set-toolchains). For a getting started tutorial, see the [Toolchain Configuration Guide](/guide/project-configuration/toolchain-configuration).
77+
7678
## toolchain
7779

7880
- Define toolchain

docs/api/description/helper-interfaces.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Among them, we provide two types of interfaces, `check_xxx` and `configvar_check
88

99
And `check_xxx` only defines related macros to participate in compilation, but it will not be persisted in `config.h.in`.
1010

11+
Helper interfaces are imported via [includes()](/api/description/global-interfaces#includes). Detection results can be checked with [has_config()](/api/description/conditions#has-config) and can also be used with [option()](/api/description/configuration-option).
12+
1113
For related issues, see:
1214

1315
-[#342](https://github.com/xmake-io/xmake/issues/342)

docs/api/description/plugin-and-task.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Xmake can implement custom tasks or plugins. The core of both is the `task` task. The two are actually the same. The xmake plugins are implemented with `task`.
44

5+
To extend the build process rather than define standalone tasks, see [Custom Rules](/api/description/custom-rule). For a plugin development tutorial, see the [Plugin Development Guide](/guide/extensions/plugin-development).
6+
57
## task
68

79
- Defining plugins or tasks

docs/api/scripts/builtin-modules/hash.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
The hash module provides hash value calculation and UUID generation functions. It is a built-in module of xmake.
55

6+
For string operations, see the [string module](/api/scripts/builtin-modules/string). For file operations, see the [io module](/api/scripts/builtin-modules/io).
7+
68
## hash.md5
79

810
- Calculate the MD5 hash value of a file or binary data

docs/api/scripts/builtin-modules/io.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
The io operation module extends lua's built-in io module to provide more easy-to-use interfaces.
55

6+
For file and directory management (copy, move, delete, etc.), see the [os module](/api/scripts/builtin-modules/os). For path joining and parsing, see the [path module](/api/scripts/builtin-modules/path). For serialization, see [string.serialize](/api/scripts/builtin-modules/string#string-serialize).
7+
68
## io.open
79

810
- Open file for reading and writing

0 commit comments

Comments
 (0)