Skip to content

Commands

ARaspiK edited this page Feb 5, 2019 · 1 revision

Commands

Begin

The application begins with some options, a command, and additional arguments to that command (if any).
First, options are parsed (using getopt). Some global options are:

  • -f|--file PATH: Selects the path to the SMakefile to be used.
  • -v|--verbose [SEC]: Increases amount of output, optionally for a specific section (type) of output.
  • -q|--quiet [SEC]: Reduces the amount of output, optionally for a specific section (type) of output.

A list of commands which can be used are:

  • b(uild): Builds the given targets. Default when in compatibility mode.
  • i(nfo): Provides build information.
  • h(elp): Returns help information

Build

The given targets are built (executed). Without a given list of targets, the utilized target depends on whether compatibility mode is in place. If it is, the first target (if any) is used. Otherwise, an 'all' target is used. If no such targets are defined, an error occurs.

When executing targets, checks are made to ensure that all required input files exist. If they do not, an error occurs, the user is alerted, and processing halts.

If the SMakefile does not exist, an error occurs.

Info

A subcommand can be specified:

  • g(eneral) (def.): Returns general information.
  • d(epends): Returns a list of targets which the selected target(s) depend upon.
  • r(evdeps): Returns a list of targets which depend upon the given targets.

When no targets are given,

  • g(eneral) returns a list of targets
  • d(epends) and r(evdeps) both return a graph of all targets by their dependencies.

Missing input files are marked (by prepending a ! in front of invalid target names) in all subcommands, but in g(eneral) the missing input files are named.

If the SMakefile does not exist, an error occurs.

Help

Provides help information about either SMake in general (global options, available commands, invocation examples, etc.) or provides information about a specific command (with options, subcommands if any, examples, etc.). Target names are not recognized, and any build configurations are ignored. The SMakefile is not required, and is never used, by this command.

Clone this wiki locally