![]() |
OpenMake Meister |
Openmake.pm is a reusable Perl module that contains functions that are used by the Build Methods to pass information from the scripts to the compiler. When developing customized Build Methods, it is useful to borrow these common routines. Functions are organized as listed in Table RF-1
Table RF-1 Reusable Functions
Path Functions |
Provide convenient ways to search for files in the PATH.
|
|
This functions searches $MyUserPath for a file by the name of $MyFile. This process is useful for searching for an executable in a PATH statement. It can also be used to find any file in any path.
|
This function returns the location of where Ant is installed. | |
List Functions |
Provide an easy way to change list contents.
|
This function is a filter for lists. It simply returns a list without duplicates.
| |
This function filters out those items from a list that match the specified pattern.
| |
Compiler Flag Functions
|
Parse compiler flags from a string passed by om to the temporary scripts.
|
The function parses the debug or release compiler flags and compiler names. | |
This function verifies the existence of @possibleFlags within a $flagstring. The first flag matched is returned.
| |
This function is used with Ant Tasks Javac and Rmic to get the compiler name. Unlike 'GetCompiler', only the compiler name is returned, without the fully qualified path.
| |
This function returns the excluded file pattern and removes the exclude statement from the $Defines variable.
| |
File Copy & Directory Functions
|
Provide the ability to copy files that are needed to perform compiles and manipulate directories.
|
Creates a directory, including parent directories, if necessary.
| |
When a compiler cannot read source code in directories other than the Build Directory, this function copies the files to the local build directory. It keeps track of the files that are copied so they can be deleted when the script exits.
| |
This function copies files from any location to a specified directory. The "exclude" list of extensions is a list of patterns to match against the end of the full path.
| |
Java Related Functions |
Provide the ability to format file names into compatible JAVA format and to get the JAVA dependencies.
|
This function reads the .package file created by a Javac Task. | |
This function parses a list of files and returns the list of Java packages which the files correspond.
| |
This function reads the .package files created by all Java Tasks.
| |
This function reads the .classpath files created by the Set CLASSPATH Java Task.
| |
This function returns the list of all Class files and Java Packages generated by Java Compile and RMIC Tasks. These files are determined by reading .javac and .rmic files created by those Tasks. | |
This function gets the local classpath for that tool by concatenating all Jar files in the $HOME_ENV\lib directory. | |
Resolves all “Results From” Sub Task dependencies found in the Target Definition File for a given Sub Task extension. | |
Ant Build XML Functions |
Provide a wrapper to create the build.xml, which is used by Ant.
|
This functions generates the include XML tags for Ant, based on a list of files. | |
|
Writes the "build.xml" file for ant. |
Build Audit Report Creator Function |
Allow you to add the Build Audit reporting to your script.
|
|
This function generates the Build Audit for the specified Target.
|
Foot Print Creator Function |
Allow you to add Foot Printing to your script.
|
This function generates the footprinting source file for the specified target file. This source file is compiled and linked into the target.
| |
Cleanup Functions
|
These functions clean up variables and files, and set the return code for a point in the process when a script needs to exit.
|
This function is the standard exit function. This function deletes any work files and passes the return code back to om.
| |
Perl Objects |
Perl Objects are variables that contain both data and methods to act upon the data. |
|
This object contains convenience methods that are used to parse file names and return them in specific formats. This is useful in dealing with different compilers and operating systems where the file names need to be in a particular format.
|
This object contains convenience methods that are used to parse lists of file names and return them in specific formats. | |
|
This object contains functions that are called from a Build Method file and then used to print to standard output (STDOUT) and to create html logging. |
|
This object manages a Project's Dependency Directories. The Dependency Directory is independent of operating system. It provides functions to return the Dependency Directory in different formats.
|
|
This object contains common functions that are used to parse file paths and return them in specific formats. This process is useful in dealing with different compilers and operating systems where the file paths need to be in a particular format.
|
|
This object allows you to compare the content of a directory before and after a command has been issued. Comparison of the snapshots makes it possible to determine which files have been updated by a compiler.
|
|
This object contains methods to deal with the parsing of build options.
|