diff options
23 files changed, 67 insertions, 80 deletions
diff --git a/src/main/java/net/sf/antcontrib/cpptasks/CCTask.java b/src/main/java/net/sf/antcontrib/cpptasks/CCTask.java index 5f15bf1..2e6adab 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/CCTask.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/CCTask.java @@ -1,6 +1,6 @@ /* * - * Copyright 2001-2005 The Ant-Contrib project + * Copyright 2001-2008 The Ant-Contrib project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,7 +52,7 @@ import org.apache.tools.ant.types.Environment; * </p> * * <p> - * Copyright (c) 2001-2007, The Ant-Contrib project. + * Copyright (c) 2001-2008, The Ant-Contrib project. * </p> * * <p> @@ -379,7 +379,7 @@ public class CCTask extends Task { * Checks all targets that are not forced to be rebuilt or are missing * object files to be checked for modified include files * - * @returns total number of targets to be rebuilt + * @return total number of targets to be rebuilt * */ protected int checkForChangedIncludeFiles(Hashtable targets) { @@ -1302,7 +1302,7 @@ public class CCTask extends Task { /** * If set to true, all files will be rebuilt. * - * @paran rebuildAll If true, all files will be rebuilt. If false, up to + * @param rebuildAll If true, all files will be rebuilt. If false, up to * date files will not be rebuilt. */ public void setRebuild(boolean rebuildAll) { diff --git a/src/main/java/net/sf/antcontrib/cpptasks/CUtil.java b/src/main/java/net/sf/antcontrib/cpptasks/CUtil.java index c41c99e..482593e 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/CUtil.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/CUtil.java @@ -34,6 +34,7 @@ import org.apache.tools.ant.util.StringUtils; * Some utilities used by the CC and Link tasks. * * @author Adam Murdoch + * @author Curt Arnold */ public class CUtil { /** @@ -180,7 +181,6 @@ public class CUtil { * @return relative path of target file. Returns targetFile if there were * no commonalities between the base and the target * - * @author Curt Arnold */ public static String getRelativePath(final String base, final File targetFile) { try { diff --git a/src/main/java/net/sf/antcontrib/cpptasks/CompilerDef.java b/src/main/java/net/sf/antcontrib/cpptasks/CompilerDef.java index aef1e32..313d3ac 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/CompilerDef.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/CompilerDef.java @@ -354,7 +354,7 @@ public final class CompilerDef extends ProcessorDef { * Enables or disables generation of multithreaded code. Unless specified, * multithreaded code generation is enabled. * - * @param multi + * @param multithreaded * If true, generated code may be multithreaded. */ public void setMultithreaded(boolean multithreaded) { diff --git a/src/main/java/net/sf/antcontrib/cpptasks/DependencyInfo.java b/src/main/java/net/sf/antcontrib/cpptasks/DependencyInfo.java index d29826f..a04105f 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/DependencyInfo.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/DependencyInfo.java @@ -57,7 +57,7 @@ public final class DependencyInfo { * Returns the latest modification date of the source or anything that it * depends on. * - * @returns the composite lastModified time, returns Long.MIN_VALUE if not + * @return the composite lastModified time, returns Long.MIN_VALUE if not * set */ public long getCompositeLastModified() { diff --git a/src/main/java/net/sf/antcontrib/cpptasks/DependencyTable.java b/src/main/java/net/sf/antcontrib/cpptasks/DependencyTable.java index 9e57eb1..48a7278 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/DependencyTable.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/DependencyTable.java @@ -160,7 +160,7 @@ public final class DependencyTable { /** * Visits the dependency info. * - * @returns true to continue towards recursion into included files + * @return true to continue towards recursion into included files */ public abstract boolean visit(DependencyInfo dependInfo); } @@ -240,8 +240,6 @@ public final class DependencyTable { * Creates a target history table from dependencies.xml in the prject * directory, if it exists. Otherwise, initializes the dependencies empty. * - * @param task - * task used for logging history load errors * @param baseDir * output directory for task */ diff --git a/src/main/java/net/sf/antcontrib/cpptasks/LinkerDef.java b/src/main/java/net/sf/antcontrib/cpptasks/LinkerDef.java index b2e39d7..cde8837 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/LinkerDef.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/LinkerDef.java @@ -292,7 +292,7 @@ public class LinkerDef extends ProcessorDef { /** * Sets the starting address. * - * @param name + * @param entry * function name */ public void setEntry(String entry) { diff --git a/src/main/java/net/sf/antcontrib/cpptasks/PrecompileDef.java b/src/main/java/net/sf/antcontrib/cpptasks/PrecompileDef.java index 4dd9831..b642197 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/PrecompileDef.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/PrecompileDef.java @@ -56,9 +56,6 @@ public final class PrecompileDef extends DataType { * Adds filesets that specify files that should not be processed with * precompiled headers enabled. * - * @param exceptSet - * FileSet specify files that should not be processed with - * precompiled headers enabled. */ public PrecompileExceptDef createExcept() { return new PrecompileExceptDef(this); diff --git a/src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java b/src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java index 864be59..54a3406 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java @@ -126,7 +126,7 @@ public abstract class ProcessorDef extends DataType { /** * Adds a <compilerarg>or <linkerarg> * - * @param arg + * @param param * command line argument, must not be null * @throws NullPointerException * if arg is null diff --git a/src/main/java/net/sf/antcontrib/cpptasks/VersionInfo.java b/src/main/java/net/sf/antcontrib/cpptasks/VersionInfo.java index 3e70707..92cfeb0 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/VersionInfo.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/VersionInfo.java @@ -210,8 +210,8 @@ public final class VersionInfo extends DataType { } /** - * Returns a VersionInfo that reflects the state of - * @return + * Returns a VersionInfo that reflects any inherited version information. + * @return merged version information. */ public VersionInfo merge() { if (isReference()) { diff --git a/src/main/java/net/sf/antcontrib/cpptasks/arm/ADSCCompiler.java b/src/main/java/net/sf/antcontrib/cpptasks/arm/ADSCCompiler.java index c7e12d5..11004ad 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/arm/ADSCCompiler.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/arm/ADSCCompiler.java @@ -112,11 +112,7 @@ public class ADSCCompiler extends CommandLineCCompiler { null, newEnvironment, env); } /** - * Adds command switches for generic configuration options - * - * @see net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler#addImpliedArgs(java.util.Vector, - * boolean, boolean, boolean, - * net.sf.antcontrib.cpptasks.compiler.LinkType) + * {@inheritDoc} */ protected void addImpliedArgs(Vector args, final boolean debug, diff --git a/src/main/java/net/sf/antcontrib/cpptasks/borland/BorlandLibrarian.java b/src/main/java/net/sf/antcontrib/cpptasks/borland/BorlandLibrarian.java index 75846a4..703ddd3 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/borland/BorlandLibrarian.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/borland/BorlandLibrarian.java @@ -60,12 +60,12 @@ public class BorlandLibrarian extends CommandLineLinker { protected void addEntry(String entry, Vector args) { } - protected String getCommandFileSwitch(String cmdFile) {
- //
- // tlib requires quotes around paths containing -
- // ilink32 doesn't like them
- StringBuffer buf = new StringBuffer("@");
- BorlandProcessor.quoteFile(buf, cmdFile);
+ protected String getCommandFileSwitch(String cmdFile) { + // + // tlib requires quotes around paths containing - + // ilink32 doesn't like them + StringBuffer buf = new StringBuffer("@"); + BorlandProcessor.quoteFile(buf, cmdFile); return buf.toString(); } public File[] getLibraryPath() { @@ -100,12 +100,12 @@ public class BorlandLibrarian extends CommandLineLinker { /** * Prepares argument list for exec command. * - * @param outputFile - * linker output file + * @param outputDir linker output directory + * @param outputName linker output name * @param sourceFiles * linker input files (.obj, .o, .res) - * @param args - * linker arguments + * @param config + * linker configuration * @return arguments for runTask */ protected String[] prepareArguments( @@ -182,8 +182,8 @@ public class BorlandLibrarian extends CommandLineLinker { protected String[] prepareResponseFile(File outputFile, String[] args) throws IOException { String[] cmdargs = BorlandProcessor.prepareResponseFile(outputFile, args, " & \n"); - cmdargs[cmdargs.length - 1] = getCommandFileSwitch(cmdargs[cmdargs.length -1]);
- return cmdargs;
+ cmdargs[cmdargs.length - 1] = getCommandFileSwitch(cmdargs[cmdargs.length -1]); + return cmdargs; } /** @@ -203,17 +203,17 @@ public class BorlandLibrarian extends CommandLineLinker { // build a new library super.link(task, outputFile, sourceFiles, config); } -
- /**
- * Encloses problematic file names within quotes.
- * @param buf string buffer
- * @param filename source file name
- * @returns filename potentially enclosed in quotes.
- */
- protected String quoteFilename(StringBuffer buf,String filename) {
- buf.setLength(0);
- BorlandProcessor.quoteFile(buf, filename);
- return buf.toString();
- }
+ + /** + * Encloses problematic file names within quotes. + * @param buf string buffer + * @param filename source file name + * @return filename potentially enclosed in quotes. + */ + protected String quoteFilename(StringBuffer buf,String filename) { + buf.setLength(0); + BorlandProcessor.quoteFile(buf, filename); + return buf.toString(); + } } diff --git a/src/main/java/net/sf/antcontrib/cpptasks/borland/BorlandLinker.java b/src/main/java/net/sf/antcontrib/cpptasks/borland/BorlandLinker.java index 315761f..6a28805 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/borland/BorlandLinker.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/borland/BorlandLinker.java @@ -136,12 +136,12 @@ public final class BorlandLinker extends CommandLineLinker { /** * Prepares argument list for exec command. * - * @param outputFile - * linker output file + * @param outputDir linker output directory + * @param outputName linker output name * @param sourceFiles * linker input files (.obj, .o, .res) - * @param args - * linker arguments + * @param config + * linker configuration * @return arguments for runTask */ protected String[] prepareArguments( @@ -277,7 +277,7 @@ public final class BorlandLinker extends CommandLineLinker { * @param versionInfo version information * @param linkType link type * @param isDebug true if debug build - * @param executableName name of generated executable + * @param outputFile name of generated executable * @param objDir directory for generated files * @param matcher bidded fileset */ diff --git a/src/main/java/net/sf/antcontrib/cpptasks/borland/BorlandProcessor.java b/src/main/java/net/sf/antcontrib/cpptasks/borland/BorlandProcessor.java index e0056c5..b14c854 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/borland/BorlandProcessor.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/borland/BorlandProcessor.java @@ -21,7 +21,7 @@ import java.io.FileReader; import java.io.IOException; import java.io.Reader; import java.util.Vector; -import java.io.FileWriter;
+import java.io.FileWriter; import net.sf.antcontrib.cpptasks.CUtil; import net.sf.antcontrib.cpptasks.types.LibraryTypeEnum; @@ -61,8 +61,8 @@ public final class BorlandProcessor { * Tool name, for example, "bcc32", "brc32", "ilink32" * @param switchChar * Command line switch character, for example "L" for libraries - * @param defaultRelativePaths - * default paths relative to executable directory + * @param defaultRelativePath + * default path relative to executable directory * @return path */ public static File[] getEnvironmentPath(String toolName, char switchChar, @@ -156,9 +156,9 @@ public final class BorlandProcessor { return false; } public static void quoteFile(StringBuffer buf, String outPath) { - if (outPath.charAt(0) != '\"'
- && (outPath.indexOf(' ') >= 0
- || outPath.indexOf('-') >= 0
+ if (outPath.charAt(0) != '\"' + && (outPath.indexOf(' ') >= 0 + || outPath.indexOf('-') >= 0 || outPath.indexOf('/') >= 0)) { buf.append('\"'); buf.append(outPath); @@ -207,8 +207,8 @@ public final class BorlandProcessor { } writer.close(); String[] execArgs = new String[2]; - execArgs[0] = args[0];
- //
+ execArgs[0] = args[0]; + // // left for the caller to decorate execArgs[1] = commandFile.toString(); return execArgs; diff --git a/src/main/java/net/sf/antcontrib/cpptasks/compiler/AbstractCompiler.java b/src/main/java/net/sf/antcontrib/cpptasks/compiler/AbstractCompiler.java index e61bd64..2d1401f 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/compiler/AbstractCompiler.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/compiler/AbstractCompiler.java @@ -129,7 +129,6 @@ public abstract class AbstractCompiler extends AbstractProcessor * used to distinguish DependencyInfo's from different include * path settings * - * @author Curt Arnold */ public final DependencyInfo parseIncludes(CCTask task, File source, File[] includePath, File[] sysIncludePath, File[] envIncludePath, diff --git a/src/main/java/net/sf/antcontrib/cpptasks/compiler/AbstractLinker.java b/src/main/java/net/sf/antcontrib/cpptasks/compiler/AbstractLinker.java index 9de9491..5d9cefa 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/compiler/AbstractLinker.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/compiler/AbstractLinker.java @@ -95,7 +95,7 @@ public abstract class AbstractLinker extends AbstractProcessor * @param versionInfo version information * @param linkType link type * @param isDebug true if debug build - * @param executableName name of generated executable + * @param outputFile name of generated executable * @param objDir directory for generated files * @param matcher bidded fileset */ diff --git a/src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineCompiler.java b/src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineCompiler.java index 58c5a6c..46ec59a 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineCompiler.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineCompiler.java @@ -73,9 +73,7 @@ public abstract class CommandLineCompiler extends AbstractCompiler { * include switches to that vector (for use in building a configuration * identifier that is consistent between machines). * - * @param baseDirPaths - * A vector containing the parts of the working directory, - * produced by CUtil.DecomposeFile. + * @param baseDirPath Base directory path. * @param includeDirs * Array of include directory paths * @param args @@ -131,7 +129,6 @@ public abstract class CommandLineCompiler extends AbstractCompiler { /** * Compiles a source file. * - * @author Curt Arnold */ public void compile(CCTask task, File outputDir, String[] sourceFiles, String[] args, String[] endArgs, boolean relentless, diff --git a/src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java b/src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java index f9e4761..86594fa 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java @@ -285,9 +285,10 @@ public abstract class CommandLineLinker extends AbstractLinker * Prepares argument list for exec command. Will return null * if command line would exceed allowable command line buffer. * + * @param task compilation task. * @param outputFile linker output file * @param sourceFiles linker input files (.obj, .o, .res) - * @param args linker arguments + * @param config linker configuration * @return arguments for runTask */ protected String[] prepareArguments( diff --git a/src/main/java/net/sf/antcontrib/cpptasks/compiler/LinkType.java b/src/main/java/net/sf/antcontrib/cpptasks/compiler/LinkType.java index 910c41a..70ee93f 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/compiler/LinkType.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/compiler/LinkType.java @@ -101,8 +101,7 @@ public class LinkType { /** * Sets the output type (execuable, shared, etc). * - * @param outputType, - * may not be null + * @param outputType may not be null */ public void setOutputType(OutputTypeEnum outputType) { if (outputType == null) { diff --git a/src/main/java/net/sf/antcontrib/cpptasks/compiler/Linker.java b/src/main/java/net/sf/antcontrib/cpptasks/compiler/Linker.java index 672a0e3..0638a70 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/compiler/Linker.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/compiler/Linker.java @@ -67,7 +67,7 @@ public interface Linker extends Processor { * @param versionInfo version information * @param linkType link type * @param isDebug true if debug build - * @param executableName name of generated executable + * @param outputFile name of generated executable * @param objDir directory for generated files * @param matcher bidded fileset */ diff --git a/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java b/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java index 940d8bc..75ddcc7 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java @@ -101,12 +101,12 @@ public abstract class AbstractLdLinker extends CommandLineLinker { LibrarySet set = libsets[i]; File libdir = set.getDir(null); String[] libs = set.getLibs(); - if (libdir != null) {
- String relPath = libdir.getAbsolutePath();
- File outputFile = task.getOutfile();
- if (outputFile != null && outputFile.getParentFile() != null) {
- relPath = CUtil.getRelativePath(
- outputFile.getParentFile().getAbsolutePath(), libdir);
+ if (libdir != null) { + String relPath = libdir.getAbsolutePath(); + File outputFile = task.getOutfile(); + if (outputFile != null && outputFile.getParentFile() != null) { + relPath = CUtil.getRelativePath( + outputFile.getParentFile().getAbsolutePath(), libdir); } if (set.getType() != null && "framework".equals(set.getType().getValue()) && @@ -272,8 +272,8 @@ public abstract class AbstractLdLinker extends CommandLineLinker { * linker output file * @param sourceFiles * linker input files (.obj, .o, .res) - * @param args - * linker arguments + * @param config + * linker configuration * @return arguments for runTask */ public String[] prepareArguments(CCTask task, String outputDir, diff --git a/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccProcessor.java b/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccProcessor.java index 058ef12..988848d 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccProcessor.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccProcessor.java @@ -117,7 +117,7 @@ public class GccProcessor { * -dumpversion. Attempts to use gcc -dumpspecs to provide this information * resulted in stalling on the Execute.run * - * @returns contents of the specs file + * @return contents of the specs file */ public static String[] getSpecs() { if (specs == null) { diff --git a/src/main/java/net/sf/antcontrib/cpptasks/gcc/cross/GccProcessor.java b/src/main/java/net/sf/antcontrib/cpptasks/gcc/cross/GccProcessor.java index 8e35995..728cd47 100755 --- a/src/main/java/net/sf/antcontrib/cpptasks/gcc/cross/GccProcessor.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/gcc/cross/GccProcessor.java @@ -106,7 +106,7 @@ public class GccProcessor { * -dumpversion. Attempts to use gcc -dumpspecs to provide this information * resulted in stalling on the Execute.run * - * @returns contents of the specs file + * @return contents of the specs file */ public static String[] getSpecs() { if (specs == null) { diff --git a/src/main/java/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccProcessor.java b/src/main/java/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccProcessor.java index 8a7a26e..bbcd13d 100755 --- a/src/main/java/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccProcessor.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccProcessor.java @@ -121,7 +121,7 @@ public class GccProcessor { * -dumpversion. Attempts to use gcc -dumpspecs to provide this information * resulted in stalling on the Execute.run * - * @returns contents of the specs file + * @return contents of the specs file */ public static String[] getSpecs() { if (specs == null) { |