aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/D.md10
-rw-r--r--docs/markdown/Reference-manual.md3
-rw-r--r--docs/markdown/Reference-tables.md5
-rw-r--r--docs/markdown/Wrap-dependency-system-manual.md22
4 files changed, 26 insertions, 14 deletions
diff --git a/docs/markdown/D.md b/docs/markdown/D.md
index 15de2f7..2b0eaac 100644
--- a/docs/markdown/D.md
+++ b/docs/markdown/D.md
@@ -14,15 +14,21 @@ project('myapp', 'd')
executable('myapp', 'app.d')
```
-## Compiling different versions
+## [Conditional compilation](https://dlang.org/spec/version.html)
-If you are using the [version()](https://dlang.org/spec/version.html) feature for conditional compilation,
+If you are using the [version()](https://dlang.org/spec/version.html#version-specification) feature for conditional compilation,
you can use it using the `d_module_versions` target property:
```meson
project('myapp', 'd')
executable('myapp', 'app.d', d_module_versions: ['Demo', 'FeatureA'])
```
+For debugging, [debug()](https://dlang.org/spec/version.html#debug) conditions are compiled automatically in debug builds, and extra identifiers can be added with the `d_debug` argument:
+```meson
+project('myapp', 'd')
+executable('myapp', 'app.d', d_debug: [3, 'DebugFeatureA'])
+```
+
## Using embedded unittests
If you are using embedded [unittest functions](https://dlang.org/spec/unittest.html), your source code needs
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 7902f19..3bd2bfa 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -537,7 +537,8 @@ be passed to [shared and static libraries](#library).
- `d_import_dirs` list of directories to look in for string imports used
in the D programming language
- `d_unittest`, when set to true, the D modules are compiled in debug mode
-- `d_module_versions` list of module versions set when compiling D sources
+- `d_module_versions` list of module version identifiers set when compiling D sources
+- `d_debug` list of module debug identifiers set when compiling D sources
The list of `sources`, `objects`, and `dependencies` is always
flattened, which means you can freely nest and add lists while
diff --git a/docs/markdown/Reference-tables.md b/docs/markdown/Reference-tables.md
index ccdcb34..39ec1cd 100644
--- a/docs/markdown/Reference-tables.md
+++ b/docs/markdown/Reference-tables.md
@@ -65,6 +65,11 @@ set in the cross file.
Any cpu family not listed in the above list is not guaranteed to
remain stable in future releases.
+Those porting from autotools should note that meson does not add
+endianness to the name of the cpu_family. For example, autotools
+will call little endian PPC64 "ppc64le", meson will not, you must
+also check the `.endian()` value of the machine for this information.
+
## Operating system names
These are provided by the `.system()` method call.
diff --git a/docs/markdown/Wrap-dependency-system-manual.md b/docs/markdown/Wrap-dependency-system-manual.md
index 0977921..2e977b2 100644
--- a/docs/markdown/Wrap-dependency-system-manual.md
+++ b/docs/markdown/Wrap-dependency-system-manual.md
@@ -85,9 +85,9 @@ slightly different wrap file.
```ini
[wrap-git]
-directory=samplesubproject
-url=https://github.com/jpakkane/samplesubproject.git
-revision=head
+directory = samplesubproject
+url = https://github.com/jpakkane/samplesubproject.git
+revision = head
```
The format is straightforward. The only thing to note is the revision
@@ -106,14 +106,14 @@ these cases you can specify the upload URL by adding the following at
the end of your wrap file:
```ini
-push-url=git@git.example.com:projects/someproject.git # Supported since version 0.37.0
+push-url = git@git.example.com:projects/someproject.git # Supported since version 0.37.0
```
If the git repo contains submodules, you can tell Meson to clone them
automatically by adding the following *(since 0.48.0)*:
```ini
-clone-recursive=true
+clone-recursive = true
```
## Using wrapped projects
@@ -121,12 +121,12 @@ clone-recursive=true
To use a subproject simply do this in your top level `meson.build`.
```meson
-foobar_sp = subproject('foobar')
+foobar_proj = subproject('foobar')
```
Usually dependencies consist of some header files plus a library to
-link against. To do this you would declare this internal dependency
-like this:
+link against. To do this in a project so it can be used as a subproject you
+would declare this internal dependency like this:
```meson
foobar_dep = declare_dependency(link_with : mylib,
@@ -137,7 +137,7 @@ Then in your main project you would use them like this:
```meson
executable('toplevel_exe', 'prog.c',
- dependencies : foobar_sp.get_variable('foobar_dep'))
+ dependencies : foobar_proj.get_variable('foobar_dep'))
```
Note that the subproject object is *not* used as the dependency, but
@@ -160,10 +160,10 @@ available.
foobar_dep = dependency('foobar', required : false)
if not foobar_dep.found()
- foobar_subproj = subproject('foobar')
+ foobar_proj = subproject('foobar')
# the subproject defines an internal dependency with
# the command declare_dependency().
- foobar_dep = foobar_subproj.get_variable('foobar_dep')
+ foobar_dep = foobar_proj.get_variable('foobar_dep')
endif
executable('toplevel_exe', 'prog.c',