From: fennecdjay Date: Thu, 20 Jun 2019 08:04:22 +0000 (+0200) Subject: :art: Allow ordering X-Git-Tag: nightly~2422 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=3566d24ea3f7842a21617b84519e1fe3073901b3;p=gwion.git :art: Allow ordering --- diff --git a/docs.mk b/docs.mk index 24c70db8..054b2c63 100644 --- a/docs.mk +++ b/docs.mk @@ -2,19 +2,21 @@ mdr_list = $(shell find -regextype posix-egrep -regex '.*.mdr$$') 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) diff --git a/docs/01_Overview/00_First_Steps/Configure.mdr b/docs/01_Overview/00_First_Steps/Configure.mdr new file mode 100644 index 00000000..8e411fc9 --- /dev/null +++ b/docs/01_Overview/00_First_Steps/Configure.mdr @@ -0,0 +1 @@ +# Configuring Gwion diff --git a/docs/Overview/Keywords.mdr b/docs/01_Overview/Keywords.mdr similarity index 100% rename from docs/Overview/Keywords.mdr rename to docs/01_Overview/Keywords.mdr diff --git a/docs/Overview/SpecialWords.mdr b/docs/01_Overview/SpecialWords.mdr similarity index 100% rename from docs/Overview/SpecialWords.mdr rename to docs/01_Overview/SpecialWords.mdr diff --git a/docs/Overview/declaration.mdr b/docs/01_Overview/declaration.mdr similarity index 100% rename from docs/Overview/declaration.mdr rename to docs/01_Overview/declaration.mdr diff --git a/docs/Overview/globalvalues.mdr b/docs/01_Overview/globalvalues.mdr similarity index 100% rename from docs/Overview/globalvalues.mdr rename to docs/01_Overview/globalvalues.mdr diff --git a/docs/BUILDING.mdr b/docs/BUILDING.mdr index ad73c6a3..1babfe52 100644 --- a/docs/BUILDING.mdr +++ b/docs/BUILDING.mdr @@ -1,73 +1,11 @@ # 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 @@ -82,11 +20,6 @@ using environment variables. 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 diff --git a/docs/ControlFlow/Loops.mdr b/docs/ControlFlow/Loops.mdr index 1e0ca6a5..4b787b4b 100644 --- a/docs/ControlFlow/Loops.mdr +++ b/docs/ControlFlow/Loops.mdr @@ -1 +1 @@ -# +# Loops diff --git a/docs/Make.mdr b/docs/Make.mdr new file mode 100644 index 00000000..56000b97 --- /dev/null +++ b/docs/Make.mdr @@ -0,0 +1,7 @@ +# Gwion's Makefile + +## Basic operations + +## translations + +## Docs diff --git a/help/doc-config.sh b/help/doc-config.sh new file mode 100644 index 00000000..9696fde7 --- /dev/null +++ b/help/doc-config.sh @@ -0,0 +1,23 @@ +title() { + TMP=$(head -n 1 $1) + echo ${TMP:2} +} + +list_dir() { + for a in $1/* + do + if [ -d "$a" ] + then echo "$2- '$(basename $a | sed 's/[0-9][0-9]_//' | sed 's/_/ /g' | sed 's/-/ /g')':"; list_dir $a "$2 " + else echo "$a" | grep "\.md$" >/dev/null && echo "$2- $(title $a): ${a:5}" + fi + done +} + +echo "site_name: Gwion" +echo "theme: windmill" +echo "repo_url: https://github.com/fennecdjay/Gwion" +echo "nav:" +echo " - 'Welcome' : index.md" +cp docs/index.md . +list_dir docs " " +mv index.md docs