Re: Question on multiple compiler environment



Janne Blomqvist wrote:
beliavsky@xxxxxxx wrote:
This method relies on my changing NVERSION manually and on saving old
source codes. I know there exist source control systems such as RCS,
but can one use them to automatically embed version information in an
executable?

In RCS/CVS, you have "variables" like "$Id$" which get expanded to
"$Id: filename revision author etc.$" when committing the file to the
repository. See the co(1) man page for the different keywords you can
use.

So just have something like

character(len=*) :: version = "$Id$"

in your source file.

I'm not sure if more modern version control systems like subversion
have similar keyword expansion features. Wouldn't surprise me.

Subversion also has this, but it has to be specifically enabled (usually on a per-file basis, though there may be ways to do it for the whole repository; I don't remember the details).

- Brooks


--
The "bmoses-nospam" address is valid; no unmunging needed.
.



Relevant Pages

  • Re: Source Code Control
    ... I sit here wondering if all this Anti VSS propaganda out there is due to a ... cons of various source control systems (settling on ... ... Subversion repo is not fully consistent, it must mean your hardware is ... a BDB-based repository would become locked (but not ...
    (comp.arch.embedded)
  • Re: Why SVN?
    ... > think you have a great reason to feel strongly about using Subversion. ... control systems to be very fragile in that entire branches can go away ... proponents of DDSCM in the first place. ...
    (comp.lang.ruby)
  • Re: To diff or not to diff
    ... I don't know what revision control systems you looked at, ... They also use a central repository and require the ... Changesets that you record into your ...
    (comp.lang.lisp)
  • Re: [Fedora] Re: Semi OT: Subversion
    ... That's not possible with most version control systems. ... You don't want everyone to be able to mess with production code. ... Everyone makes changes in their own workspace and a commit becomes a new revision. ... each stage checks out their own appropriate revision or tagged copy based on the workflow regardless of what else is happening in the repository. ...
    (Fedora)
  • Re: [Fedora] Re: Semi OT: Subversion
    ... You don't want everyone to be able to mess with production code. ... Everyone makes changes in their own workspace and a commit becomes a new revision. ... each stage checks out their own appropriate revision or tagged copy based on the workflow regardless of what else is happening in the repository. ... With revision control systems, you always have access to all versions and the ability to see the differences between them and who made the changes. ...
    (Fedora)