2016-01-04 13:23:09 +03:00
|
|
|
# make
|
|
|
|
|
2016-09-15 17:43:05 +03:00
|
|
|
> Task runner for targets described in Makefile.
|
2016-01-04 13:23:09 +03:00
|
|
|
> Mostly used to control the compilation of an executable from source code.
|
|
|
|
|
2016-09-15 17:43:05 +03:00
|
|
|
- Call the first target specified in the Makefile (usually named "all"):
|
2016-01-04 13:23:09 +03:00
|
|
|
|
|
|
|
`make`
|
|
|
|
|
2016-09-15 17:43:05 +03:00
|
|
|
- Call a specific target:
|
2016-01-04 13:23:09 +03:00
|
|
|
|
2016-09-15 17:43:05 +03:00
|
|
|
`make {{target}}`
|
2016-01-04 13:23:09 +03:00
|
|
|
|
2017-06-06 21:56:14 +03:00
|
|
|
- Call a specific target, executing 4 jobs at a time in parallel:
|
|
|
|
|
|
|
|
`make -J{{4}} {{target}}`
|
|
|
|
|
2016-09-15 17:43:05 +03:00
|
|
|
- Use a specific Makefile:
|
2016-01-04 13:23:09 +03:00
|
|
|
|
2016-09-15 17:43:05 +03:00
|
|
|
`make --file {{file}}`
|
2016-01-04 13:23:09 +03:00
|
|
|
|
2016-01-07 20:31:27 +03:00
|
|
|
- Execute make from another directory:
|
2016-01-04 13:23:09 +03:00
|
|
|
|
2016-09-15 17:43:05 +03:00
|
|
|
`make --directory {{directory}}`
|
2016-07-05 17:21:56 +03:00
|
|
|
|
2016-09-15 17:43:05 +03:00
|
|
|
- Force making of a target, even if source files are unchanged:
|
2016-07-05 17:21:56 +03:00
|
|
|
|
2016-09-15 17:43:05 +03:00
|
|
|
`make --always-make {{target}}`
|