OOMMF Home next up previous index
Next: Problem Specification File Formats Up: Command Line Utilities Previous: OOMMF and Process ID


Platform-Independent Make: pimake

The application pimake is used to construct OOMMF end-user executables (and optionally documentation) from the distributed source code. It is similar in operation to the Unix utility program make, but it is written entirely in Tcl so that it will run anywhere Tcl is installed. Like make, pimake controls the building of a target from other files. Just as make is controlled by rules in files named Makefile or makefile, pimake is controlled by rules in files named makerules.tcl. pimake generally operates recursively, starting in the current working directory and continuing downward through all subdirectories. (The chief exception to this is the documentation under oommf/doc; pimake build requests started in the root directory oommf ignore the oommf/doc subdirectory. Building the OOMMF documentation requires a working installation of LATEX and either LATEX2HTML or , so OOMMF distributions include pre-built versions of the full OOMMF documentation to relieve the end-user the burden of installing those tools. On the other hand, clean requests, including in particular maintainer-clean, will recurse into oommf/doc.) The OOMMF standard command line option -cwd may be used to change the starting directory.

Launching
The pimake launch command is:

tclsh oommf.tcl pimake [standard options] \
   [-d] [-i] [-k] [-out file] [-root] [target]
where
-d
Print verbose information about dependencies.
-i
Normally an error halts operation. When -i is specified, ignore errors and try to continue updating all dependencies of target.
-k
Normally an error halts operation. When -k is specified, and an error is encountered, stop processing dependencies which depend on the error, but continue updating other dependencies of target.
-out file
Write informational output to named file instead of to the standard output.
-root
Change to the OOMMF root directory. Command line options are processed from left to right, so if used in conjunction with the standard option -cwd, -root should come first.
target
The file to build. May also be (and usually is) a symbolic target name. See below for standard symbolic targets. By default, the first target in makerules.tcl is built.

There are several targets which may be used as arguments to pimake to achieve different tasks. Each target builds in the current directory and all subdirectories. The standard targets are:

upgrade
Used immediately after unpacking a distribution, it removes any files which were part of a previous release, but are not part of the unpacked distribution.
all
Creates all files created by the configure target (see below). Compiles and links all the executables and libraries. Constructs all index files.
configure
Creates subdirectories with the same name as the platform type. Constructs a ocport.h file which includes C++ header information specific to the platform.
objclean
Removes the intermediate object files created by the compile and link steps. Leaves working executables in place. Leaves OOMMF in the state of its distribution with pre-compiled executables.
clean
Removes the files removed by the objclean target. Also removes the executables and libraries created by the all target. Leaves the files generated by the configure target.
distclean
Removes the files removed by the clean target. Also removes all files and directories generated by configure target. Leaves only the files which are part of the source code distribution.
maintainer-clean
Remove all files which can possibly be generated from other files. If run from the OOMMF root directory then all such files, including OOMMF documentation files, will be deleted. Rebuilding may require specialized developer tools, so use with care. This target is intended primarily for developers, not end-users.
help
Print a summary of the standard targets.


OOMMF Home next up previous index

OOMMF Documentation Team
September 30, 2022