The new address for this project is antpp.melda.info
This project adds preprocessing capability to java programs. Antpp does not implement a preprocessor, it calls the well-known cpp (C PreProcessor). Antpp is a collection of ant tasks.
The program has no GUI, but I created a simple screenshot: (Click on the image to enlarge it).
You can find more information on the Sourceforge Summary page of the project.
Copy antpp-bin.jar into the lib directory of Ant.
It is necessary to define the tasks at the beginning of the
build.xml
file:
Task definitions |
<taskdef name="cpp"
classname="hu.jataka.antpp.Cpp"/>
|
Calls the preprocessor for a specified file, or for all the *.x* files in a directory. It ignores files with the following patterns: *~, .#*, *.xml
It replaces the '.x' part of the name with '.' For example: Main.xjava -> Main.java
It creates read-only files (if the extension is not jad), because modifying the generated files by hand is not a good idea.
Parameters of cpp task | |
file | Name of the file to be preprocessed. |
dir | Name of the directory, to search for files to be preprocessed. |
macros | List of macros to be passed to cpp. <macro> tags
can also be used. |
cpp example |
<target name="preprocess" depends="init">
|
Or:
cpp example (using <macro> tags) |
<target name="preprocess" depends="init">
|
Deletes the generated files (useful as a part of the clean process).
Parameters of cppdel task | |
dir | Directory to search for generated files. |
cppdel example |
<target name="clean">
|
András Salamon / Jataka Ltd.