From: Mark M. <mie...@gm...> - 2007-08-06 20:48:22
|
This is a topic we had quite some time ago, that I should have brought up before. Rony wrote: On 6/7/07, David Ashley <da...@us...> wrote: Also, in this context: would it be possible to automatically include the revision number in the output of "rexx -v" ? This would be important, if there are different versions of interim builds and there is a bug/error to pinpoint to the exact revision. ---rony This is harder to do than it first appears. It does no good to put the revision number on an install file because that number still does not appear within the build itself i.e. running rexx -v would not tell you the build number. Actually, this is pretty easy to do with the *nix builds, but the Windows build is a whole other problem because we have no automated tools to update the source code during a build to place the build number in the code where it can be used during the compile/link process. Maybe Mark might have some suggestions on this topic. -- David In my working copy I have the code in makeorx.bat to extract the current SVN revision number. The question is what to do with it. In my private builds and the builds I've been doing for Rony I have been making it the fourth part of the version string. So that 3.2.0 becomes 3.2.0.652. In order to get the SVN revision number into a place that it can be used by the compiler and other build tools I do this: Read: oorexx.ver and then rewrite it to a file: oorexx.ver.incl replacing the line: ORX_BLD_LVL=1 with: ORX_BLD_LVL=652 Then in lib\orxwin32.mak I include oorexx.ver.incl instead of oorexx.ver. I think this is the right way to do it, oorexx.ver remains under version control and is changed infrequently. oorexx.ver.incl is not under version control, it is a generated file, because it constantly changes. The same technique could be used in the Unix builds where it is even easier to rewrite a file. So, that solves the problem of getting the revision number in an usable form - back to the question of where to put it? I like adding it to the version string and in my working copy I have updated all the Windows code to use it everywhere that 3.2.0 is used, including places like the VERSION number for the DLLs. C:\work.ooRexx\3.x\wc\interpreter>rexx -v Open Object Rexx Interpreter Version 3.2.0.652 Build date: Aug 6 2007 Copyright (c) IBM Corporation 1995, 2004. Copyright (c) RexxLA 2005-2007. All Rights Reserved. ... We just need a consensus on where the SVN revision number should go. -- Mark Miesfeld |