Have make remove targets if a recipie fails.
Merge pull request #501 from dhylands/fix-gen-fail

Remove generated .h file if the generation process fails.