Hello, I just tried to work through the "Creating an LLVM Project" tutorial and have some suggestions to improve that page (http://www.llvm.org/ docs/Projects.html). 1. The tutorial says "remove all the directories named .svn ("Create a Project from the Sample Project", step 2), so here's a command to copy-and-paste and run from within the new project directory: find -f . \( -name .svn -and -print -and -exec rm -rf {} \; -and - prune \) 2. The line AutoRegen.sh ("Create a Project from the Sample Project", step 5) should be changed to ./AutoRegen.sh so it will work if . is not in the path. 3. In "Create a Project from the Sample Project", step 6 the arguments are used to "tell your project where the LLVM source/object tree is located. The tutorial doesn't really give a good hint which directory is meant. For example, the source is located partly in the lib/ and partly in the tools/ subdirectory of the main llvm directory. It might also refer to the main llvm directory, but the simple fact that the source and object directories - which are both within the main llvm directory -- must be specified separately suggests that this is not the case. In general, it left me (and probably others) clueless which path to specify. 4. The same step says "run configure in the directory in which you want to place object code". Again this left me a bit clueless, but it seems that running configure from any other directory than the one it is located in will place generated makefiles where they don't belong. (These generated makefiles would try to include other makefiles that are always in the same directory as the configure script) Anyway, I cannot follow the "autoconf" way any more because I'm using an outdated aclocal version and cannot exclude this as the reason for the remaining problems I'm experiencing, so I will go on writing a custom makefile, but these suggestions should help newcomers a bit. Greetings, Martin Geisse
On Jan 3, 2009, at 10:20 AM, Martin Geisse wrote:> > 2. The line > > AutoRegen.sh > > ("Create a Project from the Sample Project", step 5) should be > changed to > > ./AutoRegen.sh > > so it will work if . is not in the path.Fixed.> > > 3. In "Create a Project from the Sample Project", step 6 the > arguments are used to "tell your project where the LLVM source/object > tree is located. The tutorial doesn't really give a good hint which > directory is meant. For example, the source is located partly in the > lib/ and partly in the tools/ subdirectory of the main llvm > directory. It might also refer to the main llvm directory, but the > simple fact that the source and object directories - which are both > within the main llvm directory -- must be specified separately > suggests that this is not the case. In general, it left me (and > probably others) clueless which path to specify.It seems pretty intuitive to people already familiar with autoconf-style srcdir!=objdir builds. Can you sugggest a better wording? Thanks, Dan
Dan Gohman wrote:> On Jan 3, 2009, at 10:20 AM, Martin Geisse wrote: > >> 2. The line >> >> AutoRegen.sh >> >> ("Create a Project from the Sample Project", step 5) should be >> changed to >> >> ./AutoRegen.sh >> >> so it will work if . is not in the path. >> > > Fixed. > > >> 3. In "Create a Project from the Sample Project", step 6 the >> arguments are used to "tell your project where the LLVM source/object >> tree is located. The tutorial doesn't really give a good hint which >> directory is meant. For example, the source is located partly in the >> lib/ and partly in the tools/ subdirectory of the main llvm >> directory. It might also refer to the main llvm directory, but the >> simple fact that the source and object directories - which are both >> within the main llvm directory -- must be specified separately >> suggests that this is not the case. In general, it left me (and >> probably others) clueless which path to specify. >> > > It seems pretty intuitive to people already familiar with > autoconf-style srcdir!=objdir builds. Can you sugggest a > better wording? >Hrm. The projects document assumes that the reader is already familiar with other LLVM build system issues. It would be better if that were clarified. I suppose we could do one of two things: 1) Point back to the Getting Started Guide where srcdir and objdir are more clearly defined. 2) Add a note in the beginning of the document explaining what prerequisite material is needed and where to read it. Thoughts on which would be better? Is the srcdir/objdir issue the only unclear bit in that document? -- John T.> Thanks, > > Dan > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
On Jan 12, 2009, at 10:38 PM, Dan Gohman wrote:>> >> 3. In "Create a Project from the Sample Project", step 6 the >> arguments are used to "tell your project where the LLVM source/object >> tree is located. The tutorial doesn't really give a good hint which >> directory is meant. For example, the source is located partly in the >> lib/ and partly in the tools/ subdirectory of the main llvm >> directory. It might also refer to the main llvm directory, but the >> simple fact that the source and object directories - which are both >> within the main llvm directory -- must be specified separately >> suggests that this is not the case. In general, it left me (and >> probably others) clueless which path to specify. > > It seems pretty intuitive to people already familiar with > autoconf-style srcdir!=objdir builds.That has to be the reason I didn't understand it :)> Can you sugggest a > better wording? > > Thanks, > > Dan >Unfortunately, no, because I still have no clue what path has to be passed (I did not investigate any further because the autoconf version conflict (bug 1220, pointed out by me22) prevented me from configuring the paths at all. I got it working with some manual hacking though. Anyways, it didn't even come to my mind that this is a standard feature of autoconf. Maybe a hint in that direction and/or a short example would be helpful. Greetings, Martin Geisse