Improve preprocessor support to record synthesized resoures and proper
relative URIs in the generator.