Skip to content
davidmoreno edited this page May 9, 2011 · 2 revisions

Compile-Run Loop is a simple helper that tracks the modification of source code files, and according to them, automatically stops the running program, recompiles and runs it again.

With this simple mechanism you are not tied to slow iterations of development, compile, try. You skip the compile part and just development and try.

This works on GNU/Linux on ELF files. It should work on any programming language that outputs proper debug info: C programming language, C++, D, Go, Fortran, Pascal, Java... But it has only been tested with C. Programs to be used this way need to be compiled for debugging, as that's the only way to know which are the source files of the executable.

For many projects it might not be interesting or useful, but for some others its a real time saver.

It is similar to Django automatic autoreload on source modification, and on some Java frameworks.

Usage

You can use directly the shell script at tools/clr/compilerunloop.sh or when onion is installed its installed as clr. It just needs the executable name, and its arguments. For example clr examples/hello/hello will work, as will clr ./hello at the right directory.

Clone this wiki locally