| |
|
| org.apache.jk.ant.SoTask org.apache.jk.ant.compilers.CompilerAdapter
All known Subclasses: org.apache.jk.ant.compilers.CcCompiler, org.apache.jk.ant.compilers.MsvcCompiler,
CompilerAdapter | abstract public class CompilerAdapter extends SoTask (Code) | | s/javac/C compiler/
The interface that all compiler adapters must adher to.
A compiler adapter is an adapter that interprets the javac's
parameters in preperation to be passed off to the compier this
adapter represents. As all the necessary values are stored in the
Javac task itself, the only thing all adapters need is the javac
task, the execute command and a parameterless constructor (for
reflection).
author: Jay Dickon Glanville jayglanville@home.com author: Costin Manolache |
CompilerAdapter | public CompilerAdapter()(Code) | | |
addDebug | protected void addDebug(Commandline cmd)(Code) | | |
addDefines | protected void addDefines(Commandline cmd)(Code) | | |
addExtraFlags | protected void addExtraFlags(Commandline cmd)(Code) | | Common cc parameters
|
addIncludes | protected void addIncludes(Commandline cmd)(Code) | | |
addOptimize | protected void addOptimize(Commandline cmd)(Code) | | |
addProfile | protected void addProfile(Commandline cmd)(Code) | | |
compile | public void compile(Vector sourceFiles) throws BuildException(Code) | | Compile the source files. The compiler adapter can override either this method
( if it can compile multiple files at once ) or compileSingleFile().
Note that the list includes _all_ sources, findCompileList() can be used to
avoid compiling files that are up-to-date.
|
compileSingleFile | public void compileSingleFile(Source sourceObj) throws BuildException(Code) | | Compile single file
|
displayError | protected void displayError(int result, String source, Commandline cmd) throws BuildException(Code) | | |
execute | public void execute() throws BuildException(Code) | | |
findCompileList | protected Vector findCompileList(Vector srcList) throws BuildException(Code) | | Find the subset of the source list that needs compilation.
|
getCompiledFiles | public Vector getCompiledFiles()(Code) | | Return the files that were actually compiled
|
getTargetFiles | abstract public String[] getTargetFiles(Source src)(Code) | | Return the files that depend on a src file.
The first item should be the .o file used for linking.
|
needCompile | public boolean needCompile(Source source)(Code) | | Verify if a .c file needs compilation.
As with javac, we assume a fixed build structure, where all .o
files are in a separate directory from the sources ( no mess ).
XXX Hack makedepend somehow into this.
|
removeOFiles | public void removeOFiles(Vector srcList)(Code) | | Remove all generated files, cleanup
|
|
|
|