So much easier to write in autotools! Anyway here it is, also with a new option --enable-g-ir-doc (by default set to false).