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

Re: Burning svn revision into binaries

From: Vineet Kumar <vineet_at_doorstop.net>
Date: 2007-02-27 23:54:47 CET

* Justin Verity (jtverity@gmail.com) [070227 12:52]:
> I am trying to put the SVN revision # in my binaries
>
> In my Makefile I do this:
>
> SVNDEF := -D'SVN_REV="$(shell svnversion -n .)"'
> CFLAGS = @CFLAGS@ -pipe $(SVNDEF)
>
> And in my user code I do this:
>
> cout << "SVN Revision is " << SVN_REV << endl;
>
> But the output I get is:
>
> "SVN Revision is exported"

svnversion gives "exported" if it's run from a non-working-copy
directory. Are you sure you are running it from a working-copy
directory? Or does your build process use svn export instead of svn
checkout to fetch the source? Does "svnversion ." give you a rev number
when you run it manually?

Vineet

-- 
http://www.doorstop.net/
-- 
"Computer Science is no more about computers
than astronomy is about telescopes."  -- E.W. Dijkstra

Received on Tue Feb 27 23:55:11 2007

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.