mix

mix compile.erlang

Compiles Erlang source files.

When this task runs, it will first check the modification times of all files to be compiled and if they haven’t been changed since the last compilation, it will not compile them. If any of them have changed, it compiles everything.

For this reason, the task touches your :compile_path directory and sets the modification time to the current time and date at the end of each compilation. You can force compilation regardless of modification times by passing the --force option.

Command line options

  • --force - forces compilation regardless of modification times

Configuration

  • ERL_COMPILER_OPTIONS - can be used to give default compile options. The value must be a valid Erlang term. If the value is a list, it will be used as is. If it is not a list, it will be put into a list.

  • :erlc_paths - directories to find source files. Defaults to ["src"].

  • :erlc_include_path - directory for adding include files. Defaults to "include".

  • :erlc_options - compilation options that apply to Erlang’s compiler. Defaults to [:debug_info].

    For a complete list of options, see :compile.file/2.

For example, to configure the erlc_options for your Erlang project you may run:

erlc_options: [:debug_info, {:i, 'path/to/include'}]

Summary

Functions

clean()

Cleans up compilation artifacts

manifests()

Returns Erlang manifests

run(args)

Runs this task

Functions

clean()

Cleans up compilation artifacts.

manifests()

Returns Erlang manifests.

run(args)

run(OptionParser.argv) :: :ok | :noop

Runs this task.

© 2012–2017 Plataformatec
Licensed under the Apache License, Version 2.0.
https://hexdocs.pm/mix/1.4.5/Mix.Tasks.Compile.Erlang.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部