From: David Schleef Date: Tue, 2 Sep 2003 01:12:15 +0000 (+0000) Subject: Fix to make the version code work correctly. X-Git-Tag: r0_7_69~240 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=12c07e6aa93978ad5c233cdd3212c92989e0da5c;p=comedi.git Fix to make the version code work correctly. --- diff --git a/configure.ac b/configure.ac index 110236c9..6f68578d 100644 --- a/configure.ac +++ b/configure.ac @@ -6,13 +6,26 @@ AM_CONFIG_HEADER(config.h) AC_CANONICAL_TARGET([]) PACKAGE=comedi -VERSION=0.7.67 +COMEDI_MAJORVERSION=0 +COMEDI_MINORVERSION=7 +COMEDI_MICROVERSION=67 +# set the nanoversion to 0 for releases, 1 for CVS, >= 2 for prereleases +COMEDI_NANOVERSION=1 + +if test x$COMEDI_NANOVERSION = x0 ; then + VERSION=$COMEDI_MAJORVERSION.$COMEDI_MINORVERSION.$COMEDI_MICROVERSION +else + VERSION=$COMEDI_MAJORVERSION.$COMEDI_MINORVERSION.$COMEDI_MICROVERSION.$COMEDI_NANOVERSION +fi AM_INIT_AUTOMAKE($PACKAGE,$VERSION) AM_MAINTAINER_MODE AC_SUBST(PACKAGE) AC_SUBST(VERSION) +AC_DEFINE_UNQUOTED(COMEDI_MAJORVERSION, $COMEDI_MAJORVERSION, [Comedi major version]) +AC_DEFINE_UNQUOTED(COMEDI_MINORVERSION, $COMEDI_MINORVERSION, [Comedi minor version]) +AC_DEFINE_UNQUOTED(COMEDI_MICROVERSION, $COMEDI_MICROVERSION, [Comedi micro version]) AC_PROG_CC @@ -29,6 +42,8 @@ AC_SUBST(moduledir) AC_SUBST(modulePROGRAMS_INSTALL) DS_LINUX_CONFIG_OPTION_MODULE(CONFIG_PCMCIA) +DS_LINUX_CONFIG_OPTION_MODULE(CONFIG_ISA) +DS_LINUX_CONFIG_OPTION_MODULE(CONFIG_PCI) #AM_CONDITIONAL(CONFIG_PCMCIA,false) AC_DEFINE(CONFIG_COMEDI_DEBUG, true, [Define if debugging is enabled]) diff --git a/include/linux/comedidev.h b/include/linux/comedidev.h index ee4b2b13..133f44da 100644 --- a/include/linux/comedidev.h +++ b/include/linux/comedidev.h @@ -44,15 +44,15 @@ #include +#include + #define DPRINTK(format, args...) do{ \ if(comedi_debug)printk("comedi: " format , ## args ); \ } while(0) -#ifndef COMEDI_VERSION_CODE -#define COMEDI_VERSION_CODE 0x10000 -#define COMEDI_RELEASE "1.0.0" -#endif +#define COMEDI_VERSION_CODE COMEDI_VERSION(COMEDI_MAJORVERSION,COMEDI_MINORVERSION,COMEDI_MICROVERSION) +#define COMEDI_RELEASE VERSION #define COMEDI_INITCLEANUP_NOMODULE(x) \ static int __init x ## _init_module(void) \