[m-rev.] for review: record the git revision the Mercury compiler was compiled with

Sebastian Godelet sebastian.godelet at outlook.com
Fri Apr 17 11:16:39 AEST 2015


Hi Paul,

On 16/04/2015 21:18, Paul Bone wrote:
> On Sat, Apr 04, 2015 at 01:24:57PM +0800, Sebastian Godelet wrote:
>> Hi,
>>
>> I think this functionality would be nice to have as I've seen it
>> already in some other tools which are configured and build from git
>> repositories.
>>
>> Sebastian.
>>
>
> Thanks for contributing this, I've wanted this feature myself for some time.
>
> The patch itself looks fine.  My question is how will this behave when
> someone builds the source distribution?
well I don't know that much about the source distribution process.
All I ever did with Mercury in that regard was to download a recent 
ROTD, compile that and bootstrap the git distribution with that.
Right now, with this patch, if you ./configure outside a git repository,
the git revision would have the value "unknown".
I could imagine some mechanism similar to the VERSION file can be used,
i.e. when the configure script can't figure out the revision value, then 
it reads in the value from a REVISION file or something like that.
Another possibility would be to create some option like ./configure 
--revision g2acde, but my autotools knowledge is rather limited.
Anyway, I'd really like to know how for example the ROTD tarballs are 
created, I guess that would help in implementing.
>
> Perhaps a better solution is to set the git revision at the time the source
> distribution was created, and have configure use that when it is invoked as
> part of the source distribution.  Are you up for implementing/testing this?
>
> Cheers.
>
>



More information about the reviews mailing list