command - elixirc

執行

$ man ~/.asdf/installs/elixir/1.2.2/man/elixirc.1

顯示

ELIXIRC(1)                                    BSD General Commands Manual                                   ELIXIRC(1)

NAME
     elixirc — The Elixir compiler

SYNOPSIS
     elixirc [OPTIONS] file ...

DESCRIPTION
     The compiler is intended for compilation one or more files containing the Elixir source code. The files should
     have the extension .ex.

OPTIONS
     -o directory
             Places the output file in the specified directory. If the directory is not specified via the option, the
             current working directory will be used for the purpose.

     --erl parameters
             Serves the same purpose as ELIXIR_ERL_OPTIONS (see the ENVIRONMENT section).

     --ignore-module-conflict
             Disables warnings when a module was previously defined.

     --no-debug-info
             Disables producing debugging information.

     --no-docs
             Disables generating documentation.

     --warnings-as-errors
             Makes all warnings into errors.

     --verbose
             Activates verbose mode.

     --      Separates the options passed to the compiler from the options passed to the executed code.

ENVIRONMENT
     ELIXIR_ERL_OPTIONS
             Allows passing parameters to the Erlang runtime.

     ERL_COMPILER_OPTIONS
             Allows passing parameters to the Erlang compiler (see erlc(1)).

SEE ALSO
     elixir(1), iex(1), mix(1)

AUTHOR
     This manual page contributed by Evgeny Golyshev.

INTERNET RESOURCES
     Main website: http://elixir-lang.org

     Documentation: http://elixir-lang.org/docs.html

     General Mailing List: https://groups.google.com/group/elixir-lang-talk

     Development Mailing List: https://groups.google.com/group/elixir-lang-core

BSD                                                 April 10, 2015                                                 BSD

help

執行

$ elixirc -h

或是執行

$ elixirc --help

顯示

Usage: elixirc [elixir switches] [compiler switches] [.ex files]

  -o               The directory to output compiled files
  --no-docs        Do not attach documentation to compiled modules
  --no-debug-info  Do not attach debug info to compiled modules
  --ignore-module-conflict
  --warnings-as-errors Treat warnings as errors and return non-zero exit code
  --verbose        Print informational messages.

** Options given after -- are passed down to the executed code
** Options can be passed to the erlang runtime using ELIXIR_ERL_OPTIONS
** Options can be passed to the erlang compiler using ERL_COMPILER_OPTIONS

source code

elixirc

執行

$ cat ~/.asdf/installs/elixir/1.2.2/bin/elixirc

顯示

#!/bin/sh
if [ $# -eq 0 ] || [ "$1" = "--help" ] || [ "$1" = "-h" ]; then
  echo "Usage: `basename $0` [elixir switches] [compiler switches] [.ex files]

  -o               The directory to output compiled files
  --no-docs        Do not attach documentation to compiled modules
  --no-debug-info  Do not attach debug info to compiled modules
  --ignore-module-conflict
  --warnings-as-errors Treat warnings as errors and return non-zero exit code
  --verbose        Print informational messages.

** Options given after -- are passed down to the executed code
** Options can be passed to the erlang runtime using ELIXIR_ERL_OPTIONS
** Options can be passed to the erlang compiler using ERL_COMPILER_OPTIONS" >&2
  exit 1
fi

readlink_f () {
  cd "$(dirname "$1")" > /dev/null
  filename="$(basename "$1")"
  if [ -h "$filename" ]; then
    readlink_f "$(readlink "$filename")"
  else
    echo "`pwd -P`/$filename"
  fi
}

SELF=$(readlink_f "$0")
SCRIPT_PATH=$(dirname "$SELF")
exec "$SCRIPT_PATH"/elixir +elixirc "$@"