From 2b588340af501825f3ab03f2e76dba0353c98fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 4 Jun 2018 12:59:26 +0200 Subject: Update documentation for Gun 1.0 --- docs/en/erlang.mk/1/guide/app.asciidoc | 36 ++++ docs/en/erlang.mk/1/guide/app/index.html | 39 ++++- docs/en/erlang.mk/1/guide/asciidoc/index.html | 2 - docs/en/erlang.mk/1/guide/ci/index.html | 2 - docs/en/erlang.mk/1/guide/common_test/index.html | 6 +- docs/en/erlang.mk/1/guide/compat/index.html | 2 - docs/en/erlang.mk/1/guide/contributing/index.html | 2 - docs/en/erlang.mk/1/guide/coverage/index.html | 6 +- docs/en/erlang.mk/1/guide/deps/index.html | 2 - docs/en/erlang.mk/1/guide/dialyzer/index.html | 2 - docs/en/erlang.mk/1/guide/edoc/index.html | 2 - docs/en/erlang.mk/1/guide/escripts/index.html | 2 - docs/en/erlang.mk/1/guide/eunit/index.html | 2 - .../erlang.mk/1/guide/external_plugins/index.html | 2 - .../1/guide/external_plugins_list/index.html | 2 - .../erlang.mk/1/guide/getting_started/index.html | 2 - docs/en/erlang.mk/1/guide/history/index.html | 2 - docs/en/erlang.mk/1/guide/index.html | 7 +- docs/en/erlang.mk/1/guide/installation/index.html | 2 - docs/en/erlang.mk/1/guide/kerl/index.html | 2 - docs/en/erlang.mk/1/guide/limitations/index.html | 2 - docs/en/erlang.mk/1/guide/overview/index.html | 2 - docs/en/erlang.mk/1/guide/ports/index.html | 2 - docs/en/erlang.mk/1/guide/releases/index.html | 2 - docs/en/erlang.mk/1/guide/sfx/index.html | 2 - docs/en/erlang.mk/1/guide/shell.asciidoc | 4 + docs/en/erlang.mk/1/guide/shell/index.html | 5 +- docs/en/erlang.mk/1/guide/sphinx/index.html | 2 - docs/en/erlang.mk/1/guide/triq.asciidoc | 31 ++++ docs/en/erlang.mk/1/guide/triq/index.html | 188 +++++++++++++++++++++ docs/en/erlang.mk/1/guide/updating/index.html | 2 - docs/en/erlang.mk/1/guide/why/index.html | 2 - docs/en/erlang.mk/1/guide/xref/index.html | 2 - 33 files changed, 308 insertions(+), 62 deletions(-) create mode 100644 docs/en/erlang.mk/1/guide/triq.asciidoc create mode 100644 docs/en/erlang.mk/1/guide/triq/index.html (limited to 'docs/en/erlang.mk/1/guide') diff --git a/docs/en/erlang.mk/1/guide/app.asciidoc b/docs/en/erlang.mk/1/guide/app.asciidoc index 94f8eb1a..9d5e9488 100644 --- a/docs/en/erlang.mk/1/guide/app.asciidoc +++ b/docs/en/erlang.mk/1/guide/app.asciidoc @@ -164,6 +164,42 @@ Any space before and after the value is dropped. xref:deps[Dependencies] are covered in details in the next chapter. +==== Application environment + +The `PROJECT_ENV` variable is used to set the application +environment: + +[source,make] +---- +define PROJECT_ENV +[ + {chips, [currysauce,{mushypeas,false}]}, + {pizza, [{size,large},{toppings,[anchovies]}]} +] +endef +---- + +If you have a large set of environment variables, you may find it +easier to use a separate file. Do this by including the following +in your Makefile: + +[source,make] +---- +PROJECT_ENV_FILE = src/env.src +PROJECT_ENV = $(subst \n,$(newline),$(shell cat $(PROJECT_ENV_FILE) | sed -e 's/$$/\\n/;')) +ebin/$(PROJECT).app:: $(PROJECT_ENV_FILE) +---- + +The file has the same contents as the `PROJECT_ENV` variable: + +[source,erlang] +---- +[ + {chips, [currysauce,{mushypeas,false}]}, + {pizza, [{size,large},{toppings,[anchovies]}]} +] +---- + ==== Legacy method The 'src/$(PROJECT).app.src' file is a legacy method of diff --git a/docs/en/erlang.mk/1/guide/app/index.html b/docs/en/erlang.mk/1/guide/app/index.html index efc60e99..55c2d223 100644 --- a/docs/en/erlang.mk/1/guide/app/index.html +++ b/docs/en/erlang.mk/1/guide/app/index.html @@ -7,8 +7,6 @@ - - Nine Nines: Building @@ -284,6 +282,43 @@ http://www.gnu.org/software/src-highlite --> the next chapter.

+

Application environment

+

The PROJECT_ENV variable is used to set the application +environment:

+
+
+
define PROJECT_ENV
+[
+  {chips, [currysauce,{mushypeas,false}]},
+  {pizza, [{size,large},{toppings,[anchovies]}]}
+]
+endef
+

If you have a large set of environment variables, you may find it +easier to use a separate file. Do this by including the following +in your Makefile:

+
+
+
PROJECT_ENV_FILE = src/env.src
+PROJECT_ENV = $(subst \n,$(newline),$(shell cat $(PROJECT_ENV_FILE) | sed -e 's/$$/\\n/;'))
+ebin/$(PROJECT).app:: $(PROJECT_ENV_FILE)
+

The file has the same contents as the PROJECT_ENV variable:

+
+
+
[
+  {chips, [currysauce,{mushypeas,false}]},
+  {pizza, [{size,large},{toppings,[anchovies]}]}
+]
+
+

Legacy method

The src/$(PROJECT).app.src file is a legacy method of building Erlang applications. It was introduced by the original diff --git a/docs/en/erlang.mk/1/guide/asciidoc/index.html b/docs/en/erlang.mk/1/guide/asciidoc/index.html index 472047e8..bb13a400 100644 --- a/docs/en/erlang.mk/1/guide/asciidoc/index.html +++ b/docs/en/erlang.mk/1/guide/asciidoc/index.html @@ -7,8 +7,6 @@ - - Nine Nines: AsciiDoc documentation diff --git a/docs/en/erlang.mk/1/guide/ci/index.html b/docs/en/erlang.mk/1/guide/ci/index.html index 1edf4b3f..cacdb813 100644 --- a/docs/en/erlang.mk/1/guide/ci/index.html +++ b/docs/en/erlang.mk/1/guide/ci/index.html @@ -7,8 +7,6 @@ - - Nine Nines: Continuous integration diff --git a/docs/en/erlang.mk/1/guide/common_test/index.html b/docs/en/erlang.mk/1/guide/common_test/index.html index 796acdef..f6430831 100644 --- a/docs/en/erlang.mk/1/guide/common_test/index.html +++ b/docs/en/erlang.mk/1/guide/common_test/index.html @@ -7,8 +7,6 @@ - - Nine Nines: Common Test @@ -203,8 +201,8 @@ but covered in its own chapter.

- - Code coverage + + Triq diff --git a/docs/en/erlang.mk/1/guide/compat/index.html b/docs/en/erlang.mk/1/guide/compat/index.html index 9f7facac..56ec41dc 100644 --- a/docs/en/erlang.mk/1/guide/compat/index.html +++ b/docs/en/erlang.mk/1/guide/compat/index.html @@ -7,8 +7,6 @@ - - Nine Nines: Compatibility with other build tools diff --git a/docs/en/erlang.mk/1/guide/contributing/index.html b/docs/en/erlang.mk/1/guide/contributing/index.html index 8db4fccd..97a00e86 100644 --- a/docs/en/erlang.mk/1/guide/contributing/index.html +++ b/docs/en/erlang.mk/1/guide/contributing/index.html @@ -7,8 +7,6 @@ - - Nine Nines: Contributing diff --git a/docs/en/erlang.mk/1/guide/coverage/index.html b/docs/en/erlang.mk/1/guide/coverage/index.html index 34654df8..aa986318 100644 --- a/docs/en/erlang.mk/1/guide/coverage/index.html +++ b/docs/en/erlang.mk/1/guide/coverage/index.html @@ -7,8 +7,6 @@ - - Nine Nines: Code coverage @@ -77,8 +75,8 @@

The shell can be stopped as usual with a double Ctrl+C or the command q()..

+

Note that the shell target does not build the application. To do it, +use either the app target or, if you want to include also test +modules, the test-build target.

diff --git a/docs/en/erlang.mk/1/guide/sphinx/index.html b/docs/en/erlang.mk/1/guide/sphinx/index.html index bcf2ac5a..379dc8a6 100644 --- a/docs/en/erlang.mk/1/guide/sphinx/index.html +++ b/docs/en/erlang.mk/1/guide/sphinx/index.html @@ -7,8 +7,6 @@ - - Nine Nines: Sphinx documentation diff --git a/docs/en/erlang.mk/1/guide/triq.asciidoc b/docs/en/erlang.mk/1/guide/triq.asciidoc new file mode 100644 index 00000000..db698600 --- /dev/null +++ b/docs/en/erlang.mk/1/guide/triq.asciidoc @@ -0,0 +1,31 @@ +[[triq]] +== Triq + +https://triq.gitlab.io/[Triq] is a QuickCheck-like library for +property-based testing. Erlang.mk automates discovery and checking of +Triq properties. + +To run all tests (including Triq): + +[source,bash] +$ make tests + +To run all tests and static checks (including Triq): + +[source,bash] +$ make check + +You can also run Triq separately: + +[source,bash] +$ make triq + +To check properties from a single module: + +[source,bash] +$ make triq t=foo_tests + +To check a single property: + +[source,bash] +$ make triq t=foo_tests:bar diff --git a/docs/en/erlang.mk/1/guide/triq/index.html b/docs/en/erlang.mk/1/guide/triq/index.html new file mode 100644 index 00000000..5b478a0b --- /dev/null +++ b/docs/en/erlang.mk/1/guide/triq/index.html @@ -0,0 +1,188 @@ + + + + + + + + + + Nine Nines: Triq + + + + + + + + + + + + + + + + +
+
+
+
+ +

Triq

+ +

Triq is a QuickCheck-like library for +property-based testing. Erlang.mk automates discovery and checking of +Triq properties.

+

To run all tests (including Triq):

+
+
+
$ make tests
+

To run all tests and static checks (including Triq):

+
+
+
$ make check
+

You can also run Triq separately:

+
+
+
$ make triq
+

To check properties from a single module:

+
+
+
$ make triq t=foo_tests
+

To check a single property:

+
+
+
$ make triq t=foo_tests:bar
+ + + + + + + + + + + + + + + +
+ +
+ + +

+ Erlang.mk + 1 + + User Guide +

+ +
    + + + +
+ +

Navigation

+ +

Version select

+
    + + + +
  • 1
  • + +
+ +
+
+
+
+ + + + + + + + + diff --git a/docs/en/erlang.mk/1/guide/updating/index.html b/docs/en/erlang.mk/1/guide/updating/index.html index 510f0a1c..44f5adb4 100644 --- a/docs/en/erlang.mk/1/guide/updating/index.html +++ b/docs/en/erlang.mk/1/guide/updating/index.html @@ -7,8 +7,6 @@ - - Nine Nines: Updating Erlang.mk diff --git a/docs/en/erlang.mk/1/guide/why/index.html b/docs/en/erlang.mk/1/guide/why/index.html index 1318ed5f..a18ba0d2 100644 --- a/docs/en/erlang.mk/1/guide/why/index.html +++ b/docs/en/erlang.mk/1/guide/why/index.html @@ -7,8 +7,6 @@ - - Nine Nines: Why Erlang.mk diff --git a/docs/en/erlang.mk/1/guide/xref/index.html b/docs/en/erlang.mk/1/guide/xref/index.html index 80960265..6de10fea 100644 --- a/docs/en/erlang.mk/1/guide/xref/index.html +++ b/docs/en/erlang.mk/1/guide/xref/index.html @@ -7,8 +7,6 @@ - - Nine Nines: Xref -- cgit v1.2.3