Nathan Hartman wrote on Tue, 19 Nov 2019 04:53 +00:00:
> Moving this from users@ to dev@...

[Aside: when doing this, it's a good to post a short response on users@
saying the conversation continues on dev@, for anyone who wants to
follow along but isn't subscribed to both lists.]

> On a somewhat related note (and at risk of blasphemy), if we want to
> provide a way for users to know what revision their svn install was
> built from, which would work for those who build from tarballs also,
> would it make sense to create a header file for this purpose, turn on
> svn:keywords for it, and put "$Revision: $" into a string

If we do this, we'll run into this issue:

http://subversion.apache.org/faq#version-value-in-source

tl;dr: Putting $Revision$ in a header file will expand to the last
changed revision of _that_ header file, not to the last changed revision
of anything in cwd.

The concept of having the binary know the `svnversion` info of the
working copy it was built from does make sense, however.  We could make
gen-make.py add «-DFOO=`svnversion`» to CFLAGS.  (There's already
something like that, «fakedefines», in the Windows-specific part of the
build generator.)

Cheers,

Daniel

Reply via email to