md_list = $(mdr_list:.mdr=.md)
_docserver_launch = $(DOCTOOL) -q serve & echo $$! > .server_pid
-_docserver_kill = [ -f .server_pid ] && (kill $$(cat .server_pid); rm .server_pid) || true
+_docserver_kill = kill $$(cat .server_pid); rm .server_pid || true
_mdr_wait=$$(inotifywait -q -r docs --format "%w%f" | tail -n1)
doc-run:
@bash -c "trap 'trap - SIGINT SIGTERM ERR; $(MAKE) -s doc-clean; exit 1' SIGINT SIGTERM ERR; $(MAKE) -s doc-watch"
-doc-watch: $(md_list)
+doc-watch: ${md_list}
+ @bash help/doc-config.sh > mkdocs.yml
@$(call _docserver_launch)
@while true; do file=$(call _mdr_wait); echo $$file | grep '\.mdr$$' && mdr $$file; done
-doc-serve:
- @$(call _docserver_launch)
+doc-serve: $(md_list)
+ @bash help/doc-config.sh > mkdocs.yml
+ @$(DOCTOOL) -q serve
doc-clean:
-@$(call _docserver_kill)
# Build / Configure Gwion
-## Table Of Content
- * [Configure](#configure)
- * [Build](#build)
- * [Install](#install)
-
## Configure
+### gwion-util
-### float precision
-
-Gwion can be built using either `float`or `double` as floating point type size.
-By default, precision is set to `float` type.
-You can change this behavior by passing `--double` to `configure`.
-
-> `--no-double` also sets precision to `float` type.
-
-### Drivers
-
-> for examples, we use `xxx` as the driver name.
-
-drivers can be enabled using `--xxx` as argument.
-Similarly, they can be disabled with `--no-xxx`
-
-You can also set library path: `--xxx_lib=/path/to/driver/library`
-Set driver include path using `--xxx_inc=/path/to/driver/include/dir`
-
-### Driver list
-
-| driver name | default |
-|-------------|---------|
-| spa | on |
-| sndfile | on |
-| alsa | on |
-| jack | off |
-| portaudio | off |
-| soundio | off |
-
-there are also two mandatory drivers, which output no sound :astonished:
- * `dummy` : computes as fast as possible.
- * `silent` : computes as slow as realtime.
-
-#### IMPORTANT
-set default driver, otherwise Gwion will use `dummy`.
-To do so, use the `--d_func` flag, e.g.: `--d_func=alsa` to use alsa driver by default.
+ * `USE_MEMCHECK`: compile with debug flags (`-g`) and enable asserts
+ * `USE_COVERAGE`: add coverage instrumentation
-### Common options
-
- * program name: `--prog=xx` (default *gwion*)
- * compiler : `--cc=xxx` (default *gcc*, but *clang* also works)
- * parser : `--yacc=xxx` (default *yacc*)
- * lexer : `--lex=xxx` (default *bison*)
- * prefix : `--prefix=xxx` (default */usr/local*)
-
-
-### Instrumentation options
-compile with debug flags (`-g`) using: `--memcheck`
-add coverage instrumentation to the code with `--coverage`
-
-
-### Directories
-
-Gwion uses a few directories at runtime
-These options **need** argument, e.g.: `--xxx=dir_name`
-
- * the place of plugins: `add`
-
-All directories will be prefixed with `$PREFIX/lib/Gwion/`
-
------------------
## Make
Basically, all that is left to do is
Drivers can be set on using, e.g. for *alsa* : `ALSA_D=1` or `ALSA_D=on`.
In the same way, then can be disabled with `ALSA_D=0` or `ALSA_D=off`
-> Just capitalize the options name
-
-> to set instrumentation flags at make time, capitalize those and prefix them
-with "USE_", e.g.: `USE_MEMCHECK=1` or `USE_COVERAGE=on`
-
### Running tests
```bash
make tests