compile-time version defines
Russ Allbery
rra at stanford.edu
Thu Aug 24 20:38:46 UTC 2000
Heath Kehoe <heath.kehoe at intermec.com> writes:
> I would like to add compile-time #defines with version information.
> Something like:
> #define INN_VERSION_MAJOR 2
> #define INN_VERSION_MINOR 3
> #define INN_VERSION_PATCH 1
> #define INN_VERSION_EXTRA "20000824 CVS prerelease"
> #define INN_VERSION_STRING "INN 2.3.1 (20000824 CVS prerelease)"
> I would have the mkversion script create a .h file with those defines in
> it; either <innversion.h> or <inn/version.h>, which would then be
> included by libinn.h.
> The reason: so I can maintain just one ovdb.c, and use #if/#else/#endif
> in the event that changes to 2.4 require changes to the overview
> modules.
Sure, that sounds fine to me. I prefer <inn/version.h>; seems reasonable
to install it too (down the road, once we start installing headers).
--
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
More information about the inn-workers
mailing list