Re: [AD] Allegro version helpers |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> #define STRINGIFY(x) #x
> #define ISWIP
>
> #ifdef ISWIP
> #define MAKEALVERSTR(ver, subver, wipver) STRINGIFY(ver.subver.wipver
> (WIP)) #else
> #define MAKEALVERSTR(ver, subver, wipver) STRINGIFY(ver.subver.wipver)
> #endif
>
> #define ALLEGRO_VERSION_STR
> MAKEALVERSTR(ALLEGRO_VERSION,ALLEGRO_SUB_VERSION,ALLEGRO_WIP_VERSION)
Hardly understandable, isn't it?
> The advantage this has is that when changing the version, you just have to
> change the Version number, the Subversion number and the WIP-version
> number and if it's not a WIP version, omit the "#define ISWIP" line. You
> no longer have to change the string as well as the number. The ISWIP
> #define (and possibly STRINGIFY too) could be used elsewhere too.
Well, all of this is automatized by misc/fixver.sh.
--
Eric Botcazou