ruki 5 months ago
parent
commit
05928a4e77

+ 2 - 0
docs/guide/basic-commands/cross-compilation.md

@@ -458,6 +458,8 @@ Xmake will detect the prefix: arm-linux- and add the include and library search
 -I/home/toolchains_sdkdir/include -L/home/toolchains_sdkdir/lib
 ```
 
+These are handled automatically by Xmake; there is no need to configure them manually.
+
 ### --bin
 
 - Set the `bin` directory of toolchains

+ 1 - 1
docs/guide/extensions/plugin-development.md

@@ -18,7 +18,7 @@ Plugins:
 * lua: Run a given lua script.
 * macro: Record and playback some xmake commands repeatedly.
 * doxygen: Generate doxygen documentation automatically.
-* hello:  The demo plugin and only print: 'hello xmake!'
+* hello:  The demo plugin and only prints: 'hello xmake!'
 * project: Generate project files for IDEs. It can generate make, cmake, vs, xcode (needs cmake), ninja project files, compile_commands.json, and compile_flags.txt
 
 ## Quick Start

+ 2 - 2
docs/guide/extensions/theme-style.md

@@ -6,7 +6,7 @@ outline: deep
 
 ## Switch Theme
 
-If users don't like xmake's default display color and style, we can use the following global configuration commands to switch to other configuration topics provided by xmake, for example:
+If users don't like xmake's default display color and style, we can use the following global configuration commands to switch to other configuration themes provided by xmake, for example:
 
 ```sh
 $ xmake g --theme=dark
@@ -48,7 +48,7 @@ $ xmake g --theme=default
 
 ### Ninja Theme
 
-This is the theme provided by the version after v2.3.4. The construction progress style is similar to ninja. It uses a single-line progress bar, and the progress is no longer rolled back.
+This is the theme provided by the version after v2.3.4. The build progress style is similar to ninja. It uses a single-line progress bar, and the progress is no longer rolled back.
 
 The configuration of the default theme is the same except that the progress is displayed differently.
 

+ 1 - 1
docs/guide/extras/unity-build.md

@@ -63,7 +63,7 @@ target("test")
 
 We use `{unity_group = "foo"}` to specify the name of each group and which files are included. The files in each group will be merged into one code file separately.
 
-In addition, `batchsize = 0` also forcibly disables the Batch mode, that is, if there is no unity_group grouped code files, we will still compile them separately, and will not automatically turn on automatic merging.
+In addition, `batchsize = 0` also forcibly disables the Batch mode, that is, if there are no unity_group grouped code files, we will still compile them separately, and will not automatically turn on automatic merging.
 
 ## Batch and Group mixed mode
 

+ 25 - 26
docs/guide/package-management/package-distribution.md

@@ -12,9 +12,9 @@ Before making our own package, we need to understand the structure of the packag
 
 ```
 xmake-repo
-   - packages
-     - t/tbox/xmake.lua
-     - z/zlib/xmake.lua
+   - packages
+     - t/tbox/xmake.lua
+     - z/zlib/xmake.lua
 ```
 
 Through the above structure, you can see that each package will have an xmake.lua to describe its installation rules, and according to the `z/zlib` two-level sub-category storage, it is convenient for quick retrieval.
@@ -87,11 +87,11 @@ There must be relevant processing in the package description to support:
 
 ```lua
 on_install(function (package)
-    Local configs = {}
-    if package:debug() then
-        Table.insert(configs, "--enable-debug")
-    end
-    import("package.tools.autoconf").install(package)
+    Local configs = {}
+    if package:is_debug() then
+        table.insert(configs, "--enable-debug")
+    end
+    import("package.tools.autoconf").install(package)
 end)
 ```
 
@@ -107,7 +107,7 @@ But if it is a special source package, the build rules are special, then you nee
 
 ```lua
 on_install(function (package)
-    io.gsub("build/Makefile.win32.common", "%-MD", "-" .. package:config("vs_runtime"))
+    io.gsub("build/Makefile.win32.common", "%-MD", "-" .. package:config("vs_runtime"))
 end)
 ```
 
@@ -117,12 +117,12 @@ For some libraries, there are also executable tools. If you need to use these to
 
 ```lua
 package("luajit")
-    on_load(function (package)
-        if is_plat("windows") then
-            Package:addenv("PATH", "lib")
-        end
-        Package:addenv("PATH", "bin")
-    end)
+    on_load(function (package)
+        if is_plat("windows") then
+            Package:addenv("PATH", "lib")
+        end
+        Package:addenv("PATH", "bin")
+    end)
 ```
 
 In the project, the corresponding environment variables will only take effect after the corresponding package is integrated by `add_packages`.
@@ -130,11 +130,11 @@ In the project, the corresponding environment variables will only take effect af
 ```lua
 add_requires("luajit")
 target("test")
-    set_kind("binary")
-    add_packages("luajit")
-    after_run(function (package)
-        os.exec("luajit --version")
-    end)
+    set_kind("binary")
+    add_packages("luajit")
+    after_run(function (package)
+        os.exec("luajit --version")
+    end)
 ```
 
 ### Installing binary packages
@@ -143,14 +143,14 @@ Xmake also supports direct reference to the binary version package, which is use
 
 ```lua
 if is_plat("windows") then
-    set_urls("https://www.libsdl.org/release/SDL2-devel-$(version)-VC.zip")
-    add_versions("2.0.8", "68505e1f7c16d8538e116405411205355a029dcf2df738dbbc768b2fe95d20fd")
+    set_urls("https://www.libsdl.org/release/SDL2-devel-$(version)-VC.zip")
+    add_versions("2.0.8", "68505e1f7c16d8538e116405411205355a029dcf2df738dbbc768b2fe95d20fd")
 end
 
 on_install("windows", function (package)
-    os.cp("include", package:installdir())
-    os.cp("lib/$(arch)/*.lib", package:installdir("lib"))
-    os.cp("lib/$(arch)/*.dll", package:installdir("lib"))
+    os.cp("include", package:installdir())
+    os.cp("lib/$(arch)/*.lib", package:installdir("lib"))
+    os.cp("lib/$(arch)/*.dll", package:installdir("lib"))
 end)
 ```
 
@@ -304,4 +304,3 @@ rule("bar")
         print("bar: on_config %s", target:name())
     end)
 ```
-ry, so it maybe unreliable to detect the correct paths.

+ 1 - 1
docs/zh/guide/package-management/package-distribution.md

@@ -88,7 +88,7 @@ add_requires("xxx", {debug = true})
 ```lua
 on_install(function (package)
     local configs = {}
-    if package:debug() then
+    if package:is_debug() then
         table.insert(configs, "--enable-debug")
     end
     import("package.tools.autoconf").install(package)