tribble.build
Class MakeVersionInfo

java.lang.Object
  extended bytribble.build.MakeVersionInfo

public class MakeVersionInfo
extends java.lang.Object

Generates Java, C, or XML source code containing embedded build version information.

This program creates source code containing constants describing version information for another program. It is intended to be used as part of a makefile or batch script file used to combine one or more components into a single executable program or library. When the source code produced by this utility is compiled, the resulting executable object file can be combined with the other components of the target program or library.

The executable object file resulting from the compilation of the source code produced by this utility will contain embedded string constants, reflecting the version information specified by the command line options when this utility was run. The embedded strings can be displayed using an appropriate file searching utility, such as the what(1) and strings(1) programs of Unix.

The resulting Java executable .class file can also be run as a stand-alone program. If any options are specified on the command line, the embedded version information is displayed on the console; if no options are specified, an AWT GUI window is displayed containing the version information. The GUI can also be invoked if the .class file is contained within a jar file and the class is named as the Main-Class attribute in the manifest file of the jar file.

Usage

(See usage().)

Since:
2001-06-20
Version:
$Revision: 1.5 $ $Date: 2002/11/23 20:05:22 $
Author:
David R. Tribble, david@tribble.com.
Copyright 2001-2002 by David R. Tribble, all rights reserved.
Permission is granted to freely use and distribute this source code provided that the original copyright and authorship notices remain intact.
See Also:
AbstractVersion

Constructor Summary
MakeVersionInfo()
          Constructor.
 
Method Summary
static void main(java.lang.String[] args)
          Program driver for this class.
 void run(java.lang.String[] args)
          Run this program.
static void usage()
          Display a program usage message and punt.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MakeVersionInfo

public MakeVersionInfo()
Constructor.

Since:
1.1, 2001-07-20
Method Detail

main

public static void main(java.lang.String[] args)
Program driver for this class.

Usage

See usage().

Parameters:
args - The command line arguments.
Since:
1.1, 2001-07-20
See Also:
run(java.lang.String[])

usage

public static void usage()
Display a program usage message and punt.

Usage

Options:

-a name
Patch name or number (optional, no default).

-c name
Generated class name (default is #DFL_CLASS).

-n name
Component name (required).

-p name
Package name of the component.

-sa
Generate a stand-alone class that does not extend class AbstractVersion.

-t lang
Generated source language type, where lang is one of:
C
Java
XML

-v R.L
Component version number, consisting of a major number (R) and a minor number (L).

Since:
1.1, 2001-07-20

run

public void run(java.lang.String[] args)
Run this program.

Parameters:
args - The command line arguments.
Since:
1.1, 2001-07-20