I could only make this Makefile work replacing all variable references to @$(REBAR) with the direct call "./rebar". Using Ubuntu 12.04. https://github.com/OJ/csd/blob/Part4-20120215/Makefile