Changeset 3229 for trunk/m4/my_version.m4
- Timestamp:
- May 20, 2014, 9:00:16 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/m4/my_version.m4
r2853 r3229 1 1 ## $Id$ 2 2 # 3 # Copyright (C) 2012 Peter Johansson3 # Copyright (C) 2012, 2014 Peter Johansson 4 4 # 5 5 # This file is part of the yat library, http://dev.thep.lu.se/yat … … 19 19 # 20 20 21 # serial 021 # serial 1 (yat 0.13) 22 22 23 23 # How to use this file 24 24 # ==================== 25 # In 'configure.ac', include this file and call 'MY_VERSION_early' 26 # before 'AC_INIT'. After AC_INIT you can call MY_VERSION in order to 27 # AC_SUBST and AC_DEFINE variables MAJOR_VERSION, MINOR_VERSION etc. 28 # m4_include([m4/version.m4]) 25 # 26 # Copy this file to your project, e.g. directory 'm4/'. Aclocal will 27 # not do that du to limitations. In 'configure.ac', include this file 28 # and call 'MY_VERSION_early' before 'AC_INIT'. After AC_INIT you can 29 # call MY_VERSION in order to AC_SUBST and AC_DEFINE variables 30 # FOO_MAJOR_VERSION, FOO_MINOR_VERSION etc., where FOO has been 31 # replaced with PACKAGE_NAME after appropriate translation (to suit a 32 # Make variable or PP #define): 33 # 34 # m4_include([m4/my_version.m4]) 29 35 # MY_VERSION_early([3],[1],[4],[true]) 30 36 # AC_INIT([foo], [my_VERSION]) … … 51 57 m4_ifndef([my_VERSION], 52 58 [m4_fatal([MY_VERSION_early must be expanded before MY_VERSION])]) 53 AC_SUBST(m4_toupper(AC_PACKAGE_NAME)[_MAJOR_VERSION], [my_MAJOR_VERSION])54 AC_SUBST(m4_toupper(AC_PACKAGE_NAME)[_MINOR_VERSION], [my_MINOR_VERSION])55 AC_SUBST(m4_toupper(AC_PACKAGE_NAME)[_PATCH_VERSION], [my_PATCH_VERSION])56 59 60 AS_VAR_PUSHDEF([my_PACKAGE_SH], [m4_toupper(AC_PACKAGE_NAME)]) 61 AC_SUBST(my_PACKAGE_SH[_MAJOR_VERSION], [my_MAJOR_VERSION]) 62 AC_SUBST(my_PACKAGE_SH[_MINOR_VERSION], [my_MINOR_VERSION]) 63 AC_SUBST(my_PACKAGE_SH[_PATCH_VERSION], [my_PATCH_VERSION]) 64 AS_VAR_POPDEF([my_PACKAGE_SH]) 65 66 m4_pushdef([my_PACKAGE_CPP], [AS_TR_CPP([m4_toupper(AC_PACKAGE_NAME)])]) 57 67 AC_DEFINE([DEV_BUILD],[my_DEV_BUILD], 58 68 [true if dev build (version ends with pre)]) 59 AC_DEFINE(m 4_toupper(AC_PACKAGE_NAME)[_MAJOR_VERSION], [my_MAJOR_VERSION],69 AC_DEFINE(my_PACKAGE_CPP[_MAJOR_VERSION], [my_MAJOR_VERSION], 60 70 [Define to major version]) 61 AC_DEFINE(m 4_toupper(AC_PACKAGE_NAME)[_MINOR_VERSION], [my_MINOR_VERSION],71 AC_DEFINE(my_PACKAGE_CPP[_MINOR_VERSION], [my_MINOR_VERSION], 62 72 [Define to minor version]) 63 AC_DEFINE(m 4_toupper(AC_PACKAGE_NAME)[_PATCH_VERSION], [my_PATCH_VERSION],73 AC_DEFINE(my_PACKAGE_CPP[_PATCH_VERSION], [my_PATCH_VERSION], 64 74 [Define to patch version]) 75 m4_popdef([my_PACKAGE_CPP]) 65 76 ]) # MY_VERSION
Note: See TracChangeset
for help on using the changeset viewer.