From: Tatsuro M. <tma...@ya...> - 2018-02-12 04:46:06
|
>> I checked out git source >> git clone https://git.code.sf.net/p/gnuplot/gnuplot-main gnuplot >> >> and >> >> ./prepare >> ./configure (options) >> make >> >> The produced src/timestamp.h is >> >> #ifndef GNUPLOT_TIMEBASE_H_INCLUDED >> #define GNUPLOT_TIMEBASE_H_INCLUDED >> const char gnuplot_date[] = ""; >> #endif /* GNUPLOT_TIMEBASE_H_INCLUDED */ >> >> I have observed the above on Cygwin and ubuntu 16.04. >> >> What is happening? > > Works here: > > dima@scrawny:/tmp/gnuplot-main/src$ make -n timestamp.h > echo Making timestamp.h > echo "#ifndef GNUPLOT_TIMEBASE_H_INCLUDED" >timestamp.ht > echo "#define GNUPLOT_TIMEBASE_H_INCLUDED" >>timestamp.ht > echo "const char gnuplot_date[] = \"`git log -1 --format=%ci | > cut -b-11`\";" >>timestamp.ht > echo "#endif /* GNUPLOT_TIMEBASE_H_INCLUDED */" >> > timestamp.ht > if cmp -s timestamp.h timestamp.ht; then rm -f timestamp.ht; else mv > timestamp.ht timestamp.h; fi > > dima@scrawny:/tmp/gnuplot-main/src$ make timestamp.h > Making timestamp.h > > dima@scrawny:/tmp/gnuplot-main/src$ cat timestamp.h > #ifndef GNUPLOT_TIMEBASE_H_INCLUDED > #define GNUPLOT_TIMEBASE_H_INCLUDED > const char gnuplot_date[] = "2018-02-11 "; > #endif /* GNUPLOT_TIMEBASE_H_INCLUDED */ > > dima@scrawny:/tmp/gnuplot-main/src$ git log -1 --format=%ci | cut -b-11 > 2018-02-11 > > Which part of that is different for you? Note that this logic changed > semi-recently in dd0c5adaa638647 Ah! It seems that current mechanism does not build proper timestamp.h in case of off-place build. Correctly, what I have done. git clone https://git.code.sf.net/p/gnuplot/gnuplot-main gnuplot ./prepare mkdir build cd build ../configure (options) make The aboves give empty gnuplot_date[] If I execute on place build git clone https://git.code.sf.net/p/gnuplot/gnuplot-main gnuplot ./prepare ./configure (options) make The aboves give correct gnuplot_date[] Tatsuro |