[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: --version for CVS Bison
From: |
Akim Demaille |
Subject: |
Re: --version for CVS Bison |
Date: |
Tue, 30 May 2006 09:54:47 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) |
>>> "Joel" == Joel E Denny <address@hidden> writes:
> On Tue, 30 May 2006, Akim Demaille wrote:
>> Le 29 mai 06 à 20:25, Joel E. Denny a écrit :
>>
>> > > I would have selected Joel's solution, but with a new change-id.c file
>> > > to save cycles.
>> >
>> > What would be in that file?
>>
>> A const char * with the revision. The point is to minimize
>> what has to be recompiled.
> Ok, I guess it's possible it might be used in other files at some point.
I'm not sure what you mean here, but, yes, we would change
getargs.c:version to output "revision". Or, indeed, you can keep the
change-id.h, included by change-id.c that compiles it. Others just
link to it.
A couple of minor points:
- I much prefer - to _ in file names :)
- this:
+ if ( echo '@VERSION@' | grep + >/dev/null 2>&1 ); then \
+ grep '^$$Id' $(top_srcdir)/ChangeLog \
+ | sed 's/$$$$/$$\\n"/' >> $@; \
+ else \
+ echo '"' >> $@; \
+ fi
is actually a case to save an echo, a subshell, and a grep. Using @@
is discouraged: use $() instead. Also, I'm not sure all the greps out
there will understand your $ properly.
case "$(VERSION)" in
*+*) sed -n 's/^\$$\(Id.*\)\$$$$/const char *revision = "\1";/p' \
$(top_srcdir)/ChangeLog
;;
esac >$@
- Re: --version for CVS Bison, (continued)
- Re: --version for CVS Bison, Joel E. Denny, 2006/05/28
- Re: --version for CVS Bison, Paul Eggert, 2006/05/28
- Re: --version for CVS Bison, Joel E. Denny, 2006/05/28
- Re: --version for CVS Bison, Paul Eggert, 2006/05/29
- Re: --version for CVS Bison, Joel E. Denny, 2006/05/29
- Re: --version for CVS Bison, Paul Eggert, 2006/05/29
- Re: --version for CVS Bison, Akim Demaille, 2006/05/29
- Re: --version for CVS Bison, Joel E. Denny, 2006/05/29
- Re: --version for CVS Bison, Akim Demaille, 2006/05/30
- Re: --version for CVS Bison, Joel E. Denny, 2006/05/30
- Re: --version for CVS Bison,
Akim Demaille <=
- Re: --version for CVS Bison, Joel E. Denny, 2006/05/30
- Re: --version for CVS Bison, Akim Demaille, 2006/05/31
- Re: --version for CVS Bison, Joel E. Denny, 2006/05/31
- Re: --version for CVS Bison, Akim Demaille, 2006/05/29