[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: |
Wed, 31 May 2006 15:06:18 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) |
>>> "Joel" == Joel E Denny <address@hidden> writes:
> Sorry, I was agreeing with you by explaining what I thought to be the
> point of your suggestion. That is, although the ChangeLog Id is only used
> in one file (getargs.c) right now, it might be used in others in the
> future. If and when that happens, your approach will improve
> re-compilation time. Did I get it?
If you wish :) I was also considering the time of recompilation of
the file itself. Maybe I'm biased: I'm using this approach in a C++
project where there's a huge different in compilation time needed to
compile the file that needs this Id as compared to compiling just this
sole variable definition. Maybe that's overkill for Bison, in which
case your approach is simpler.
> I was going to name them "changelog-id.h", "changelog-id.c", "const char
I meant changelog-id. Anyway, I personally use revision.c ;)
>> case "$(VERSION)" in
>> *+*) sed -n 's/^\$$\(Id.*\)\$$$$/const char *revision = "\1";/p' \
>> $(top_srcdir)/ChangeLog
>> ;;
>> esac >$@
> This doesn't handle the case of no `+'. This works for me:
> changelog-id.c: $(top_srcdir)/configure $(top_srcdir)/ChangeLog
> case "$(VERSION)" in \
> *+*) sed -n \
> 's/^\$$\(Id.*\)\$$$$/const char *changelog_id = "\1\\n";/p' \
> $(top_srcdir)/ChangeLog \
> ;; \
> *) echo 'const char *changelog_id = "";' \
> ;; \
> esac >$@
Thanks.
- 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/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, 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/31
- Re: --version for CVS Bison, Akim Demaille, 2006/05/29