|
From: Daniel J S. <dan...@ie...> - 2013-08-06 19:25:26
|
On 08/06/2013 01:39 PM, Ethan Merritt wrote:
> On Tuesday, August 06, 2013 10:25:33 am Daniel J Sebald wrote:
>> I just built the most recent version of gnuplot and noticed that the
>> "last modified" date in the intro refers back to 2012 and is manually
>> entered. Why can't that automatically be generated? It would be nice
>> to do this so that when one builds/installs the latest version, upon
>> launching the program it is immediate clear that the install process was
>> successful by looking at the "last modified" date.
>>
>> Here are some approaches that could be tried:
>>
>> 1) There is this configure.in file containing:
>>
>> dnl $Id: configure.in,v 1.332 2013/07/18 23:22:17 sfeam Exp $
>>
>> Is that file somehow generated by the CVS/repository to reflect the most
>> recent modification of the repository? If so, that would be great as it
>> would also contain a time stamp. Could write a script to search for
>> that and define LAST_MODIFIED in some header file using the extracted
>> "2013/07/18 23:22:17" string.
>>
>> 2) Is there some way during make to get the most recent date of all the
>> pertinent files? "make" does date checking, so perhaps there is a make
>> variable/macro that reflects that.
>>
>> 3) Similar to #2, we could maybe write an OS script that does the same
>> thing by looking for the date of the most recent file in the source tree.
>>
>> 4) Ethan keeps the ChangeLog up to date. It would be easy to search for
>> the most recent date near the top of the file and use that as a
>> definition for LAST_MODIFIED.
>
> The file .../src/Makefile.maint exists for exactly this purpose.
> It updates the version string based on the most recent date in ChangeLog.
> This file is included during "make" by gnu make.
> Possibly you are using some other make program?
>
> Ethan
Well, I see the file Makefile.maint, but I'm not sure what I'm looking
at. I see some THIS_VERSION, PREV_VERSION , etc. but I don't know how
that ties into what I see in the source code. In show.c is the line:
fprintf(fp, fmt,
p, /* empty line */
p, PROGRAM,
p, gnuplot_version, gnuplot_patchlevel, gnuplot_date,
in which gnuplot_date is the "last modified" date. And that variable
comes from version.c, i.e.,
const char gnuplot_date[] = "2012-06-19 ";
but I can't find anything in a make file that indicates gnuplot_date[]
is automatically generated. One has to manually change that, correct?
I do see at the top of the file version.c:
#ifndef lint
static char *RCSid() { return RCSid("$Id: version.c,v 1.107 2013/02/26
23:38:42 sfeam Exp $"); }
#endif
which looks like it has something to do with revision control system,
but perhaps on a single file basis. We would want something on a
project-wide basis. Is that what configure.in is?
Dan
|