[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Is there an ultimate solution for the build process/global revision number

From: Andreas Kostyrka <andreas_at_kostyrka.org>
Date: 2005-06-29 11:37:17 CEST

Well, I cannot help you with the MS side of things, but in the Unix/C-C++ World
this is easiy solved by a make rule like:

aboutbox.o: aboutbox.c
        cc -DREVISION=$(shell svn info . | awk ' /^Revision:/ { print $2 } ' -c -o aboutbox.o aboutbox.c

Problem solved :)

On Wed, Jun 29, 2005 at 09:08:08AM +0200, Robert Schneider wrote:
> (This is my very first posting to a mailing list. Hope it works.)
> Hi to everyone,
> I am still confused how to deal with a build process
> and the global revision numbers. I have had expected
> that this is standard problem with a standard
> solution. I guess every software developer must meet
> this problem, or not?
> What do I want:
> 1) A nice build process.
> 2) The revision number in an info or about box
> (what implicates that this number has to be included
> within the source code)
> Is this something special? I don't think so. The problem
> should be independent from the used programming language
> and the OS (I use VB6 and VB8 under Windows if anyone
> is interested...).
> So what is the BEST practice. Surely there a several
> Approaches but I would like to know the perfect one, if
> possible.
> Questions:
> Is it better to use svn-exported files for a build?
> It the use of the SubWCRev.exe a good idea or is it even
> necessary?
> If I have to use the working copy how can I avoid that
> the source file with the revision number gets a changed
> state so I have to revert that file?
> Can I cleanly separate the build process from subversion?
> Or does the use of subversion causes a special build
> process?
> So how does it look like, the perfect solution? Or are
> there only workarounds?
> If there is a standard solution this should be placed
> within the faq. If this is the solution:
> http://subversion.tigris.org/faq.html#version-value-in-source
> then I did not understand it. Would be nice to change it
> to a abstract description without the make example.
> Are there any plans to enhance subversion so that the
> svnversion command works also directly with the repository?
> I don't understand why it only works with working copy.
> I appreciate any help!
> Robert Schneider
> (from Austria)
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jun 29 11:40:14 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.