🛠️Make (Build Tool)
Also known as Makefile, GNU Make, make command
An old, simple build tool. It reads a Makefile and redoes only what changed.
Think of it like
It is like a list of chores where some must wait for others. It does only the ones still needed.
Example
Jack keeps a Makefile in his project. He types make test, and Make builds what changed, then runs the tests.
Why it matters
It is on most Unix systems. Many teams use a Makefile as the one place to start each job.
Definition
Example code
makefile
app: main.c
cc -o app main.c
test: app
./app --self-testCommon mistake
Key takeaways
- 1Targets. Each one names a file or a job.
- 2Only what changed. It compares file times.
- 3Tabs matter. Command lines start with a tab.