1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/make.md

38 lines
922 B
Markdown
Raw Normal View History

2016-01-04 11:23:09 +01:00
# make
> Task runner for targets described in Makefile.
2016-01-04 11:23:09 +01:00
> Mostly used to control the compilation of an executable from source code.
2020-10-27 14:30:07 +01:00
> More information: <https://www.gnu.org/software/make/manual/make.html>.
2016-01-04 11:23:09 +01:00
- Call the first target specified in the Makefile (usually named "all"):
2016-01-04 11:23:09 +01:00
`make`
- Call a specific target:
2016-01-04 11:23:09 +01:00
`make {{target}}`
2016-01-04 11:23:09 +01:00
2017-06-06 19:56:14 +01:00
- Call a specific target, executing 4 jobs at a time in parallel:
`make {{[-j|--jobs]}} {{4}} {{target}}`
2017-06-06 19:56:14 +01:00
- Use a specific Makefile:
2016-01-04 11:23:09 +01:00
`make {{[-f|--file]}} {{path/to/file}}`
2016-01-04 11:23:09 +01:00
- Execute make from another directory:
2016-01-04 11:23:09 +01:00
`make {{[-C|--directory]}} {{path/to/directory}}`
2016-07-05 16:21:56 +02:00
- Force making of a target, even if source files are unchanged:
2016-07-05 16:21:56 +02:00
`make {{[-B|--always-make]}} {{target}}`
- Override a variable defined in the Makefile:
`make {{target}} {{variable}}={{new_value}}`
- Override variables defined in the Makefile by the environment:
`make {{[-e|--environment-overrides]}} {{target}}`