Skip to content
Snippets Groups Projects
Commit 0e23c684 authored by Mark Grondona's avatar Mark Grondona
Browse files

o Read SLURM API version numbers from META file

parent 92738131
No related branches found
No related tags found
No related merge requests found
...@@ -10,4 +10,6 @@ ...@@ -10,4 +10,6 @@
Micro: 1 Micro: 1
Version: 0.3.1 Version: 0.3.1
Release: 2 Release: 2
API: 0x010100 API_CURRENT: 1
API_REVISION: 1
API_AGE: 0
...@@ -114,11 +114,24 @@ AC_SUBST(PROJECT) ...@@ -114,11 +114,24 @@ AC_SUBST(PROJECT)
# Automake desires "PACKAGE" variable instead of PROJECT # Automake desires "PACKAGE" variable instead of PROJECT
PACKAGE=$PROJECT PACKAGE=$PROJECT
# rpm make target needs Version in META, not major and minor version numbers ## Build the API version
API="`perl -ne 'print,exit if s/^\s*API:\s*(\S*).*/\1/i' $srcdir/META`" SLURM_API_VERSION="0x"
AC_DEFINE_UNQUOTED(SLURM_API_VERSION, $API, [Define the API's version.]) for name in CURRENT REVISION AGE; do
API=`perl -ne "print,exit if s/^\s*API_$name:\s*(\S*).*/\1/i" $srcdir/META`
eval SLURM_API_$name=$API
API=`printf "%02x" $API`
SLURM_API_VERSION="${SLURM_API_VERSION}$API"
done
AC_DEFINE_UNQUOTED(SLURM_API_VERSION, $SLURM_API_VERSION, [Define the API's version])
AC_DEFINE_UNQUOTED(SLURM_API_CURRENT, $SLURM_API_CURRENT, [API current version])
AC_DEFINE_UNQUOTED(SLURM_API_REVISION, $SLURM_API_REVISION, [API current rev])
AC_DEFINE_UNQUOTED(SLURM_API_AGE, $SLURM_API_AGE, [API current age])
AC_SUBST(SLURM_API_VERSION) AC_SUBST(SLURM_API_VERSION)
AC_SUBST(SLURM_API_CURRENT)
AC_SUBST(SLURM_API_REVISION)
AC_SUBST(SLURM_API_AGE)
# rpm make target needs Version in META, not major and minor version numbers
VERSION="`perl -ne 'print,exit if s/^\s*VERSION:\s*(\S*).*/\1/i' $srcdir/META`" VERSION="`perl -ne 'print,exit if s/^\s*VERSION:\s*(\S*).*/\1/i' $srcdir/META`"
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Define the project's version.]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Define the project's version.])
AC_SUBST(VERSION) AC_SUBST(VERSION)
......
...@@ -27,9 +27,9 @@ endif ...@@ -27,9 +27,9 @@ endif
# #
# If any interfaces have been removed, set age = 0 # If any interfaces have been removed, set age = 0
# #
current = 1 current = $(SLURM_API_CURRENT)
rev = 0 rev = $(SLURM_API_REVISION)
age = 0 age = $(SLURM_API_AGE)
lib_LTLIBRARIES = libslurm.la lib_LTLIBRARIES = libslurm.la
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment