Building Votorola from Source

Unix is required. Only Linux has been tested, but most other versions of Unix should be okay.

  1. Ensure you have Perl 5:

    $ perl --version
  2. Change to the directory of your working copy:

    $ cd working-copy/

    (If you have no working copy, then make use of the release repository located at http://reluk.ca/var/db/repo/votorola/. Refer to the instructions at http://reluk.ca/w/Wiki:Revision_control_system.)

  3. Smoke test the build script:

    $ votorola/b/build --help

    If this is your first build, then it will fail with an error message. The exact fix depends on the error message. Either:

    1. Can't locate MODULE.pm in @INC...

      A Perl module is missing. Simply install the module, e.g. from CPAN.

    2. Unable to parse votorola/b/MODULE_config.pl: No such file or directory

      A configuration file is missing. Config.pm explains the reason and how to fix it.

    When all of the dependencies are in place, the command will run to completion and print a help message:

    Usage:
        votorola/b/build clean
    
        votorola/b/build argument*
    
        votorola/b/build --help | --man
    
    Arguments:
        clean   Deletes all build files.
    
        doc     Builds the documentation files. Almost all of the source is
                output, with only lightly filtering to exclude a few unwanted
                files.
    
        javadoc Builds the Java API docs.
    
        release Builds the whole of Votorola for release. This is the default.
                It is equivalent to 'build doc x javadoc'.
    
        x       Builds the executables.
    
    Options:
        --help  Outputs a brief help message and exits.
    
        --man   Outputs the full manual page and exits.
    
        --verbose
                Increases the level of console output.
  4. Build the code.

    $ votorola/b/build

    As in the previous step, it may fail if any dependencies are missing. Simply supply the missing dependencies and retry.

    Otherwise it simply prints out its progress:

      release
        doc
        x
          (compile 480...
          (jar files 1114...
        xgwt
          (compile
        javadoc
          (javadoc ...

    The code is now built to the out_dir() as defined in your Build_config.pl.

  5. Run the code by setting up a deployment area, except:

  6. During routine development and testing of code, you probably want to enable Java assertions and other checks. This means appending the following options to the 'java' launcher:

    -enableassertions:votorola... -Xfuture

    How exactly depends on the type of deployment you are testing.