vers_string.1   [plain text]


.TH VERS_STRING 1 "5 July 1987"
.SH NAME
vers_string \- produce version identification string
.SH SYNOPSIS
.B vers_string
[
.B \-[c | f | l]
] \fIPROGRAM\fR
.SH DESCRIPTION
.I Vers_string
outputs a string made up of the SGS version name, the current user's
login identifier, and the current time and date.
.I Vers_string
may only be used within an SGS project.
.PP
The output of vers_string has the following format:
.DS
\fBPROGRAM:\fIprog\fB  PROJECT:\fIproj&vers \fB DEVELOPER:\fIbob\fB  BUILT:\fIThu Dec 31 ...\fR
.DE
.I prog
is the command line argument \fIPROGRAM\fR, \fIproj&vers\fR is the
name of the SGS version root, and \fIbob\fR is the user who built this version.
.PP
If the
.I \-c
option is used, the output is formed as a C declaration for the
global character array
.IR SGS_VERS .
If the
.I \-l
option is used, the output is formed like the -c option, but
"PROGRAM" is replaced with "LIBRARY" and the declaration is static.
If the
.I \-f
option is used, the output is simply the program name and suffixed
with the current version number of the SGS version root.
.PP
.I Vers_string
is typically used within makefiles with a rule like:
.DS
vers.c: ${OBJS}
	vers_string -c ${PROGRAM} >vers.c
.DE