Class BorlandLibrarian
java.lang.Object
net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
net.sf.antcontrib.cpptasks.compiler.AbstractLinker
net.sf.antcontrib.cpptasks.compiler.CommandLineLinker
net.sf.antcontrib.cpptasks.borland.BorlandLibrarian
Adapter for the Borland(r) tlib Librarian
- Author:
- Curt Arnold
-
Field Summary
Fields inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
protected void
protected void
addImpliedArgs
(boolean debug, LinkType linkType, Vector args) protected void
addIncremental
(boolean incremental, Vector args) protected void
protected void
protected String
getCommandFileSwitch
(String cmdFile) Gets identifier for the linker.static BorlandLibrarian
File[]
returns the library path for the linkerString[]
getLibraryPatterns
(String[] libnames, LibraryTypeEnum libType) Returns a set of filename patterns corresponding to library names.Gets the linker for the specified link type.int
String[]
getOutputFileSwitch
(String outFile) boolean
Returns true if the linker is case-sensitivevoid
link
(CCTask task, File outputFile, String[] sourceFiles, CommandLineLinkerConfiguration config) Builds a libraryprotected String[]
prepareArguments
(CCTask task, String outputDir, String outputName, String[] sourceFiles, CommandLineLinkerConfiguration config) Prepares argument list for exec command.protected String[]
prepareResponseFile
(File outputFile, String[] args) Prepares argument list to execute the linker using a response file.protected String
quoteFilename
(StringBuffer buf, String filename) Encloses problematic file names within quotes.Methods inherited from class net.sf.antcontrib.cpptasks.compiler.CommandLineLinker
addLibrarySets, createConfiguration, decorateLinkerOption, getCommand, getLibtoolLinker, getOutputFileNames, getOutputFileSwitch, getStartupObject, prepareFilename, runCommand, setCommand
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractLinker
addVersionFiles, bid, changeEnvironment, createConfiguration, getLibraryKey
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
clone, getHeaderExtensions, getIdentifier, getOSArch, getOSName, getSourceExtensions, isDarwin, toString
-
Method Details
-
getInstance
-
addBase
- Specified by:
addBase
in classCommandLineLinker
-
addFixed
- Specified by:
addFixed
in classCommandLineLinker
-
addImpliedArgs
- Specified by:
addImpliedArgs
in classCommandLineLinker
-
addIncremental
- Specified by:
addIncremental
in classCommandLineLinker
-
addMap
- Specified by:
addMap
in classCommandLineLinker
-
addStack
- Specified by:
addStack
in classCommandLineLinker
-
addEntry
- Specified by:
addEntry
in classCommandLineLinker
-
getCommandFileSwitch
- Specified by:
getCommandFileSwitch
in classCommandLineLinker
-
getLibraryPath
Description copied from interface:Linker
returns the library path for the linker -
getLibraryPatterns
Description copied from interface:Linker
Returns a set of filename patterns corresponding to library names. For example, "advapi32" would be expanded to "advapi32.dll" by DevStudioLinker and to "libadvapi32.a" and "libadvapi32.so" by GccLinker.- Parameters:
libnames
- array of library names
-
getLinker
Description copied from interface:Linker
Gets the linker for the specified link type.- Returns:
- appropriate linker or null, will return this if this linker can handle the specified link type
-
getMaximumCommandLength
public int getMaximumCommandLength()- Specified by:
getMaximumCommandLength
in classCommandLineLinker
-
getOutputFileSwitch
- Specified by:
getOutputFileSwitch
in classCommandLineLinker
-
isCaseSensitive
public boolean isCaseSensitive()Description copied from interface:Linker
Returns true if the linker is case-sensitive -
getIdentifier
Gets identifier for the linker. TLIB will lockup when attempting to get version information. Since the Librarian version isn't critical just return a stock response.- Specified by:
getIdentifier
in interfaceProcessor
- Overrides:
getIdentifier
in classCommandLineLinker
-
prepareArguments
protected String[] prepareArguments(CCTask task, String outputDir, String outputName, String[] sourceFiles, CommandLineLinkerConfiguration config) Prepares argument list for exec command.- Overrides:
prepareArguments
in classCommandLineLinker
- Parameters:
outputDir
- linker output directoryoutputName
- linker output namesourceFiles
- linker input files (.obj, .o, .res)config
- linker configurationtask
- compilation task.- Returns:
- arguments for runTask
-
prepareResponseFile
Prepares argument list to execute the linker using a response file.- Overrides:
prepareResponseFile
in classCommandLineLinker
- Parameters:
outputFile
- linker output fileargs
- output of prepareArguments- Returns:
- arguments for runTask
- Throws:
IOException
-
link
public void link(CCTask task, File outputFile, String[] sourceFiles, CommandLineLinkerConfiguration config) throws org.apache.tools.ant.BuildException Builds a library- Overrides:
link
in classCommandLineLinker
- Throws:
org.apache.tools.ant.BuildException
-
quoteFilename
Encloses problematic file names within quotes.- Overrides:
quoteFilename
in classCommandLineLinker
- Parameters:
buf
- string bufferfilename
- source file name- Returns:
- filename potentially enclosed in quotes.
-