|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cpmake.CPMake
General Comments
Field Summary | |
static int |
INCLUDE_PATH
Use with createFileList. |
static int |
RECURSE
Use with createFileList. |
static int |
RELATIVE_PATH
Use with createFileList and in conjunction with INCLUDE_PATH. |
Constructor Summary | |
CPMake(CPMake make,
java.lang.String buildFile,
java.lang.String primaryTarget)
Creates a CPMake object. |
|
CPMake(java.lang.String buildFile,
java.lang.String primaryTarget)
Creaes a CPMake object. |
Method Summary | |
void |
addClassPath(java.lang.String path)
|
void |
addSearchPath(java.lang.String path)
Adds a path to search when looking for targets. |
void |
addSearchPath(java.lang.String pattern,
java.lang.String path)
Adds a path to search when looking for targets that match the given pattern. |
void |
addSearchPaths(java.lang.String[] paths)
Adds search paths to look in when trying to find files. |
void |
addSearchPaths(java.lang.String pattern,
java.lang.String[] paths)
Adss paths to search when looking for targets that match the given pattern |
static java.lang.String |
arrayToString(java.lang.String[] array)
Converts an array into a string seperated by spaces. |
void |
autoClean()
Automatically cleans the build area by removing targets that are specified in the build file. |
void |
buildTarget(java.lang.String target)
Processes the rule for the given target. |
void |
buildTarget(java.lang.String target,
boolean prep)
Processes the rule for the given target. |
void |
clearMakeRules()
Clears all rules and dependencies. |
static java.lang.String[] |
combine(java.lang.String[] arr1,
java.lang.String[] arr2)
Combines two String arrays into one. |
void |
copy(java.lang.String source,
java.lang.String dest)
Performs a file copy. |
void |
copy(java.lang.String sourceDir,
java.lang.String filePattern,
java.lang.String dest)
Copies all files in the source directory that match the file pattern to the destination directory. |
int |
copyIfNewer(java.lang.String[] fileList,
java.lang.String dest)
Copies a list of files to the destination directory. |
boolean |
copyIfNewer(java.lang.String source,
java.lang.String dest)
Performes a file copy if the source is newer then the destination |
int |
copyIfNewer(java.lang.String sourceDir,
java.lang.String[] fileList,
java.lang.String dest)
Copies files specified in fileList parameter from the source directory to the destination directory. |
int |
copyIfNewer(java.lang.String sourceDir,
java.lang.String filePattern,
java.lang.String dest)
Copies all files in the source directory that match the file pattern to the destination directory if they are newer. |
void |
createCopyRule(java.lang.String ruleName,
java.lang.String[] prerequisites,
java.lang.String[] sourceList,
java.lang.String destDir)
Creates a copy rule. |
void |
createCopyRule(java.lang.String ruleName,
java.lang.String[] prerequisites,
java.lang.String[] sourceList,
java.lang.String destDir,
java.lang.String message)
Creates a copy rule. |
void |
createCopyRule(java.lang.String ruleName,
java.lang.String[] prerequisites,
java.lang.String sourceDir,
java.lang.String filePattern,
java.lang.String destDir)
Creates a copy rule. |
void |
createCopyRule(java.lang.String ruleName,
java.lang.String[] prerequisites,
java.lang.String sourceDir,
java.lang.String filePattern,
java.lang.String destDir,
java.lang.String message)
Creates a copy rule. |
void |
createDirectoryRule(java.lang.String directory,
java.lang.String[] prerequisites,
boolean echo)
Creates a rule where the target is adirectory that needs to be created. |
void |
createExplicitDependency(java.lang.String target,
java.lang.String prerequisites)
Creates dependecies for the given target. |
void |
createExplicitDependency(java.lang.String target,
java.lang.String[] prerequisites)
Creates dependecies for the given target. |
void |
createExplicitRule(java.lang.String target,
java.lang.String[] prerequisites,
java.lang.String scriptCall,
boolean verify)
Creates an explicit rule for building a target. |
void |
createExplicitRule(java.lang.String target,
java.lang.String prerequisites,
java.lang.String scriptCall,
boolean verify)
Creates an explicit rule for building a target. |
java.lang.String[] |
createFileList(java.lang.String rootDirectory,
java.lang.String regexFilePattern)
This calls createFileList(String, String, int) but with 0 as the flags. |
java.lang.String[] |
createFileList(java.lang.String rootDirectory,
java.lang.String regexFilePattern,
boolean recurse,
boolean filePath)
Deprecated. |
java.lang.String[] |
createFileList(java.lang.String rootDirectory,
java.lang.String regexFilePattern,
int flags)
Creates a list of files in rootDirectory that match the pattern denoted by regexFilePattern. |
java.lang.String[] |
createFileList(java.lang.String rootDirectory,
java.lang.String regexFilePattern,
java.lang.String[] excludeList,
int flags)
Creates a list of files that matche the given regular expression. |
java.lang.String[] |
createFileList(java.lang.String rootDirectory,
java.lang.String regexFilePattern,
java.lang.String[] excludeList,
java.lang.String excludePattern,
int flags)
Creates a list of files that matche the given regular expression. |
java.lang.String[] |
createFileList(java.lang.String rootDirectory,
java.lang.String regexFilePattern,
java.lang.String excludePattern,
int flags)
Creates a list of files that matche the given regular expression. |
void |
createPatternDependency(java.lang.String pattern,
java.lang.String replacement)
Creates a pattern dependency. |
void |
createPatternDependency(java.lang.String pattern,
java.lang.String[] prerequisites)
Creates a pattern dependency Calling this is the same as calling createPatternDependency(String, String) over and over for each string in the prerequisite array. |
void |
createPatternRule(java.lang.String pattern,
java.lang.String replacement,
java.lang.String scriptCall,
boolean verify)
Creates a pattern rule for building a target. |
void |
createPhonyRule(java.lang.String target,
java.lang.String[] prerequisites,
java.lang.String scriptCall)
Creates a phony target rule. |
void |
createPhonyRule(java.lang.String target,
java.lang.String prerequisites,
java.lang.String scriptCall)
Creates a phony target rule. |
void |
createRecursiveCopyRule(java.lang.String ruleName,
java.lang.String[] prerequisites,
java.lang.String sourceDir,
java.lang.String filePattern,
java.lang.String destDir)
Creates a copy rule. |
void |
createRecursiveCopyRule(java.lang.String ruleName,
java.lang.String[] prerequisites,
java.lang.String sourceDir,
java.lang.String filePattern,
java.lang.String destDir,
java.lang.String message)
Creates a copy rule. |
static void |
debugPrint(java.lang.String msg)
|
void |
del(java.lang.String file)
Added for use in Rhino script |
void |
delete(java.lang.String file)
Deletes a file |
void |
deltree(java.lang.String directory)
Deletes the entire sub tree including the directory. |
void |
exec(java.lang.String cmd)
Executes a command and waits until it is finnished. |
void |
exec(java.lang.String[] cmd)
Executes a command and waits until it is finnished. |
void |
exec(java.lang.String[] cmd,
boolean exitOnError)
Executes a command and waits until it is finnished. |
void |
exec(java.lang.String[] cmd,
boolean exitOnError,
java.lang.String logFile)
Executes a command and waits until it is finnished. |
void |
exec(java.lang.String[] cmd,
java.lang.String logFile)
Executes a command and waits until it is finnished. |
void |
exec(java.lang.String cmd,
boolean exitOnError)
Executes a command and waits until it is finnished. |
void |
exec(java.lang.String cmd,
boolean exitOnError,
java.lang.String logFile)
Executes a command and waits until it is finnished. |
void |
exec(java.lang.String cmd,
java.lang.String logFile)
Executes a command and waits until it is finnished. |
void |
exec(java.lang.String cwd,
java.lang.String[] cmd,
boolean exitOnError)
Executes a command and waits until it is finnished. |
void |
exec(java.lang.String cwd,
java.lang.String[] cmdArr,
boolean exitOnError,
java.lang.String logFile,
java.lang.String redirect)
Executes a command and waits until it is finnished. |
void |
exec(java.lang.String cwd,
java.lang.String cmd,
boolean exitOnError)
Executes a command and waits until it is finnished. |
void |
exec(java.lang.String cwd,
java.lang.String cmd,
boolean exitOnError,
java.lang.String logFile,
java.lang.String redirect)
Executes a command and waits until it is finnished. |
static java.lang.String |
fixPath(java.lang.String path)
Fixes the directory seperators for the current platform. |
static java.lang.String[] |
fixPath(java.lang.String[] paths)
Fixes the directory seperators for the current platform. |
java.lang.String |
fullPath(java.lang.String relPath)
Returns the absolute path from a relative path |
java.lang.String |
getPrimaryTarget()
Returns the primary build target. |
java.util.Properties |
getProperties()
Returns the CPMake properites object. |
java.lang.String |
getProperty(java.lang.String name)
Gets a property from CPMake. |
java.lang.String |
getProperty(java.lang.String name,
java.lang.String def)
Gets a property from CPMake. |
int |
getThreadCount()
Reutrns the number of threads to be used when processing the build queue |
static GrepResult |
grep(java.lang.String file,
java.lang.String regexPattern)
This function will search the input file for lines that match the given regular expression. |
void |
include(java.lang.String fileName)
Includes an additional script file that has a rule to generate it. |
java.io.File |
locateFile(java.lang.String file)
Tries to locate a file by looking in the search paths. |
static void |
main(java.lang.String[] args)
Creates an instance of CPMake and process the targets on the command line. |
void |
mkdir(java.lang.String directory)
Creates a directory |
void |
processBuildFile()
Processes the build file and builds the primary target. |
void |
processMakeDependencyFile(java.lang.String file,
boolean create,
boolean soft)
Reads a GNU make file and addes the dependencies to the build. |
void |
processMakeDependencyFiles(java.lang.String[] files,
boolean create,
boolean soft)
Reads a list of GNU style dependency files and adds them to the CPMake dependency list. |
void |
setDefaultTarget(java.lang.String target)
Sets the target that will be build if none is specified on the command line. |
void |
setObject(java.lang.String name,
java.lang.Object obj)
Sets variables in script namespace. |
void |
setProperty(java.lang.String name,
java.lang.String value)
Sets properties for this instance of CPMake |
void |
setThreadCount(int threadCount)
Sets the number of threads to be used when processing the build queue. |
void |
setVerbose(boolean verbose)
Tells CPMake to echo out build information |
static java.lang.String[] |
substitute(java.lang.String srcPattern,
java.lang.String destPattern,
java.lang.String[] srcList)
Perform pattern substitution on the srcList String array. |
static void |
throwException(java.lang.String msg)
Throws and exception. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int RECURSE
public static final int INCLUDE_PATH
public static final int RELATIVE_PATH
Constructor Detail |
public CPMake(java.lang.String buildFile, java.lang.String primaryTarget)
buildFile
- Build file to process in order to build the primary
targetprimaryTarget
- After reading the build file this target will be passed
to buildTarget. If this is null the default target will be built if one is set
in the build file.public CPMake(CPMake make, java.lang.String buildFile, java.lang.String primaryTarget)
make
- CPMake object to inherit settings from.buildFile
- Build file to process in order to build the primary
targetprimaryTarget
- After reading the build file this target will be passed
to buildTarget. If this is null the default target will be built if one is set
in the build file.Method Detail |
public static void main(java.lang.String[] args)
Property files. CPMake loads properties from three locations and makes them
available to the script via the getProperty methods. First the system
properties are read. Second a cpmake.properties file is read if it exists.
Third an env.properties file is read if it exists. In order to gain access
to the environment variables the last properties file is used. To use this
file you will need to echo the environment to this file before calling CPMake.
An example of this would be to write a script as follows
(windows)
or
set > env.properties
java -jar cpmake.jar
(linux)
Then for neetness cpmake will delete the env.properties file when it is done.
env > env.properties
java -jar cpmake.jar
Properties that effect cpmake
(note the underscore versions are for linux envoronment variable compatibility)
cpmake.threadCount or cpmake_threadCount - Setting this property will tell
cpmake the number of threads to use while building a target.
public static void debugPrint(java.lang.String msg)
public void processBuildFile() throws cpmake.CPMakeException
cpmake.CPMakeException
public java.lang.String getPrimaryTarget()
public void createPatternRule(java.lang.String pattern, java.lang.String replacement, java.lang.String scriptCall, boolean verify)
Example:
createPatternRule("(.*)\.obj", "$1.cpp", "compile", true);
In this example to build any .obj file the corosponding .cpp file is
the prerequisite and the script method compile is called to build this
target. Also the target will be verified afterwards.
pattern
- Regex pattern of the targetreplacement
- Replacement string used to identify the prerequisite of
the target.scriptCall
- The name of the method in the make file to call in order
to process this rule.verify
- Verify the target after the script call is madepublic void createExplicitRule(java.lang.String target, java.lang.String prerequisites, java.lang.String scriptCall, boolean verify) throws cpmake.CPMakeException
The target can either be a file or a directory in the file system. This rule is excercised if any of the prerequisites are new then the target.
target
- The file or directory to create by this rule.prerequisites
- This can either be a single prerequisite or a list
that is sperated by spaces. Can be null.scriptCall
- The name of the method in the make file to call in order
to process this rule.verify
- Verify the target after the script call is made.
cpmake.CPMakeException
public void createExplicitRule(java.lang.String target, java.lang.String[] prerequisites, java.lang.String scriptCall, boolean verify) throws cpmake.CPMakeException
The target can either be a file or a directory in the file system. This rule is excercised if any of the prerequisites are new then the target.
target
- The file or directory to create by this rule.prerequisites
- An array of prerequisites for this target.scriptCall
- The name of the method in the make file to call in order
to process this rule.verify
- Verify the target after the script call is made.
cpmake.CPMakeException
public void createDirectoryRule(java.lang.String directory, java.lang.String[] prerequisites, boolean echo) throws cpmake.CPMakeException
directory
- Directory to create.prerequisites
- Any prerequisites to do before creating this directory.echo
- If true it prints a nice little message when it creates the directory.
cpmake.CPMakeException
public void createPhonyRule(java.lang.String target, java.lang.String prerequisites, java.lang.String scriptCall)
target
- Phony targetprerequisites
- A list of prerequisites that are sperated by spaces. Can
be null.scriptCall
- The name of the method in the make file to call in order
to process this rule.public void createPhonyRule(java.lang.String target, java.lang.String[] prerequisites, java.lang.String scriptCall)
target
- Phony targetprerequisites
- An array of prerequisites.scriptCall
- The name of the method in the make file to call in order
to process this rule.public void createCopyRule(java.lang.String ruleName, java.lang.String[] prerequisites, java.lang.String sourceDir, java.lang.String filePattern, java.lang.String destDir)
ruleName
- CopyRule rule name.prerequisites
- An array of targets that need to be taken care of before
running this rule.sourceDir
- Source directory of the copy.filePattern
- Regular expression for matching files to copy.destDir
- Destination directory of the copy.public void createCopyRule(java.lang.String ruleName, java.lang.String[] prerequisites, java.lang.String sourceDir, java.lang.String filePattern, java.lang.String destDir, java.lang.String message)
ruleName
- CopyRule rule name.prerequisites
- An array of targets that need to be taken care of before
running this rule.sourceDir
- Source directory of the copy.filePattern
- Regular expression for matching files to copy.destDir
- Destination directory of the copy.message
- Message to print while copyingpublic void createRecursiveCopyRule(java.lang.String ruleName, java.lang.String[] prerequisites, java.lang.String sourceDir, java.lang.String filePattern, java.lang.String destDir)
ruleName
- CopyRule rule name.prerequisites
- An array of targets that need to be taken care of before
running this rule.sourceDir
- Source directory of the copy.filePattern
- Regular expression for matching files to copy.destDir
- Destination directory of the copy.public void createRecursiveCopyRule(java.lang.String ruleName, java.lang.String[] prerequisites, java.lang.String sourceDir, java.lang.String filePattern, java.lang.String destDir, java.lang.String message)
ruleName
- CopyRule rule name.prerequisites
- An array of targets that need to be taken care of before
running this rule.sourceDir
- Source directory of the copy.filePattern
- Regular expression for matching files to copy.destDir
- Destination directory of the copy.message
- Message to print while copyingpublic void createCopyRule(java.lang.String ruleName, java.lang.String[] prerequisites, java.lang.String[] sourceList, java.lang.String destDir)
ruleName
- CopyRule rule name.prerequisites
- An array of targets that need to be taken care of before
running this rule.sourceList
- Source file list.destDir
- Destination directory of the copy.public void createCopyRule(java.lang.String ruleName, java.lang.String[] prerequisites, java.lang.String[] sourceList, java.lang.String destDir, java.lang.String message)
ruleName
- CopyRule rule name.prerequisites
- An array of targets that need to be taken care of before
running this rule.sourceList
- Source file list.destDir
- Destination directory of the copy.message
- Message to print while copyingpublic void createPatternDependency(java.lang.String pattern, java.lang.String replacement)
pattern
- Pattern of the target files to add dependencies to.replacement
- The dependency of the target. This can either be a
replacement pattern as the one in the example above or the name of a target.public void createPatternDependency(java.lang.String pattern, java.lang.String[] prerequisites)
pattern
- Pattern of the target files to add depenencies to.prerequisites
- List of dependencies to add to this pattern.public void createExplicitDependency(java.lang.String target, java.lang.String prerequisites)
target
- Target to add dependencies to.prerequisites
- A list of prerequisites seperated by spaces. Can be null.public void createExplicitDependency(java.lang.String target, java.lang.String[] prerequisites)
target
- Target to add dependencies to.prerequisites
- An array of prerequisites.public void buildTarget(java.lang.String target) throws cpmake.CPMakeException
This allows the script to set up any special varaibles for the target.
target
- Target to be built.
cpmake.CPMakeException
public void buildTarget(java.lang.String target, boolean prep) throws cpmake.CPMakeException
This allows the script to set up any special varaibles for the target.
target
- Target to be built.prep
- If true prepForTarget is called otherwise it is not
cpmake.CPMakeException
public static java.lang.String arrayToString(java.lang.String[] array)
{"foo", "bar"} would become "foo bar "
array
- Array to be turned into a string.public void addSearchPath(java.lang.String path)
path
- Path to search for targets and prerequisites.public void setVerbose(boolean verbose)
verbose
- Whether to be verbose or not.public void addSearchPath(java.lang.String pattern, java.lang.String path)
pattern
- File pattern (regex) for this search path.path
- Path to searchpublic void addSearchPaths(java.lang.String[] paths)
paths
- Array of file paths to searchpublic void addSearchPaths(java.lang.String pattern, java.lang.String[] paths)
pattern
- File pattern (regex) for this search path.paths
- Paths to searchpublic java.io.File locateFile(java.lang.String file)
file
- The file name to look for.
public static java.lang.String fixPath(java.lang.String path)
path
- Path to be checked for correct seperators
public static java.lang.String[] fixPath(java.lang.String[] paths)
paths
- Array of paths to be checked for correct seperators
public void setDefaultTarget(java.lang.String target)
target
- Target to be built.public int getThreadCount()
public void setThreadCount(int threadCount)
threadCount
- Number of threads to use.public void setProperty(java.lang.String name, java.lang.String value)
name
- Property name.value
- Value of the property.public java.lang.String getProperty(java.lang.String name, java.lang.String def)
name
- Name of the property to get.def
- Default value to return if no property is found.
public java.lang.String getProperty(java.lang.String name)
name
- Name of the property to get.
public java.util.Properties getProperties()
public void exec(java.lang.String cmd, java.lang.String logFile) throws cpmake.CPMakeException
cmd
- command line of the process to start.logFile
- Output is sent to this log file as well
cpmake.CPMakeException
public void exec(java.lang.String[] cmd, java.lang.String logFile) throws cpmake.CPMakeException
cmd
- command line of the process to start.logFile
- Output is sent to this log file as well
cpmake.CPMakeException
public void exec(java.lang.String cmd) throws cpmake.CPMakeException
cmd
- command line of the process to start.
cpmake.CPMakeException
public void exec(java.lang.String[] cmd) throws cpmake.CPMakeException
cmd
- command line of the process to start.
cpmake.CPMakeException
public void exec(java.lang.String cmd, boolean exitOnError, java.lang.String logFile) throws cpmake.CPMakeException
cmd
- command line of the process to start.exitOnError
- If the process reutrns an error the make will stop.logFile
- Output is sent to this log file as well
cpmake.CPMakeException
public void exec(java.lang.String[] cmd, boolean exitOnError, java.lang.String logFile) throws cpmake.CPMakeException
cmd
- command line of the process to start.exitOnError
- If the process reutrns an error the make will stop.logFile
- Output is sent to this log file as well
cpmake.CPMakeException
public void exec(java.lang.String cmd, boolean exitOnError) throws cpmake.CPMakeException
cmd
- command line of the process to start.exitOnError
- If the process reutrns an error the make will stop.
cpmake.CPMakeException
public void exec(java.lang.String[] cmd, boolean exitOnError) throws cpmake.CPMakeException
cmd
- command line of the process to start.exitOnError
- If the process reutrns an error the make will stop.
cpmake.CPMakeException
public void exec(java.lang.String cwd, java.lang.String cmd, boolean exitOnError) throws cpmake.CPMakeException
cwd
- Sets the current working directory of the process.cmd
- command line of the process to start.exitOnError
- If the process reutrns an error the make will stop.
cpmake.CPMakeException
public void exec(java.lang.String cwd, java.lang.String[] cmd, boolean exitOnError) throws cpmake.CPMakeException
cwd
- Sets the current working directory of the process.cmd
- command line of the process to start.exitOnError
- If the process reutrns an error the make will stop.
cpmake.CPMakeException
public void exec(java.lang.String cwd, java.lang.String cmd, boolean exitOnError, java.lang.String logFile, java.lang.String redirect) throws cpmake.CPMakeException
cwd
- Sets the current working directory of the process. My be null.cmd
- command line of the process to start.exitOnError
- If the process reutrns an error the make will stop.logFile
- Output is sent to this log file as well. May be null.redirect
- File to redirect output to. May be null.
cpmake.CPMakeException
public void exec(java.lang.String cwd, java.lang.String[] cmdArr, boolean exitOnError, java.lang.String logFile, java.lang.String redirect) throws cpmake.CPMakeException
cwd
- Sets the current working directory of the process. My be null.cmdArr
- command line of the process to start.exitOnError
- If the process reutrns an error the make will stop.logFile
- Output is sent to this log file as well. May be null.redirect
- File to redirect output to. May be null.
cpmake.CPMakeException
public java.lang.String[] createFileList(java.lang.String rootDirectory, java.lang.String regexFilePattern)
public java.lang.String[] createFileList(java.lang.String rootDirectory, java.lang.String regexFilePattern, boolean recurse, boolean filePath)
public java.lang.String[] createFileList(java.lang.String rootDirectory, java.lang.String regexFilePattern, java.lang.String[] excludeList, java.lang.String excludePattern, int flags)
rootDirectory
- Starting directory to begin search for files.regexFilePattern
- Regular expression pattern used to match files returned
from this call.excludeList
- List of files to exclude from the list. This list must match
the file name exactly in order for it to be excluded. If the flags specify to
include the path then this list must have the path as well.excludePattern
- Regular expression of files to exclude from the list.flags
- Flags can be any combination of RECURSE, INCLUDE_PATH or RELATIVE_PATH.public java.lang.String[] createFileList(java.lang.String rootDirectory, java.lang.String regexFilePattern, java.lang.String[] excludeList, int flags)
rootDirectory
- Starting directory to begin search for files.regexFilePattern
- Regular expression pattern used to match files returned
from this call.excludeList
- List of files to exclude from the list. This list must match
the file name exactly in order for it to be excluded. If the flags specify to
include the path then this list must have the path as well.flags
- Flags can be any combination of RECURSE, INCLUDE_PATH or RELATIVE_PATH.public java.lang.String[] createFileList(java.lang.String rootDirectory, java.lang.String regexFilePattern, java.lang.String excludePattern, int flags)
rootDirectory
- Starting directory to begin search for files.regexFilePattern
- Regular expression pattern used to match files returned
from this call.excludePattern
- Regular expression of files to exclude from the list.flags
- Flags can be any combination of RECURSE, INCLUDE_PATH or RELATIVE_PATH.public java.lang.String[] createFileList(java.lang.String rootDirectory, java.lang.String regexFilePattern, int flags)
rootDirectory
- Starting directory to begin search for files.regexFilePattern
- Regular expression pattern used to match files returned
from this call.flags
- Flags can be any combination of RECURSE, INCLUDE_PATH or RELATIVE_PATH.public void deltree(java.lang.String directory)
directory
- Directory you wish to delete.public void delete(java.lang.String file)
file
- File to delete.public void del(java.lang.String file)
file
- File to delete.public int copyIfNewer(java.lang.String sourceDir, java.lang.String filePattern, java.lang.String dest)
sourceDir
- Source directory.filePattern
- Regex file pattern.dest
- Destination directory to copy files to.public boolean copyIfNewer(java.lang.String source, java.lang.String dest)
source
- Source file to copydest
- Destination directory or file to copy to
public int copyIfNewer(java.lang.String sourceDir, java.lang.String[] fileList, java.lang.String dest)
sourceDir
- Source directoryfileList
- List of files to copy.dest
- Destination directory.public int copyIfNewer(java.lang.String[] fileList, java.lang.String dest)
fileList
- List of files to copydest
- Destination directory to copy files to.public void copy(java.lang.String sourceDir, java.lang.String filePattern, java.lang.String dest)
sourceDir
- Source directory.filePattern
- Regex file pattern.dest
- Destination directory to copy files to.public void copy(java.lang.String source, java.lang.String dest)
public void processMakeDependencyFiles(java.lang.String[] files, boolean create, boolean soft) throws cpmake.CPMakeException
files
- List of GNU style dependency files.create
- Attempst to create the file if it does not existsoft
- Tells CPMake that the dependencies in this file are to be
treated as soft meaning if the file does not exist do not try to build it.
cpmake.CPMakeException
public void processMakeDependencyFile(java.lang.String file, boolean create, boolean soft) throws cpmake.CPMakeException
file
- GNU make dependency file to includecreate
- Attempt to create the file if it does not existsoft
- Tells CPMake that the dependencies in this file are to be
treated as soft meaning if the file does not exist do not try to build it.
cpmake.CPMakeException
public void clearMakeRules()
public void include(java.lang.String fileName) throws cpmake.CPMakeException
fileName
- Name of the script file to include.
cpmake.CPMakeException
public static java.lang.String[] substitute(java.lang.String srcPattern, java.lang.String destPattern, java.lang.String[] srcList)
srcPattern
- Regular expression search pattern.destPattern
- Replacement pattern.srcList
- Array of strings to perform pattern substitution on.
public void mkdir(java.lang.String directory)
directory
- Directory to createpublic java.lang.String fullPath(java.lang.String relPath)
relPath
- Relative Path
public static void throwException(java.lang.String msg) throws cpmake.CPMakeException
cpmake.CPMakeException
public void autoClean() throws cpmake.CPMakeException
cpmake.CPMakeException
public static java.lang.String[] combine(java.lang.String[] arr1, java.lang.String[] arr2)
public void setObject(java.lang.String name, java.lang.Object obj)
public void addClassPath(java.lang.String path) throws cpmake.CPMakeException
cpmake.CPMakeException
public static GrepResult grep(java.lang.String file, java.lang.String regexPattern) throws cpmake.CPMakeException
file
- File to be searched.regexPattern
- Regular expression to be searched for.
cpmake.CPMakeException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |