Reputation: 33
I'm working on a project with very lightweight build steps that look like this:
cat f1.js f2.js f3.js f4.js > glom.js
So first I wrote a makefile that does it and it was good.
Then as I was iterating on the project I realized that having to run make manually was really annoying so I wrote a python script that watches the filesystem and makefile and runs make whenever something changes.
That was fine too, but it occurred to me that this is something make should do on its own, and I would rather not have a python script floating around the source tree when make can do the job just fine.
So I searched around but didn't find any examples of this. My questions are as follows:
Upvotes: 1
Views: 104
Reputation: 272557
This isn't the responsibility of Make, which is why it doesn't do it. In many cases, rebuilding is a complex, time-consuming process, in which case you certainly don't want it to occur on every single change to the source files.
However, many IDEs are capable of performing auto-rebuild when changes are made (e.g. Eclipse CDT).
Upvotes: 3