Skip to content

Terminology

ARaspiK edited this page Feb 5, 2019 · 1 revision

Terminology / Definitions

SMakefile

A SMakefile is a file which contains descriptions of targets in such a format that SMake can understand it. By default, SMake looks for this file as being named SMakefile and residing in the current directory.

Target / Rule

A target is a method to convert some input files into some output files. It takes in a set of input files, runs a given set of commands, and expects the output files to be created. A target may depend upon another one for input files, such that the depended-upon target will be run first to generate files which are used as input files to the depending target.

Dependency

A dependency of a target A runs before A, to ensure that A will run successfully. For example, A may require an input file foo.o that is only produced by another target. In this case, A will (should) declare its dependency on the target so that that target runs before A.

Virtual dependency

Target B is a virtual dependency of target A if one of B's input files is one of A's output files. The difference between a dependency and a virtual dependency is that virtual dependencies are not declared by targets, even though they should be. SMake detects virtual dependecies and warns about them automatically, since a virtual dependency is generally a sign of a dependency that the programmer forgot to declare.

Cyclic dependency

This is a situation where two targets depend on each other. Since SMake will (by default) update the dependencies of a target before updating the target itself, this leads to an infinite loop, and so is not allowed.

Clone this wiki locally