This documentation reminds here until it gets moved to the official documentation on http://erlang.mk/guide/.
You may add additional operations to them by using the double colons. Make will run all targets sharing the same name when invoked.
clean::
@rm anotherfileYou can enable verbose mode by calling Make with the variable
V set to 1.
$ make V=1Parallel execution is currently enabled (experimental).
Parallel execution can be enabled through the use of the
-j option. The following output showcases concurrent
downloading of dependencies.
$ make -j32
Cloning into '/home/essen/ninenines/cowboy/deps/ranch'...
Cloning into '/home/essen/ninenines/cowboy/deps/cowlib'...The -O option will ensure that output from different
targets is grouped, which is particularly useful when
running tests with different frameworks at the same time.
The disadvantage of this option however is that there is
no output until the target is completed.
The``MAKEFLAGSvariable can be used to set it permanently on your system. It can be set in your.zshrc`, `.bashrc`
or equivalent file.
MAKEFLAGS="-j32 -O"This plugin is available by default.
EDoc options can be specified in Erlang format by defining
the EDOC_OPTS variable. For more information please see
erl -man edoc.
This plugin is available by default. It adds automatic
compilation of ErlyDTL templates found in templates/*.dtl
or any subdirectory.
By default it ignores names of subdirectories and compiles
a/b/templatename.dtl into templatename_dtl.beam. To include
subdirectories names in the compiled module name add
DTL_FULL_PATH=1 into your Makefile - a/b/templatename.dtl
will be compiled into a_b_templatename_dtl.beam.
This plugin is available by default. It adds the following target:
escript which creates a shell-executable archive named
the same as your $(PROJECT), containing the following files
from your application and its dependencies:
*.beam- contents of
priv/ sys.configfor your application
There are a number of optional configuration parameters:
ESCRIPT_NAMEif a different output file is requiredESCRIPT_COMMENTto alter the comment line in the escript headerESCRIPT_BEAMSfor the paths searched for*.beamfiles to includeESCRIPT_SYS_CONFIGdefaults torel/sys.configESCRIPT_EMU_ARGSfor the parameters used to start the VMESCRIPT_SHEBANGfor the line used by your shell to startescriptESCRIPT_STATICfor non-beam directories to be included as well
Refer to http://www.erlang.org/doc/man/escript.html for
more information on escript functionality in general.
This plugin is available by default. It adds the following target:
triq will check all the properties found in ebin or
the test directory specified in TEST_DIR.
You can use the t variable to give a specific module
or function to run, for example:
$ make triq t=cow_http_hdOr:
$ make triq t=cow_http_hd:prop_parse_acceptThis plugin is available by default. It adds the following target:
xref Erlang Xref Runner (inspired in rebar's rebar_xref)
The XREF_CONFIG variable specifies the location of the
configuration file which holds the checks to be applied.
If there is no xref.config all xref checks will be
applied to the binaries located in the /ebin directory.