I was reading (http://llvm.org/docs/Projects.html) which mentions the use of ExtraSource as a variable that can be set in project Makefiles to handle code that is generated. I couldn’t get this to work, and grepping through all the Makefile.*s in all the directories I couldn’t find any mention of “ExtraSource” except for in the Makefile.common (where it is in a comment):
Is this a bug or has the documentation simply not been updated? Is there a new way to do it?
On a slightly related note, I tend to like to put generated files in subdirectories (maybe this is a bad thing?) to keep them from cluttering the code that I’m working on. This breaks the default LLVM makefiles because it compiles foo/bar.c to Debug+Asserts/foo/bar.o and the foo directory doesn’t exist in Debug+Asserts.
I’m pretty bad with Makefiles, but the attached patch seems to fix both problems, though possibly not in the most elegant way.
Makefile.rules.patch (8.08 KB)