Whamcloud - gitweb
LU-10271 hsm: don't release with wrong size
[fs/lustre-release.git] / config / lustre-version.m4
1 #
2 # LUSTRE_VERSION_CPP_MACROS
3 #
4 AC_DEFUN([LUSTRE_VERSION_CPP_MACROS], [
5 LUSTRE_MAJOR=`echo AC_PACKAGE_VERSION | sed -re ['s/([0-9]+)\.([0-9]+)\.([0-9]+)(\.([0-9]+))?.*/\1/']`
6 LUSTRE_MINOR=`echo AC_PACKAGE_VERSION | sed -re ['s/([0-9]+)\.([0-9]+)\.([0-9]+)(\.([0-9]+))?.*/\2/']`
7 LUSTRE_PATCH=`echo AC_PACKAGE_VERSION | sed -re ['s/([0-9]+)\.([0-9]+)\.([0-9]+)(\.([0-9]+))?.*/\3/']`
8 LUSTRE_FIX=`echo AC_PACKAGE_VERSION | sed -re ['s/([0-9]+)\.([0-9]+)\.([0-9]+)(\.([0-9]+))?.*/\5/']`
9 AS_IF([test -z "$LUSTRE_FIX"], [LUSTRE_FIX="0"])
10
11 AC_DEFINE_UNQUOTED([LUSTRE_MAJOR], [$LUSTRE_MAJOR], [First number in the Lustre version])
12 AC_DEFINE_UNQUOTED([LUSTRE_MINOR], [$LUSTRE_MINOR], [Second number in the Lustre version])
13 AC_DEFINE_UNQUOTED([LUSTRE_PATCH], [$LUSTRE_PATCH], [Third number in the Lustre version])
14 AC_DEFINE_UNQUOTED([LUSTRE_FIX], [$LUSTRE_FIX], [Fourth number in the Lustre version])
15 # Even though the code could just use VERSION or PACKAGE_VERSION directly,
16 # we use this copy named LUSTRE_VERSION_STRING instead to maintain less
17 # divergence from the Lustre client code in the upstream Linux kernel code.
18 AC_DEFINE_UNQUOTED([LUSTRE_VERSION_STRING], ["$PACKAGE_VERSION"], [A copy of PACKAGE_VERSION])
19
20 ])