SourceForge has been redesigned. Learn more.
Close

Tree [702725] pm tip /
 History

Read Only access


File Date Author Commit
 build-tools 2011-08-27 David Given David Given [27150c] Fixed typo in previous checkin...
 examples 2006-10-12 dtrg dtrg [9380b3] Moved the sample pmfiles and their supporting s...
 lib 2007-04-30 dtrg dtrg [adc1d4] Fixed bug 1710252, which was resulting in dynam...
 lua 2009-02-28 dtrg dtrg [444a93] Applied tweak to allow pm to run on Interix.
 src 2011-08-27 David Given David Given [12872f] Bumped version number again.
 tests 2011-08-26 dtrg dtrg [76a739] Fix a test bug where files weren't getting clos...
 .hgtags 2011-08-27 David Given David Given [702725] Added tag release-0.1.6.2 for changeset 7ee072e...
 .project 2007-10-04 dtrg dtrg [30fd28] Added Eclipse project file.
 CHANGELOG 2011-08-27 David Given David Given [12872f] Bumped version number again.
 LICENSE 2010-03-12 dtrg dtrg [bcf4fb] Updated for version 0.1.5.
 README 2011-08-27 David Given David Given [12872f] Bumped version number again.
 build 2010-03-11 dtrg dtrg [3fe88b] Yet more bootstrap tweaking, this time to work ...
 mkdist 2011-08-27 David Given David Given [ce825e] Don't release .hg files.

Read Me

                             PRIME MOVER V0.1.6.2
                             ====================

                            (C) 2011 David Given
                                 2011-08-27


INTRODUCTION
============

Prime Mover (hereafter pm) is a build tool, similar to make, but (hopefully)
more flexible and considerably more powerful. It is based on the Lua scripting
language, but a knowledge of Lua is not required to use it.

For a full description, and for the documentation, see the Prime Mover website:

http://primemover.sourceforge.net

pm supports:

* Automatic dependency checking for C and C++ files
* Explicit dependency graphs
* Arbitrarily complex rules (because you can embed chunks of Lua script in
  your pmfiles to do anything you like)
* Can handle multiple directories at the same time (no more recursive
  makefiles!)
* Easy cross-compilation (object files are stored in pm's own object file
  cache, not in your build tree)
* Easy deployment (all of pm's core code consists of exactly *one* file, which
  can be run on 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)
  
pm's 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. This is much less work than it sounds,
never fear.

Here is an example pmfile that will build a simple C program:

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

default = cprogram {   -- default target builds a C program
  cfile "main.c",      -- cfile transforms a C source file into an object file
  cfile "utils.c",
  cfile "aux.c",
	
  install = pm.install("myprogram") -- once built, this makes the result available
}
---end---

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

  ./pm
  
...and it will build.


DOCUMENTATION & INSTRUCTIONS
============================

The full documentation for Prime Mover is far out of the scope of this
document. Instead, see the Prime Mover website:

http://primemover.sourceforge.net/manual/index.html

In particular, if you use Prime Mover, please join the mailing list. This will
allow you to ask questions, hopefully receive answers, and get news about any
new releases. You can subscribe or view the archives at the following page:

https://lists.sourceforge.net/lists/listinfo/primemover-users


CONTENTS
========

As a Prime Mover user, you will want to look at the following directories
in the distribution.

  - bin: contains the Prime Mover executables themselves.
  - lib: contains the standard plugins.
  - examples: contains some example pmfiles.
  - examples/source: source code used by the example pmfiles.
  
If you wish to modify Prime Mover itself, you'll also need to know about
these directories.

  - src: contains the Prime Mover source code itself.
  - lua: contains the Lua interpreter source code.
  - build-tools: contains some utilities used as part of the build process.
  - tests: the unit tests that are run during the build process.
  
  
WHY YOU DON'T NEED TO BUILD PRIME MOVER ITSELF
==============================================

Prime Mover is a cross platform application. As a result, the executables will
run anywhere. This means that I can supply working versions with this archive,
so that they can be used without needing to build them yourself. (This avoids
any painful bootstrapping issues.)

You can find the Prime Mover executables in the bin directory.


WHY YOU MAY NEED TO BUILD PRIME MOVER AFTER ALL
===============================================

However, if you wish to modify Prime Mover --- that is, the core application,
not the plugins --- you still need to know how to rebuild the Prime Mover
executable.

This is done using the 'build' script. This will rebuild all three
executables, and then automatically run the unit tests. In order to build
Prime Mover, you must have the following software available:

  - Lua 5.0 or 5.1
  - uuencode
  - the usual collection of Unix file and text utilities

    
ACKNOWLEDGEMENTS
================

The lua directory contains patched versions of:

 - Lua 5.0.2
 - lposix for Lua 5.0 by Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>

The build-tools directory contains (among other things written by me):

 - LuaSrcDiet by Kein-Hong Man <khman@users.sf.net> 

THE AUTHOR
==========

Prime Mover was written by me, David Given. You may contact me at
dg@cowlark.com, or visit my website at http://www.cowlark.com. There may or
may not be anything interesting there.


$Id$