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

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

From: Pedro Zorzenon Neto <pzn_at_terra.com.br>
Date: 2006-02-20 00:04:59 CET

Hi,

  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);

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Feb 20 12:12:21 2006

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