eclipsemakefileerlangbeamerlide

Reloading/Recompiling/Refreshing .beam files inside a terminal


I use Eclipse and Erlide to develop in Erlang. To run the software I enter the ebin/ directory with my terminal since I don't like the console Eclipse provides. However after each change I have to exit and re-enter erl in the terminal to reload the .beam files that have been changed. Eclipse automatically generates new .beam files into the ebin/ directory after every save.

I know I can manually compile it with the c(filename) command, but that would require me to move to the src/ directory, compile the files, and move them back to the ebin/ directory. This requires a lot more work that just exiting and entering the Erlang terminal. I have heard of makefiles, but I don't know if they can be ran from within an Erlang terminal. The reason I don't want to exit the terminal is because I will lose my history of previous commands. If I'm using modules:methods with long names this takes a lot of typing time for each change made.

Is there any method to reload the .beam files in the current directory while in an Erlang terminal? Or is there any way to load the previous command history of the Erlang terminal?


Solution

  • I would suggest something like active or sync but straightforward approach with c/1, l/1 and nl/1 works too