Andreas Färber
2011-Mar-13 10:52 UTC
[LLVMdev] Question about TableGen when adding LLVM Backend.
Am 10.03.2011 um 05:35 schrieb Jakob Stoklund Olesen:> On Mar 9, 2011, at 8:15 PM, Lu Mitnick wrote: > >> Hello Jakob, >> >> Is this means that TableGen execution is handled in Makefile. >> Porting programmer doesn't need to execute TableGen by hand? > > That's right. > > You are going to be editing your .td files a lot, so you want that > integrated in the build system.In practice that'll mean adding the correct directives to CMakeLists.txt, not Makefile, right? That's what the targets I looked at did. Or is that optional when you just invoke "make"? Andreas
Christoph Erhardt
2011-Mar-13 11:33 UTC
[LLVMdev] Question about TableGen when adding LLVM Backend.
Hi Andreas,> In practice that'll mean adding the correct directives to > CMakeLists.txt, not Makefile, right? That's what the targets I looked > at did.LLVM can be built using either CMake or the GNU Autotools. Your backend ought to provide support for both build systems, so you should create a CMakeLists.txt as well as a Makefile in your sub-directory. The Makefile appears to be rather trivial because there's some automagic going on - nevertheless, you will need one. :-)> Or is that optional when you just invoke "make"?In that case you're using the Autotools, so your Makefile is going to be utilized. Best regards, Christoph
Andreas Färber
2011-Mar-13 12:18 UTC
[LLVMdev] Question about TableGen when adding LLVM Backend.
Hi Christoph, Am 13.03.2011 um 12:33 schrieb Christoph Erhardt:>> In practice that'll mean adding the correct directives to >> CMakeLists.txt, not Makefile, right? That's what the targets I looked >> at did. > LLVM can be built using either CMake or the GNU Autotools. Your > backend > ought to provide support for both build systems, so you should > create a > CMakeLists.txt as well as a Makefile in your sub-directory.> The Makefile appears to be rather trivial because there's some > automagic > going on - nevertheless, you will need one. :-)Now I see: My confusion came from seeing only the customized file names in BUILT_SOURCES. But Makefile.rules:1681 actually processes those files by *Gen*.inc.tmp name patterns. Thanks for explaining, Andreas>> Or is that optional when you just invoke "make"? > In that case you're using the Autotools, so your Makefile is going > to be > utilized. > > Best regards, > Christoph
Jakob Stoklund Olesen
2011-Mar-13 21:11 UTC
[LLVMdev] Question about TableGen when adding LLVM Backend.
On Mar 13, 2011, at 3:52 AM, Andreas Färber wrote:> Am 10.03.2011 um 05:35 schrieb Jakob Stoklund Olesen: >> On Mar 9, 2011, at 8:15 PM, Lu Mitnick wrote: >>> Is this means that TableGen execution is handled in Makefile. Porting programmer doesn't need to execute TableGen by hand? >> You are going to be editing your .td files a lot, so you want that integrated in the build system. > > In practice that'll mean adding the correct directives to CMakeLists.txt, not Makefile, right? That's what the targets I looked at did. > Or is that optional when you just invoke "make"?Those are part of two unrelated build systems - cmake and autoconf. You need to maintain both for an in-tree target. Otherwise you only need build files for the build system you use. /jakob