edoc_run(3)

πŸ“¦
version 29.0.6 Β· 2 versions
, in ubuntu stonking

πŸ’– 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/1 is called instead
  • second case ([App, Options]) β†’ edoc:application/2 is called
  • third case ([App, Dir, Options]) β†’ edoc:application/3 gets 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 functions application/1 and files/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