Skip to content

Commit 07c9727

Browse files
committed
update docs
1 parent 3fc0349 commit 07c9727

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

docs/api/description/builtin-rules.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ target("nonpnp")
395395
add_values("wdk.tracewpp.flags", "-func:TraceEvents(LEVEL,FLAGS,MSG,...)", "-func:Hexdump((LEVEL,FLAGS,MSG,...))")
396396

397397
-- add files
398-
add_files("driver/*.c", {rule = "wdk.tracewpp"})
398+
add_files("driver/*.c", {rules = "wdk.tracewpp"})
399399
```
400400

401401
## wdk.shared
@@ -414,7 +414,7 @@ target("nonpnp")
414414
add_values("wdk.tracewpp.flags", "-func:TraceEvents(LEVEL,FLAGS,MSG,...)", "-func:Hexdump((LEVEL,FLAGS,MSG,...))")
415415

416416
-- add files
417-
add_files("driver/*.c", {rule = "wdk.tracewpp"})
417+
add_files("driver/*.c", {rules = "wdk.tracewpp"})
418418
```
419419

420420
## wdk.tracewpp
@@ -431,7 +431,7 @@ target("nonpnp")
431431
add_values("wdk.tracewpp.flags", "-func:TraceEvents(LEVEL,FLAGS,MSG,...)", "-func:Hexdump((LEVEL,FLAGS,MSG,...))")
432432

433433
-- add files
434-
add_files("driver/*.c", {rule = "wdk.tracewpp"})
434+
add_files("driver/*.c", {rules = "wdk.tracewpp"})
435435
add_files("driver/*.rc")
436436
```
437437

@@ -453,15 +453,15 @@ target("usbview")
453453

454454
-- add files
455455
add_files("*.c", "*.rc")
456-
add_files("xmlhelper.cpp", {rule = "win.sdk.dotnet"})
456+
add_files("xmlhelper.cpp", {rules = "win.sdk.dotnet"})
457457
```
458458

459459
## wdk.sdk.dotnet
460460

461461
Used to specify certain c++ source files to be compiled as c++.net.
462462

463463
```lua
464-
add_files("xmlhelper.cpp", {rule = "win.sdk.dotnet"})
464+
add_files("xmlhelper.cpp", {rules = "win.sdk.dotnet"})
465465
```
466466

467467
For more information on WDK rules, see: [#159](https://github.com/xmake-io/xmake/issues/159)

docs/api/description/custom-rule.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ Files can be assigned to a specific rule regardless of their file extension. You
8585

8686
```lua
8787
target("test")
88-
add_files("src/test/*.md.in", {rule = "markdown"})
88+
add_files("src/test/*.md.in", {rules = "markdown"})
8989
```
9090

9191
A target can be superimposed to apply multiple rules to more customize its own build behavior, and even support different build environments.
9292

9393
::: tip NOTE
94-
Rules specified by `add_files("*.md", {rule = "markdown"})`, with a higher priority than the rule set by `add_rules("markdown")`.
94+
Rules specified by `add_files("*.md", {rules = "markdown"})`, with a higher priority than the rule set by `add_rules("markdown")`.
9595
:::
9696

9797
## rule

docs/api/description/project-target.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,7 +1744,7 @@ After version 2.1.9, support for adding unknown code files, by setting rule cust
17441744
```lua
17451745
target("test")
17461746
-- ...
1747-
add_files("src/test/*.md", {rule = "markdown"})
1747+
add_files("src/test/*.md", {rules = "markdown"})
17481748
```
17491749

17501750
After version 2.3.1, you can use the sourcekind parameter to force the use of the C or C++ compiler:
@@ -2587,7 +2587,7 @@ rule("markdown")
25872587
end)
25882588

25892589
target("test")
2590-
add_files("src/*.md", {rule = "markdown"})
2590+
add_files("src/*.md", {rules = "markdown"})
25912591
set_values("markdown.flags", "xxx", "xxx")
25922592
```
25932593

docs/examples/cpp/wdk.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ target("app")
2929
target("nonpnp")
3030
add_rules("wdk.driver", "wdk.env.kmdf")
3131
add_values("wdk.tracewpp.flags", "-func:TraceEvents(LEVEL,FLAGS,MSG,...)", "-func:Hexdump((LEVEL,FLAGS,MSG,...))")
32-
add_files("driver/*.c", {rule = "wdk.tracewpp"})
32+
add_files("driver/*.c", {rules = "wdk.tracewpp"})
3333
add_files("driver/*.rc")
3434

3535
target("app")
@@ -54,7 +54,7 @@ target("kcs")
5454
target("msdsm")
5555
add_rules("wdk.driver", "wdk.env.wdm")
5656
add_values("wdk.tracewpp.flags", "-func:TracePrint((LEVEL,FLAGS,MSG,...))")
57-
add_files("*.c", {rule = "wdk.tracewpp"})
57+
add_files("*.c", {rules = "wdk.tracewpp"})
5858
add_files("*.rc", "*.inf")
5959
add_files("*.mof|msdsm.mof")
6060
add_files("msdsm.mof", {values = {wdk_mof_header = "msdsmwmi.h"}})

docs/examples/cpp/winsdk.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ target("usbview")
44
add_rules("win.sdk.application")
55

66
add_files("*.c", "*.rc")
7-
add_files("xmlhelper.cpp", {rule = "win.sdk.dotnet"})
7+
add_files("xmlhelper.cpp", {rules = "win.sdk.dotnet"})
88
```
99

1010
If you want to known more information, you can see [#173](https://github.com/xmake-io/xmake/issues/173).

docs/guide/project-configuration/custom-rule.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ target("test")
6666
```lua
6767
target("test")
6868
set_kind("binary")
69-
add_files("src/*.md", {rule = "markdown"}) -- specify rule for specific files
69+
add_files("src/*.md", {rules = "markdown"}) -- specify rule for specific files
7070
```
7171

7272
::: tip Note
73-
Rules specified via `add_files("*.md", {rule = "markdown"})` have higher priority than rules set via `add_rules("markdown")`.
73+
Rules specified via `add_files("*.md", {rules = "markdown"})` have higher priority than rules set via `add_rules("markdown")`.
7474
:::
7575

7676
## Rule Lifecycle {#rule-lifecycle}

docs/posts/quickstart-4-basic-project-settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ After version 2.1.9, it supports adding unknown code files. By setting rule cust
333333
```lua
334334
target("test")
335335
-- ...
336-
add_files("src/test/*. md", {rule = "markdown"})
336+
add_files("src/test/*. md", {rules = "markdown"})
337337
```
338338

339339
And after version 2.1.9, you can use the force parameter to forcibly disable the automatic detection of cxflags, cflags and other compilation options, and pass it directly to the compiler, even if the compiler may not support it, it will be set:

0 commit comments

Comments
 (0)