Here you go some makefile, well not magic more like a card trick

https://github.com/sideshowcoder/riak_control/commit/12f3268acd33bdc625f4f364f71fe975c3b241d8