I've spent already two days trying to understand the documentation and force to work mozilla build system with no luck.
It seems that mozilla documentation is ridiculously out-dated and sparsed (most of documents are 4-5 years old)!! I've started with this tutorial  and ended up with errors - it turned out that mozilla recently changed it's build system  for using moz.build files. So I've updated my files in add-on directories to moz.build, but invoking "make -f client.mk build" still doesn't want to simply generate stub header/cpp files from idl description!
This  documentation is obsoleted as well.
This one  doesn't show how exactly I should compile my extension (or it does? where?).
This  doesn't say anything how to use xpidl compiler (which is turned out to be replaced by pyxpidl  now). I've tried to build Xulrunner SDK and find out how to use idl compiler  but all I get instead of cpp header is this: