|
From: sfeam (E. Merritt) <eam...@gm...> - 2013-08-07 17:49:30
|
On Wednesday, 07 August 2013, Hans-Bernhard Bröker wrote:
> On 07.08.2013 10:53, Lars Hecking wrote:
> > I'm wondering if the best option is to put all the changeable items into
> > a generated header file that is included by version.c; even config.h would
> > do.
>
> That approach would have its own downsides. The first that comes to
> mind is that there are builds of gnuplot that do _not_ use autotools,
> thus no (automaticallly updated) config.h either. Right now, only one
> of those (config/mingw/Makefile) tries to duplicate the effect of
> modifying version.c on-the-fly. The others only get that effect if
> either autotools or the MinGW makefile did the modification already.
>
> Generally, any extra file this information would go into will be missing
> completely in non-autotools builds.
>
> And if you put that stuff into the main config.h, that that would defeat
> the purpose of make, because every time you update ChangeLog, the entire
> program would be rebuilt. That can't be right.
How about changing version.c to something like
#ifndef LAST_MODIFIED
#define LAST_MODIFIED "2012-06-19"
#endif
const char gnuplot_date[] = LAST_MODIFIED;
And then using some autotools magic that I would have to hunt for
do something along the lines of
LAST_MODIFIED = <some magic involving awk or grep>
DEFS = $DEFS -DLAST_MODIFIED=${LAST_MODIFIED}
That should reproduce the current behavior without modifying
any source files.
Ethan
>
> As far as I'm concerned, I haven't seen that mechanism actually working
> for so long I didn't even know it existed before this discussion. I run
> builds using multiple compilers, and the out-of-tree builds that
> requires break the version.c update mechanism.
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> gnuplot-beta mailing list
> gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
>
|