edoc_run(3)
π edoc_run β the Erlang Module Definition you've been waiting for β¨
okay bestie, so edoc_run is literally the interface for calling EDoc from Erlang startup options. that's it, that's the vibe. she's a little glue module and she ATE π
πΈ DESCRIPTION πΈ
okay so real talk, here's an example of typical usage in a Makefile, and it's giving iconic:
docs:
erl -noshell -run edoc_run application "'$(APP_NAME)'" \
'"."' '[{def,{vsn,"$(VSN)"}}]'
ngl, the notes here matter: those single-quotes are there to avoid shell expansion, and the double-quotes are enclosing the strings. don't skip them, bestie, fr fr π«Ά
β¨ new feature in version 0.6.9 (yes queen, glow up): it is no longer necessary to write -s init stop last on the command line in order to make the execution terminate. the termination β signalling success or failure to the operating system β is now built into these functions. no more remembering that, she does it herself now π
See also: edoc.
π¦ DATA TYPES π¦
(empty. nothing here. a whole section with no content, and honestly? iconic minimalism. main character energy πβ¨)
π FUNCTIONS π
π application(args()) -> no_return().
calls edoc:application/3 with the corresponding arguments. the strings in the list are parsed as Erlang constant terms.
the list can be either [App], [App, Options] or [App, Dir, Options]. so which one you hand her changes everything:
- first case (
[App]) βedoc:application/1is called instead - second case (
[App, Options]) βedoc:application/2is called - third case (
[App, Dir, Options]) βedoc:application/3gets the whole situation
π¨ okay this part matters: the function call never returns. instead, the emulator is automatically terminated when the call has completed, signalling success or failure to the operating system. so like, don't go waiting around for a return value, she's already gone π«‘
π file(args()) -> no_return().
Deprecated: this is part of the old interface to EDoc and is mainly kept for backwards compatibility. the preferred way of generating documentation is through one of the functionsapplication/1andfiles/1. so likeβ¦ she's still here, she's just for the old heads π₯²
calls edoc:file/2 with the corresponding arguments. the strings in the list are parsed as Erlang constant terms.
the list can be either [File] or [File, Options]. in the first case, an empty list of options is passed to edoc:file/2.
here's an example of typical usage in a Makefile:
$(DOCDIR)/%.html:%.erl
erl -noshell -run edoc_run file '"$<"' '[{dir,"$(DOCDIR)"}]' \
-s init stop
and yes β same deal as before: the function call never returns; instead, the emulator is automatically terminated when the call has completed, signalling success or failure to the operating system. π
π files(args()) -> no_return().
(plural, bestie, don't mix her up with file)
calls edoc:files/2 with the corresponding arguments. the strings in the list are parsed as Erlang constant terms.
the list can be either [Files] or [Files, Options]. in the first case, edoc:files/1 is called instead.
and yeah, you already know: the function call never returns; instead, the emulator is automatically terminated when the call has completed, signalling success or failure to the operating system. every single time. no notes β
and that's the whole page, no cap π this absolute baddie of a module ships courtesy of Ericsson AB, from edoc 1.5, and the page itself lives at edoc_run(3) β go forth and generate docs, you've got this πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms