I want to write a makefile that has a build rule, a run rule and a clean (delete the exe file) rule . This is quite a simple task, but how can one incorporate some rule in the makefile such that the executable is only created if it doesn't already exist ?
Asked
Active
Viewed 169 times
1 Answers
0
If your build rule depends on the source needed to create the executable, then it will automatically only do the build process if the executable is not present (or any source files have modification time newer than the existing executable). So unless I'm missing something, you don't need anything special to make this happen.

roadmr
- 34,222
- 9
- 81
- 93