change to make it generate messages before compiling (otherwise the message header target.h doesn't exist when compiling)