From: Dima K. <gn...@di...> - 2017-12-26 08:53:04
|
(accidentally hit "send" prematurely. Trying again.) Bastian Mrkisch <bma...@we...> writes: > @echo "#ifndef GNUPLOT_TIMEBASE_H_INCLUDED" >$@t > @echo "#define GNUPLOT_TIMEBASE_H_INCLUDED" >>$@t > - @head -1 $< | sed -e 's,\(^[0-9-]* \).*$$,const char gnuplot_date[] = "\1";,' >>$@t > + @echo "const char gnuplot_date[] = \"`git log -1 --format=%ci | cut -b-11`\";" >>$@t > @echo "#endif /* GNUPLOT_TIMEBASE_H_INCLUDED */" >> $@t > @if cmp -s $@ $@t; then rm -f $@t; else mv $@t $@; fi Presumably this will barf when building from a release tarball WITHOUT the git metadata (i.e. what the distros do), right? Or is timestamp.h not built in those cases? |