4 ms·
By using pseudo targets only in the example and not real files, the article misses the main point of targets and dependencies: target rules will only be execute
by raimue 9y ago
By using pseudo targets only in the example and not real files, the article misses the main point of targets and dependencies: target rules will only be executed if the dependencies changed. make will compare the time of last modification (mtime) on the filesystem to avoid unnecessary compilation. To me, this is the most important advantage of a proper Makefile over a simple shell script always executing lots of commands.
- Touche 9y agoDon't you have to list every file though? Many of my projects have hundreds of source files.
- ycombobreaker 9y agoNo, you can use `wildcard`
- deleted 9y ago[deleted]
- syncsynchalt 9y agoSo my example (below in another comment), there's a solution using $(wildcard).
- deleted 9y ago[deleted]