[crossfire] SVN revions in version

Alex Schultz alex_sch at telus.net
Sun Oct 15 23:48:37 CDT 2006


Mark Wedel wrote:
> It should actually get that version number from autoconf, like it does
> now.
> Then as part of that, for official releases, the -dev tag can be removed from 
> configure.ac
>   
I didn't know that autoconf currently stored that. That makes sense to me.

>   In addition, if the makefile doesn't find a .svn directory, or does not find 
> svnversion, it should create a svnversion.h file with an empty SVN_REV, eg:
>
> #define SVN_REV ""
>
>   To the best of my knowledge, there isn't really any way to include a file if 
> it exists, don't include it if it doesn't.  So it is just a lot simpler to 
> always include it.
>   
Agreed with the reason below, but the problem with that, is that
version.h shouldn't append "-r" unless it has a SVN_REV, and easier to
check in defines if SVN_REV is defined at all, instead of checking if
it's "" or not. Because of that, it seems like a better idea to me to
leave the SVN_REV check as I suggested, not include svnversion.h in SVN,
and make it just make an empty file if it doesn't have a revision.

>   You really don't want the svnversion.h file to be any part of SVN, because 
> otherwise people will accidentally check it in and now have a version number 
> that isn't correct.
>   
Agreed, though see above.

>> The
>> build process running svnversion because not all revisions require
>> ./configure to be re-run. Also, it will only write svnversion.h if a
>> check shows that it was checked out from official crossfire svn, this is
>> to ensure all revision numbers correspond to the same repository.
>>     
>
>   I think checking for official repository checkout is probably overkill and 
> isn't needed.  After all, if a developer really wants to have a bogus SVN_REV 
> number, there are a lot easier ways to do it.
>   
Well, I was more thinking of server admins accidentally doing that. Of
course, if they set up their own repositories, they should be competent
enough to either disable sending the revision or to make the base
version unique.

Alex Schultz



More information about the crossfire mailing list