Make (really GNU Make)
Local
External
How to ignore that a command failed and keep going
# use a '-' as the first char of the command
target:
-rm fileThatDoesNotExist
Variables
Sample for examples below
out.exe: a.obj b.obj
CC -o out.exe a.obj b.obj
out.exe: a.obj b.obj
CC -o $@ $^
| $@ | Target |
| $^ | Things the target depends on |
Error Directive
$(error message)
example:
$(error This is an error)
Conditionals
ifndef ENVVARIABLE
$(error ENVVARIABLE not defined)
endif