ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Curt Arnold" <carn...@houston.rr.com>
Subject Re: preprocessing java source
Date Sun, 08 Sep 2002 22:56:49 GMT
> There isn't any real disadvantage to using the <ppjavac> task to
preprocess
> as a distinct task before <javac>.  But, just as the C preprocessor is
> automatically called for you, I wanted the <ppjavac> 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:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message