> From: Jon Stevens [mailto:[EMAIL PROTECTED]]
> 
> One thing that I tend to like to do, that *some* others tend 
> not to like is
> this:
> 
> When building the source code, I like to copy all the source 
> code from the
> "com" directory into the ${build.dir} which is the directory 
> where things
> get built. Then, I would call JavaCC on the .jj files and 
> have the output go
> into the ${build.dir} as well. Once JavaCC has executed, 
> Javac is executed
> and the compiled classes go into ${build.classes} which is in the
> ${build.dir}.
> 
> The advantage of doing this is that the original source 
> repository remains
> unchanged and clean (no JavaCC output and no need for 
> .cvsignore files deep
> in the tree) and also allows you to do things like embed the 
> version number
> into the compiled code without modifying the original 
> sources. The OTHER
> thing it does is that it allows you to simply remove the ${build.dir}
> without having to worry about messing anything up.
> 
> The reason why people don't seem to like doing this is 
> because it duplicates
> the source code on disk as well as adds another <copy> step in the Ant
> build.xml file.

Another reason not to like it is that compiler error messages no longer
reference the proper source file.  I'm a fan of Emacs' M-x compile command,
which lets you jump, with C-c C-c, from a compilation error message to the
offending line.  But this is not as useful when the offending line is in a
temporary file, where you don't want to edit it.

It is possible to both have and eat one's cake here.  I have set up build
systems which put generated files (JavaCC stuff, .class files, etc.) in
temporary directories, but leave the source files in their original
location.  It's a bit more complicated, but I'd prefer it to the present
situation.  Can you modify Lucene's build.xml to do this?  Thanks.

Doug

_______________________________________________
Lucene-dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/lucene-dev

Reply via email to