From: Bastian M. <bma...@we...> - 2017-12-26 09:32:53
|
> Von: "Dima Kogan" <gn...@di...> > > Bastian M�rkisch <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? At least it wouldn't need to be built. It's only included by src/version.c for the development version. Instead, the date is hard-coded there. Bastian |