Changeset 2431


Ignore:
Timestamp:
Mar 6, 2011, 9:04:31 PM (11 years ago)
Author:
Peter
Message:

fixes #620. Move version defines from 'version.h' to
'config_public.h'. The latter is included from the former so the api
is not changed in the sense that a program that used e.g. YAT_VERSIOn
and included 'version.h' will still compile. version.h is no longer
generated but checked into the repository. This may cause a confict in
developers wc, which can easily be avoided by removing version.h
before updating to with this ChangeSet?.

Location:
trunk
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r2418 r2431  
    3434
    3535m4_include([m4/version.m4])
    36 AC_INIT([yat],[YAT_VERSION],[libyat-users@lists.sourceforge.net],,
     36AC_INIT([yat],[YAT_VERSION__],[libyat-users@lists.sourceforge.net],,
    3737        [http://dev.thep.lu.se/yat])
    3838AC_PREREQ(2.63)
     
    4848AC_SUBST([YAT_PATCH_VERSION], [PATCH_VERSION])
    4949AC_SUBST([YAT_DEV_BUILD], [DEV_BUILD])
     50AC_DEFINE([YAT_VERSION], ["YAT_VERSION__"], [version])
     51AC_DEFINE([YAT_MAJOR_VERSION], [MAJOR_VERSION], [major version])
     52AC_DEFINE([YAT_MINOR_VERSION], [MINOR_VERSION], [minor version])
     53AC_DEFINE([YAT_PATCH_VERSION], [PATCH_VERSION], [patch version])
     54AC_DEFINE([YAT_DEV_BUILD], [DEV_BUILD], [Define to false if offical version])
    5055
    5156AC_CONFIG_HEADERS([config.h])
     
    283288     yat/regression/Makefile
    284289     yat/statistics/Makefile
    285      yat/utility/version.h
    286290     yat/utility/Makefile])
    287291
  • trunk/m4/version.m4

    r2416 r2431  
    7676###
    7777
    78 # Setting YAT_VERSION based upon settings above
    79 m4_define([YAT_VERSION],MAJOR_VERSION.MINOR_VERSION)
     78# Setting YAT_VERSION__ based upon settings above
     79m4_define([YAT_VERSION__],MAJOR_VERSION.MINOR_VERSION)
    8080# disregarding patch number if zero
    81 m4_define([YAT_VERSION], m4_if(PATCH_VERSION,[0], YAT_VERSION,
    82                                   YAT_VERSION.PATCH_VERSION))
    83 m4_define([YAT_VERSION], m4_if(DEV_BUILD,[true], YAT_VERSION[pre],
    84                                   YAT_VERSION))
     81m4_define([YAT_VERSION__], m4_if(PATCH_VERSION,[0], YAT_VERSION__,
     82                                 YAT_VERSION__.PATCH_VERSION))
     83m4_define([YAT_VERSION__], m4_if(DEV_BUILD,[true], YAT_VERSION__[pre],
     84                                 YAT_VERSION__))
  • trunk/yat/utility/config_public.h.in

    r2140 r2431  
    66/*
    77  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
    8   Copyright (C) 2009 Peter Johansson
     8  Copyright (C) 2009, 2011 Peter Johansson
    99
    1010  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    3131#undef YAT_HAVE_GCC_DEPRECATED
    3232
     33/// Version of yat in string format
     34#undef YAT_VERSION
     35/// First digit in VERSION triplet
     36#undef YAT_MAJOR_VERSION
     37/// Second digit in VERSION triplet
     38#undef YAT_MINOR_VERSION
     39/// Third digit in VERSION triplet or zero if VERSION is MAJOR.MINOR
     40#undef YAT_PATCH_VERSION
     41/// Set to true when releasing tarball
     42#undef YAT_DEV_BUILD
     43
    3344#endif
  • trunk/yat/utility/version.h

    r2428 r2431  
    3636*/
    3737
    38 /**
    39    MAJOR version
    40 
    41    No compatibility is guarenteed between MAJOR versions.
    42 
    43    \since New in yat 0.5
    44  */
    45 #define YAT_MAJOR_VERSION @YAT_MAJOR_VERSION@
    46 
    47 /**
    48    MINOR version
    49 
    50    Minor API changes that do not cause binary compatibility problems.
    51    Reset to 0 when upgrading YAT_MAJOR_VERSION
    52 
    53    \since New in yat 0.5
    54  */
    55 #define YAT_MINOR_VERSION @YAT_MINOR_VERSION@
    56 
    57 /**
    58    PATCH version
    59 
    60    The Patch level never includes API changes, simply bug fixes.
    61    Reset to 0 when upgrading YAT_MINOR_VERSION
    62 
    63    \since New in yat 0.5
    64  */
    65 #define YAT_PATCH_VERSION @YAT_PATCH_VERSION@
    66 
    67 /**
    68    VERSION
    69 
    70    The version of yat in string format
    71 
    72    \since New in yat 0.5
    73  */
    74 #define YAT_VERSION "@VERSION@"
    75 
    76 /**
    77    DEV_BUILD
    78 
    79    Is set to false in releases
    80 
    81    \since New in yat 0.5
    82  */
    83 #define YAT_DEV_BUILD @YAT_DEV_BUILD@
     38#include "config_public.h"
    8439
    8540/**
Note: See TracChangeset for help on using the changeset viewer.