At 11:10 -0800 11/9/01, David T Darnell wrote:
>Already asked everyone to start using this ($VERSION compiler directive).
That will work great if everyone remembers to do it, and if they continue
to remember to update the hard-coded version string every time they edit a
source file.
What I do in one of my development environments to solve this potential
problem is dynamically generate a new version string every time I compile.
Then I don't have to remember to do it manually. For my purposes a
date-stamped version string is adequate. I don't need a sequential number,
but this could be done, too, with a little more work. Here's a brief
outline of what I do:
First, I have a file called VERSION.PUB which contains simply
$version 'v7.02.09A'$
I modify this manually for each *major* version change.
Then in my source files I do
$include 'version.pub'$
That way if the build environment for a particular module happens not to
include the dynamic version string generation logic, there'll at least be a
basic version string included.
For most modules, however, it works like this: The environment for the
build jobs includes a logon udc which creates a date string CI variable in
AAMMDD format. (Today's date is A11109) The udc also reads the VERSION.PUB
file, extracts the version string, appends the date string, and prepends
the module name, space filled to 10 characters. Finally the new version
string is echoed back into a temporary include file and a file equation is
set:
:file version.pub=tempvers
Pascal/iX, when it reaches the $include...$ statement gets the new string
rather than the "real" one in the version.pub file. The output of MPE's
VERSION command for one of my programs looks like this:
:version dp.nmprg
VERSION C.60.01 Copyright (C) Hewlett-Packard 1987. All Rights Reserved.
DP.NMPRG.EXPDEV
SOM #1
@(#) HP30315 A.05.10 95/02/08 NRT0 Startup routine
dp v7.02.09A-beta.A11008
launch2x v7.02.09A-beta.A11003
mpecom v7.02.09A-beta.A10525
strout v7.02.09A-beta.A10711
getcfg v7.02.09A-beta.A11003
procutil v7.02.09A-beta.A11008
MAX STACK SIZE: 393216
...
I apologize if this is more information than you wanted, but I thought you
might find it useful.
Barry Lake [log in to unmask]
Allegro Consultants, Inc. http://www.nospam.allegro.com
(408)252-2330
-------------
Remove ".nospam" to create valid address.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|