octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding changeset ID to version number


From: John W. Eaton
Subject: Re: Adding changeset ID to version number
Date: Wed, 23 Dec 2015 16:30:04 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0

On 12/23/2015 03:00 PM, Avinoam wrote:
Hi,

I would like to add the changeset ID to the version number,
when I build the default branch. For example:

"GNU Octave, version 4.1.0+ changeset 7026da637999"

How can I do it automatically?

Actually adding it to the version number seems problematic, since the version number is stored in the configure.ac file. So the build process would have to modify that file and start the build again beginning with the bootstrap command.

If you just want the hg id to appear somewhere in the version message, then that seems easier. I guess if I wanted to do that, I'd modify the version.in.h file to have a line like

  #define OCTAVE_HG_ID %OCTAVE_HG_ID%

and then modify the commands that generate the version.h file to substitute a string containing the hg id or the empty string if it is not available.

If this info is not needed everywhere version.h is used then maybe it could go in a separate file to avoid causing lots of files to be recompiled unnecessarily.

If we want the hg id to appear in the version info for all builds, we could also have the dist target store the hg id in a file and grab the info from there. Some care might be needed to ensure that the right hg id is used.

Finally, the new OCTAVE_HG_ID macro would need to be added to the version info.

Anyway, something like this could work and it seems to me that it could be useful. Would you like to propose a patch?

jwe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]