Hacker News new | past | comments | ask | show | jobs | submit login

Does make have watch functionality built in? Sometimes I use make and entr together. entr detects filesystem changes and make efficiently rebuilds. But nowadays a lot of languages have their own build tools besides make, and entr works directly with any of them.



Here is another way to look at it:

    $ while sleep 2; do make -s build; done
What files are interesting is already encoded in your Makefile and make is pretty good at figuring out if a given file changed or not so, instead of duplicating efforts, run make every second or two and let it figure out what needs to be done.

It won't eat your memory or pool of file pointers and your CPU will barely feel it.


That's a solid approach if your dependencies are already managed by make, but languages like Rust and Go do their own dependency management, and Rust in particular is pretty slow to compile. I wouldn't want it running every 2 seconds.


Well it knows from the filesystem which files have changed.

If you mean “invoke as soon as a file has changed”: I certainly don’t want that behavior as many code changes require multiple files to be edited and there’s no automatic way to understand as the change hasn’t been written yet.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: