Module make

The main build module that handles complete process of building standalone executable.

Functions

__call (proj_paths, entry_script, output_file, rocks_dir, opts) Makes a standalone executable from the Lua project(s).

Local Functions

default_entry_script (rockspec_file) Returns path and name of single CLI script specified in the rockspec.
rockspec_project_dir (rockspec_file) Guesses project's base directory from the rockspec path.
resolve_proj_paths (proj_paths) Resolves project paths from the CLI arguments.
resolve_dependencies (entry_script, extra_modules, excludes, pkg_path) Resolves the entry script's dependencies, logs results and returns lists of modules and objects.


Functions

__call (proj_paths, entry_script, output_file, rocks_dir, opts)
Makes a standalone executable from the Lua project(s).

Parameters:

  • proj_paths {string,...}
  • entry_script optional string Path of the main Lua script.
  • output_file optional string Name of the output binary.
  • rocks_dir optional string Directory where to install required modules.
  • opts optional table Options.

Raises:

if some error occurred.

Local Functions

default_entry_script (rockspec_file)

Returns path and name of single CLI script specified in the rockspec. Or returns nil if:

  1. the rockspec is unreadable,
  2. there's no script defined in build.install.bin,
  3. there's more than one script in build.install.bin.

Parameters:

  • rockspec_file string Path of the rockspec file.

Returns:

  1. string Path of the script file relative to the project's dir.
  2. string Target name of the script.

Or

  1. nil
  2. string An error message.
rockspec_project_dir (rockspec_file)
Guesses project's base directory from the rockspec path.

Parameters:

  • rockspec_file string Path of the rockspec file.

Returns:

    string Absolute path of the project's directory.
resolve_proj_paths (proj_paths)
Resolves project paths from the CLI arguments.

Parameters:

Returns:

    {{string,string},...} A list of pairs: path of the project's base directory, absolute path of the rockspec.

Raises:

if rockspec is not specified or there is no unambiguous rockspec in the project's directory.
resolve_dependencies (entry_script, extra_modules, excludes, pkg_path)
Resolves the entry script's dependencies, logs results and returns lists of modules and objects.

Parameters:

  • entry_script string Path of the the Lua script.
  • extra_modules optional {string,...} Paths of additional Lua scripts to scan.
  • excludes optional {string,...} Module(s) to exclude from the analysis; one or more glob patterns matching module name in dot notation (e.g. "pl.*").
  • pkg_path optional string The path where to look for modules (see package.searchpath).

Returns:

  1. {table,...} A list of module entries.
  2. {string,...} A list of paths of the object files (native extensions).

Raises:

is some error accured.
generated by LDoc 1.4.6