make dist and use pregenerated files
fix according to Waldek's comments
fix needless recompilation