This looks good, and is probably better than the hack that I've been
using. What's happening on my system is that configure isn't
expanding some of the macros in version.h. My hack is pretty clean,
except for where it's really not.

The first thing I did was change # define VERSION 4 to:
# define VERSION "4"
Then, I could get rid of the VERSION_STRINGED_VARIABLE macro, which
wasn't getting interpreted for whatever reason (i.e. I'd get
"configuring csound version
VERSION_STRINGED_VARIABLE.13.LINUX_PATCHLEVEL" type errors)

lp wouldn't expand unless I tacked on a null string. This is the part
of my kludge that seems really ugly to me. Anyway, it's a quick and
very dirty way to get the code to work until something better (like
the version.txt file) is put into CVS. Here's the diff:

29c29
< # define VERSION 4
---
> # define VERSION "4"
49d48
< # define VERSION_STRINGED_VARIABLE(a) #a
51c50
<       " v" ## VERSION_STRINGED_VARIABLE(M) ## "." ## m ## "." ## lp
---
>       " v" ## M ## "." ## m ## "." ## lp ## ""


Hope this helps,
Adam Zygmunt
[EMAIL PROTECTED]


On Mon, 23 Jul 2001, Maurizio Umberto Puxeddu wrote:

> Nicola Bernardini wrote:
>
> > Il 22/07/01 alle 17:28, Maurizio Umberto Puxeddu scrisse:
> >
> > [snip]
> >
> >
> > yes version.h is definitely an ugly hack and it's time to change it
> > with something more solid. However, I'm sort to attached to that little
> > piece of hack :) so I'd like to know a little more in depth what the problem
> > is. Can you post:
> >
> > a) the output of gcc
>
> > b) your hacks that correct the problem?
>
> My original hack wasn't that good: it consisted in deleting your macros
> and writing version string by hand! This is why I sometimes had an
> outdated version number on the console! :)
>
> I would propose to
>
> 1) store the version number in file new-src/version.txt (file attached)
> 2) patch configure.in and Maked.Variables.in with the attached patch
> 3) Add version.h.in in new-src (file attached) and remove version.h
>
> Notes:
> 1) this has been checked against current CVS version and GCC 2.96 by
> RedHat coming with RHL 7.1
> 2) the version numbers in the current CVS version are not named
> consistently with their use (or used not consistently with their name).
> I choosed some neutral names.
> 3) There are some things that I don't understand (and to be honest don't
> want to understand), so please review my code and check if it is at
> least "run-time consistent" :) with the whole thing
>
> If I forgot to say/send something, let me know.
>
> Regards,
> Maurizio Umberto Puxeddu.
>




Reply via email to