Minor fixups

pull/8960/head
Daniel Mensinger 4 years ago
parent 0b9c7b74be
commit b672ebca88
No known key found for this signature in database
GPG Key ID: 54DD94C131E277D4
  1. 4
      docs/refman/generatormd.py
  2. 13
      docs/refman/templates/root.mustache
  3. 1
      docs/yaml/builtins/host_machine.yaml
  4. 1
      docs/yaml/builtins/target_machine.yaml
  5. 2
      docs/yaml/objects/build_tgt.yaml
  6. 39
      docs/yaml/objects/external_program.yaml

@ -156,7 +156,9 @@ class GeneratorMD(GeneratorBase):
return ' | '.join([data_type_to_str(x) for x in typ.resolved])
def len_stripped(s: str) -> int:
return len(re.sub(r'<[^>]+>', '', s))
s = s.replace(']]', '')
# I know, this regex is ugly but it works.
return len(re.sub(r'\[\[(#|@)*([^\[])', r'\2', s))
def render_signature() -> str:
# Skip a lot of computations if the function does not take any arguments

@ -11,7 +11,7 @@ and methods are documented in detail in the following subpages:
## Elementary types
{{#elementary}}
{{>root_link}}
{{indent}}- {{&link}}
{{/elementary}}
## Functions
@ -21,7 +21,7 @@ to see the description and usage. The objects returned by them are
[listed here](#returned-objects).
{{#functions}}
{{>root_link}}
{{indent}}- {{&link}}
{{/functions}}
## Builtin objects
@ -29,7 +29,7 @@ to see the description and usage. The objects returned by them are
These are built-in objects that are always available.
{{#builtins}}
{{>root_link}}
{{indent}}- {{&link}}
{{/builtins}}
## Returned objects
@ -38,11 +38,14 @@ These are objects that can be returned by [functions](#functions)
or other methods.
{{#returned}}
{{>root_link}}
{{indent}}- {{&link}}
{{/returned}}
## Modules
{{#modules}}
{{>root_link}}
{{indent}}- {{&link}}
{{/modules}}
<!-- The links used to be generated wit {>root_link}, but this is a bit hard to read -->

@ -1,5 +1,6 @@
name: host_machine
long_name: Host machine information
extends: build_machine
description: |
Provides information about the host machine -- the machine on which the
compiled binary will run. See

@ -1,5 +1,6 @@
name: target_machine
long_name: Target machine information
extends: build_machine
description: |
Provides information about the target machine -- the machine on which
the compiled binary's output will run. Hence, this object should only

@ -5,8 +5,6 @@ description: |
A build target is either an executable, shared library, static library,
both shared and static library or shared module.
TODO: Missing methods, links
methods:
- name: full_path
returns: str

@ -1,3 +1,40 @@
name: external_program
long_name: External program
description: TODO
description: Opaque object representing an external program
methods:
- name: found
returns: bool
description: Returns whether the executable was found.
- name: path
returns: str
deprecated: 0.55.0
description: |
*Deprecated:* Use [[external_program.full_path]] instead.
Returns a string pointing to the script or executable.
**NOTE:** You should not need to use this method. Passing the object itself
should work in all cases.
For example:
```meson
run_command(find_program('foo'), 'arg1', 'arg2')
```
- name: full_path
returns: str
since: 0.55.0
description: |
Returns a string pointing to the script or executable.
**NOTE:** You should not need to use this method. Passing the object itself
should work in all cases.
For example:
```meson
run_command(find_program('foo'), 'arg1', 'arg2')
```

Loading…
Cancel
Save