[PATCH] automatic major, minor, and patchlevel definitions

Andres Salomon dilinger at debian.org
Mon Oct 2 14:05:59 PDT 2006


Hi,

I've noticed that there's no standard method for setting the major,
minor, and patchlevel versions in each module.  Some hardcode the
versions via #defines; others base them on the autoconf-defined value of
PACKAGE_VERSION.

It would make a lot more sense to have autoconf handle defining these,
and base it off PACKAGE_VERSION (for those who don't do much autoconf,
PACKAGE_NAME and PACKAGE_VERSION are automatically set in config.h based
on the values passed to AC_INIT() in configure.ac).  The variable names
I've chosen to go w/ are PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR,
and PACKAGE_VERSION_PATCHLEVEL.

The xf86-video-nv driver does something similar, but this is a more
robust version of it (if PACKAGE_VERSION is 1.2.3.4, or 1.23.4, or
similar it will still set things properly, ignoring anything past the
3rd dot).  I've made it such that the XORG_RELEASE_VERSION macro sets
the variables; by patching your xorg macros and reinstalling them, each
driver automatically gets these variables w/ a simple autoreconf.

If people have no objections, I'll file a bug to get this included.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: xorgmacros.patch
Type: text/x-patch
Size: 1300 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20061002/60812c2a/attachment.bin>


More information about the xorg mailing list