kspalaiologos / bzip3

A better and stronger spiritual successor to BZip2.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

where does the definition of the VERSION macro variable come from?

niXman opened this issue · comments

hi,

usually such a definitions comes from a some common header file or from a config.h generated by configure script, but I checked the sources and did not find that definition.
moreover, I did not find the inclusion of the config.h file, and even more so configure does not generate such a file =)

best!

When ./configure runs it executes a helper script (located in build-aux/git-version-gen that generates the necessary info to stuff in VERSION. If the source is a git clone it is based on the current Git status. If the source code is downloaded from the source tarball releases the version information is backed into the source tarball via a file .tarball-version.

For both source types (Git clone or tallball) you can see at the top of configure.ac how it is generated (the same command works for both) and can run the same command yourself on any source to get the expected VERSION string:

$ ./build-aux/git-version-gen .tarball-version
1.1.5.r3-gfe48bc8

BTW if you download a GitHub generated source archive (which is neither a Git clone with metadata nor the source tarball we release and attach to releases) then you'll have to fake this information. Just create a file .tarball-version and stuff a string in there to fake it and the autotools build should find it.

got it, thanks!