Hands-on task
Order-only prerequisite: a directory for artifacts
Build artifacts should live in an out/ subdirectory that doesn't exist yet. Write a Makefile with an out/app target that builds app from main.c (cp) into out/. Create the out directory automatically, but declare it as an order-only prerequisite (after the | symbol) — so that changes to the directory's timestamp don't trigger needless rebuilds of out/app. The Makefile is handy to write in the Editor tab above the terminal: in a Makefile it puts a real TAB at the start of a recipe line.
- make
- order-only prerequisites
- mtime
- artifact directory