Prime Mover 0.1 review

Download
by rbytes.net on

Prime Mover is a build tool, not unlike make

License: MIT/X Consortium License
File size: 0K
Developer: David Given
0 stars award from rbytes.net

Prime Mover is a build tool, not unlike make. It is designed to be small, portable, flexible, powerful, and is very easy to deploy.

Prime Mover can be distributed along with your application source code and does not require your end user to have anything other than a basic C compiler in order to use it.

Here are some key features of "Prime Mover":
Automatic dependency checking for C-like files
Explicit dependency graphs
Arbitrarily complex rules (it's possible to clearly represent far more complex dependency graphs in pm than you can in make)
Can handle multiple directories at the same time (no more recursive makefiles!)
Highly scalable (pm can deal with very large builds as easily as very small ones)
Easy cross-compilation (object files are stored in pm's own object file cache, not in your build tree, so you don't have to worry about distinguishing them)
Build multiple versions of the same application (pm remembers the compiler options used to build every file, and can tell different versions of the same object file apart)
Easy deployment (all of pm's core code consists of exactly file, which can be run on nearly any platform --- no installation or compilation needed!)
Object oriented design (making it very easy to create your own rules by specialising one of the existing ones)
A true programming language (if you need it, all the power of the Lua programming language is at your fingertips)

pm differs from make primarily in that all dependencies in pm are explicit. make will attempt to determine what needs to be done to build a file, based on a set of rules that tell it how to transform file types. This works well until you need to have different rules apply to two files of the same type... which then causes make to quickly become unmanageable.

pm avoids this by requiring all rules to be explicit. Thanks to the power of syntactic sugar, it is much less work than it sounds, never fear.

The best explanation is an example, and so here is an example pmfile that will build a simple C program:

-- load the C rules
include "c.pm"

-- default target builds a C program
default = cprogram {
-- cfile transforms a C source file into an object file
cfile "main.c",
cfile "utils.c",
cfile "aux.c",

-- once built, this makes the result available
install = pm.install("myprogram")
}

If this is saved as "pmfile" in the current directory, it can be invoked by simply doing:

./pm

...and it will run.

Prime Mover 0.1 keywords