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

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

From: Christopher Ness <chris_at_nesser.org>
Date: 2005-06-29 17:10:44 CEST

On Wed, 2005-06-29 at 11:51 +0200, Robert Schneider wrote:
> > aboutbox.o: aboutbox.c
> > cc -DREVISION=$(shell svn info . | awk ' /^Revision:/ { print $2 } '
> > -c -o aboutbox.o aboutbox.c
> Hard for me to interpret this since I'm a (just ;-) developer
> using windows. And I'm also not familiar with make, ant and
> so on. I am just on the way to establish a build process.

Make is the tool used for most Unix like build processes.

> Does this mean that you are building with your working copy?

Yes, how else would you build a project? I suppose you could export the
code, but then you loose the opportunity to see revision information.

> Why don't you use svnversion (.exe in windows)?

That is an excellent idea!

> Is aboutbox.c under version control what means that after
> building the file has got a changed state which you have to revert?

In this case yes. The aboutbox.c file has changed, and you probably do
*not* want that to happen (imagine a developer committing the changed
file - ew!).
Depending on the language your project is using you may want to have a
file that is _not_ under revision control that is created by your build
process and included into the aboutbox.c file so that it is not modified
during the build. Therefore `svn status` will not know anything about
the new file and will ignore it instead of seeing modified source files.

This FAQ may help:

It creates a C file with an interface to return the version string. You
could also create a header file with a #define in it, or whatever your
language needs.

The summary is that you should use your build system to leverage the
information stored in the subversion working copy.


Wireless Group,
McMaster University
11:02:24 up 2 days, 26 min, 1 user, load average: 0.11, 0.07, 0.03
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jun 29 17:49:13 2005

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