Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 63129 invoked from network); 9 Sep 2002 05:59:05 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 9 Sep 2002 05:59:05 -0000 Received: (qmail 10733 invoked by uid 97); 9 Sep 2002 05:59:46 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 10666 invoked by uid 97); 9 Sep 2002 05:59:45 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 10059 invoked by uid 98); 9 Sep 2002 04:56:05 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Reply-To: From: "didge" To: "Ant Developers List" , Subject: RE: preprocessing java source Date: Sun, 8 Sep 2002 21:55:31 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Importance: Normal In-Reply-To: <003701c2578b$04025e90$a800a8c0@CurtMicron> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Curt, I think that a distinct preprocessing task does make sense, and one that could process any files, not just the .java files is limited to (because it is based on ). In addition, I would implement it in a similar pattern as the implementation of Javac (with its adapters to support alternative compiler implementations) so that you could conceivably use alternative preprocessors. Incidentally, I chose Velocity because I needed a cross platform preprocessor that was cheap and easy to integrate with my build process. In addition, I wanted to leverage my ant project's properties at compile time, which no traditional preprocessor would easily be able to do. > If the changes were moderately localized (as typical in bug fixing and > feature enhancement), you could make modifications to the preprocessed file > and use a merge utility to create a new conditionalized source from the > unaltered preprocessed file and the unaltered conditionalized source. Ah, yes, you probably could use a merge utility to get a dump of what changes were made to preprocessed files and put them into the conditionalized source subject. This is all subject to the complexity of the changes and the source, of course. didge -----Original Message----- From: Curt Arnold [mailto:carnold@houston.rr.com] Sent: Sunday, September 08, 2002 3:57 PM To: didge@atac.net Cc: ant-dev@jakarta.apache.org Subject: Re: preprocessing java source > There isn't any real disadvantage to using the task to preprocess > as a distinct task before . But, just as the C preprocessor is > automatically called for you, I wanted the to be integrated into > the task for compilation, a sort of drop in replacement for the javac task. > However, an additional option could be added that would allow compilation to > be optional. Then you could preprocess and compile in two steps, as > desired. You would only have to coordinate the location of the preprocessed > files between the two tasks. My initial feeling is that it would be cleaner as a distinct task. An alternative would be to enhance the cc task to emit preprocessed files using whatever C++ preprocessor is available and then use the javac class. > > I'm not exactly clear on the development process you're suggesting in your > second comment, but the concern of checking in preprocessed files is that > one you check in a preprocessed file, all the information that yielded the > file, e.g. VTL directives, cpp #define, etc., are lost and you can't go back > (except maybe manually and at great effort). If the changes were moderately localized (as typical in bug fixing and feature enhancement), you could make modifications to the preprocessed file and use a merge utility to create a new conditionalized source from the unaltered preprocessed file and the unaltered conditionalized source. You'd use the merge utility as if one developer added all the preprocessor directives to the unaltered preprocessed file and another developer added the bug fixes. This would not work if you made major structural modifications to the preprocessed file. -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: