Hands-on task
Rebuild only when the source changes
In /root/proj there is main.c. Write a Makefile with an app target that depends on main.c and is built by copying (cp main.c app). The essence is in the dependency: make should rebuild app only if main.c is newer than the built app, and do nothing if the source hasn't changed.
- make
- target dependencies
- incremental build
- mtime