[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: Phillip Susi <psusi_at_cfl.rr.com>
Date: 2007-02-27 21:26:16 CET

Justin Verity wrote:
> 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"
>
> Can anyone help?

I think you put your backticks in the wrong place, causing the shell to
see "SVN_REV=####" which results in it setting that variable and
printing "exported". Try:

SVNDEF := -DSVN_REV='svnversion -n .'

Or it might have been:

SVNDEF := -DSVN_REV=$(shell svnversion -n .)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Feb 27 21:27:04 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.