Bug 1029385 - Rewrite app-makefile rule in javascript

I think you would like to also remove the `cp` call in calendar makefile.