2
0
ruki 5 сар өмнө
parent
commit
07c9727b4c

+ 5 - 5
docs/api/description/builtin-rules.md

@@ -395,7 +395,7 @@ target("nonpnp")
     add_values("wdk.tracewpp.flags", "-func:TraceEvents(LEVEL,FLAGS,MSG,...)", "-func:Hexdump((LEVEL,FLAGS,MSG,...))")
 
     -- add files
-    add_files("driver/*.c", {rule = "wdk.tracewpp"})
+    add_files("driver/*.c", {rules = "wdk.tracewpp"})
 ```
 
 ## wdk.shared
@@ -414,7 +414,7 @@ target("nonpnp")
     add_values("wdk.tracewpp.flags", "-func:TraceEvents(LEVEL,FLAGS,MSG,...)", "-func:Hexdump((LEVEL,FLAGS,MSG,...))")
 
     -- add files
-    add_files("driver/*.c", {rule = "wdk.tracewpp"})
+    add_files("driver/*.c", {rules = "wdk.tracewpp"})
 ```
 
 ## wdk.tracewpp
@@ -431,7 +431,7 @@ target("nonpnp")
     add_values("wdk.tracewpp.flags", "-func:TraceEvents(LEVEL,FLAGS,MSG,...)", "-func:Hexdump((LEVEL,FLAGS,MSG,...))")
 
     -- add files
-    add_files("driver/*.c", {rule = "wdk.tracewpp"})
+    add_files("driver/*.c", {rules = "wdk.tracewpp"})
     add_files("driver/*.rc")
 ```
 
@@ -453,7 +453,7 @@ target("usbview")
 
     -- add files
     add_files("*.c", "*.rc")
-    add_files("xmlhelper.cpp", {rule = "win.sdk.dotnet"})
+    add_files("xmlhelper.cpp", {rules = "win.sdk.dotnet"})
 ```
 
 ## wdk.sdk.dotnet
@@ -461,7 +461,7 @@ target("usbview")
 Used to specify certain c++ source files to be compiled as c++.net.
 
 ```lua
-add_files("xmlhelper.cpp", {rule = "win.sdk.dotnet"})
+add_files("xmlhelper.cpp", {rules = "win.sdk.dotnet"})
 ```
 
 For more information on WDK rules, see: [#159](https://github.com/xmake-io/xmake/issues/159)

+ 2 - 2
docs/api/description/custom-rule.md

@@ -85,13 +85,13 @@ Files can be assigned to a specific rule regardless of their file extension. You
 
 ```lua
 target("test")
-    add_files("src/test/*.md.in", {rule = "markdown"})
+    add_files("src/test/*.md.in", {rules = "markdown"})
 ```
 
 A target can be superimposed to apply multiple rules to more customize its own build behavior, and even support different build environments.
 
 ::: tip NOTE
-Rules specified by `add_files("*.md", {rule = "markdown"})`, with a higher priority than the rule set by `add_rules("markdown")`.
+Rules specified by `add_files("*.md", {rules = "markdown"})`, with a higher priority than the rule set by `add_rules("markdown")`.
 :::
 
 ## rule

+ 2 - 2
docs/api/description/project-target.md

@@ -1744,7 +1744,7 @@ After version 2.1.9, support for adding unknown code files, by setting rule cust
 ```lua
 target("test")
     -- ...
-    add_files("src/test/*.md", {rule = "markdown"})
+    add_files("src/test/*.md", {rules = "markdown"})
 ```
 
 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")
     end)
 
 target("test")
-    add_files("src/*.md", {rule = "markdown"})
+    add_files("src/*.md", {rules = "markdown"})
     set_values("markdown.flags", "xxx", "xxx")
 ```
 

+ 2 - 2
docs/examples/cpp/wdk.md

@@ -29,7 +29,7 @@ target("app")
 target("nonpnp")
     add_rules("wdk.driver", "wdk.env.kmdf")
     add_values("wdk.tracewpp.flags", "-func:TraceEvents(LEVEL,FLAGS,MSG,...)", "-func:Hexdump((LEVEL,FLAGS,MSG,...))")
-    add_files("driver/*.c", {rule = "wdk.tracewpp"})
+    add_files("driver/*.c", {rules = "wdk.tracewpp"})
     add_files("driver/*.rc")
 
 target("app")
@@ -54,7 +54,7 @@ target("kcs")
 target("msdsm")
     add_rules("wdk.driver", "wdk.env.wdm")
     add_values("wdk.tracewpp.flags", "-func:TracePrint((LEVEL,FLAGS,MSG,...))")
-    add_files("*.c", {rule = "wdk.tracewpp"})
+    add_files("*.c", {rules = "wdk.tracewpp"})
     add_files("*.rc", "*.inf")
     add_files("*.mof|msdsm.mof")
     add_files("msdsm.mof", {values = {wdk_mof_header = "msdsmwmi.h"}})

+ 1 - 1
docs/examples/cpp/winsdk.md

@@ -4,7 +4,7 @@ target("usbview")
     add_rules("win.sdk.application")
 
     add_files("*.c", "*.rc")
-    add_files("xmlhelper.cpp", {rule = "win.sdk.dotnet"})
+    add_files("xmlhelper.cpp", {rules = "win.sdk.dotnet"})
 ```
 
 If you want to known more information, you can see [#173](https://github.com/xmake-io/xmake/issues/173).

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

@@ -66,11 +66,11 @@ target("test")
 ```lua
 target("test")
     set_kind("binary")
-    add_files("src/*.md", {rule = "markdown"})  -- specify rule for specific files
+    add_files("src/*.md", {rules = "markdown"})  -- specify rule for specific files
 ```
 
 ::: tip Note
-Rules specified via `add_files("*.md", {rule = "markdown"})` have higher priority than rules set via `add_rules("markdown")`.
+Rules specified via `add_files("*.md", {rules = "markdown"})` have higher priority than rules set via `add_rules("markdown")`.
 :::
 
 ## Rule Lifecycle {#rule-lifecycle}

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

@@ -333,7 +333,7 @@ After version 2.1.9, it supports adding unknown code files. By setting rule cust
 ```lua
 target("test")
     -- ...
-    add_files("src/test/*. md", {rule = "markdown"})
+    add_files("src/test/*. md", {rules = "markdown"})
 ```
 
 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: