Chapter 4. Build Engine API

4.1. General Principles

4.1.1. Keyword arguments

All methods and functions in this API will support the use of keyword arguments in calls, for the sake of explicitness and readability. For brevity in the hands of experts, most methods and functions will also support positional arguments for their most-commonly-used arguments. As an explicit example, the following two lines will each arrange for an executable program named foo (or foo.exe on a Win32 system) to be compiled from the foo.c source file:

	env.Program(target = 'foo', source = 'foo.c')

	env.Program('foo', 'foo.c')

4.1.2. Internal object representation

All methods and functions use internal (Python) objects that represent the external objects (files, for example) for which they perform dependency analysis.

All methods and functions in this API that accept an external object as an argument will accept either a string description or an object reference. For example, the two following two-line examples are equivalent:

	env.Object(target = 'foo.o', source = 'foo.c')
	env.Program(target = 'foo', 'foo.o')    # builds foo from foo.o

	foo_obj = env.Object(target = 'foo.o', source = 'foo.c')
	env.Program(target = 'foo', foo_obj)    # builds foo from foo.o