AMake Flags

AMake understands the following special targets and attributes. These can be used as any target and/or dependency. Some only work as a target and others as a dependency. It may also work differently when used one way or another. The way each flag can be used is not specified here.

Attribute Comment
.BEGIN
.FIRST
.BEFORE
execute one of these targets at the start; .BEGIN has priority over .FIRST and .FIRST has priority over .BEFORE (i.e. only the target with the highest priority is executed, the others are ignored)
.CONTINUE similar to the -k/--keep-going command line options; request that AMake continues to build targets as long as there are targets to be built even when some other targets generate an error; only targets which don't depend on the targets generating errors will be built
.DEFAULT used as what to execute by default; define the default targets
.DELETE_ON_ERROR
.ERASE
ensure the targets will be deleted on errors
.DONE executed at exit; when an error occurs and a .FAILED was defined, the .FAILED is used instead; these commands are executed after the .END, .LAST or .AFTER commands; this is the counter part of the .INIT target
.DONTCARE
.OPTIONAL
the targets are not necessary (if they don't exist, and can't be created, forget about them)
.END
.LAST
.AFTER
execute one of these targets at the end; it is executed only when no error occured; the .END has priority over .LAST and .LAST has priority over .AFTER (i.e. only the target with the highest priority is executed)
.ERROR execute .ERROR at the end if an error occured while executing a shell command; the .ERROR target is executed before the .FAILED
.EXCLUSIVE execute the following commands exclusively (one process at a time)
.EXEC do always execute (like the ! rule operator)
.EXPORT export variables
.EXPORTSAME understood but ignored attribute
.EXPORT_ALL_VARIABLE
.EXPORT_ALL_VARIABLES
export all the variables
.FAILED execute after the .ERROR and one of .END or .LAST when an error occured; when no error occured, the .DONE is executed if it exist
.IGNORE ignore command line errors
.IMAKE turn on the Imake output compatibility flag; this target is automatically added in the resulting Makefile created when the --imake option is used
.INCLUDES possible include suffixes (unused)
.INIT defines a set of commands to be executed before anything else is run in the makefile; this is the counter part of the .DONE target; the .BEGIN, .FIRST and .BEFORE targets are checked after the .INIT was executed
.INTERMEDIATE define a target as an intermediate target (which will be automatically deleted once AMake exists)
.INTERRUPT execute on interrupt (Ctrl-C)
.INVISIBLE invisible dependencies don't appear in automatic variables
.JOIN a target to join to others when specified as a source
.LIBS possible library suffixes (unused)
.LOCK prevent any target's commands defined with a lock to be executed concurrently (by more than one process at a time)
.MAIN define the main targets (those which need to be rebuild)
.MAKE
.RECURSIVE
specify that the following commands call the $(MAKE) command and needs to be executed even in touch (--touch) or in no execution (--noexecution) modes
.MAKEFLAGS
.MAKEOPTS
additional flags (see the command line)
.MAKE_VERSION verify the version of AMake; similar to the #if version() preprocessor
.NETWORK turn ON the network feature (not fully there yet...)
.NODATE make a target date non significant when it appears as a dependency of another target
.NOEXPORT prevent variables from being exported
.NO_OPERATION does nothing; can be used to close the last target and then test targets with preprocessor instructions
.NOTMAIN ensures that the given targets will never be the main targets (targets which would be built by default)
.NOTPARALLEL
.NO_PARALLEL
forbid parallele executions (only one child process at a time)
.NULL define the null suffix (or forbid the null suffix); the internal default is ".out"
.OPTIMIZE this attribute is ignored (AMake always runs in an optimized version, thought it can get slow when a large number of files need to be parsed)
.ORDER build the sources in the given order whenever possible
.PARALLEL enable the parallel mode (this is the default in AMake, but other compatible modes will eventually turn this mode OFF by default)
.PATH[.<suffix>] search files (with the given suffix) in the list of paths defined as dependencies
.PHONY marks targets as non-existing files
.POSIX this attribute is ignored (at this time AMake isn't POSIX compliant)
.PRECIOUS precious files are never deleted by AMake
.REDO define targets which need to be redone before the makefile script can be considered as being valid
.SECONDARY secondary targets are intermediate precious targets
.SHELL specify your shell name and flags
.SILENT force AMake to be as quiet as possible
.SINGLESHELL execute each command line in a different shell (which generates the problems of 'end-of-line' and 'cd ...' of many file maker)
.SUFFIXES
.EXTENSIONS
specify suffixes for automatic commands
.TERMINAL make an easy pattern a terminal pattern so AMake stops searching for more patterns matching the new dependencies
.USE create a macro that can be used with other targets
.WAIT this special target is recognized but does nothing at this time