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

Re: Add a note to FAQ about #version-value-in-source

From: <kfogel_at_collab.net>
Date: 2006-02-27 18:57:52 CET

Pedro Zorzenon Neto <pzn@terra.com.br> writes:
> About the topic:
> http://subversion.tigris.org/faq.html#version-value-in-source
>
> I have a better option instead of using makefile to create a
> svn_version.c file. Please put it in the FAQ if you think it will be
> useful for other users.
>
> Below are the instructions.
>
> Please CC me the answers, I'm not a subscriber of this list. I'm using
> svn for the 2nd day. It has many improvements compared to cvs.
>
> Thanks in advance,
> Pedro
>
>
> Put the following 2 lines in Makefile:
>
> SVNDEF = -D'SVN_REV="$(shell svnversion -n .)"'
> CFLAGS = $(SVNDEF) ... continue with your other flags ...
>
> To use it, in yourfile.c do something similar to the example below:
> printf("this program was compiled from SVN revision %s\n",SVN_REV);

Committed in r18636, thank you.

-Karl

-- 
www.collab.net  <>  CollabNet  |  Distributed Development On Demand
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Feb 27 21:20:04 2006

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

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