From 70fbff01c7ce191452964e7e5123e61e3f88f466 Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde Date: Wed, 6 Jan 2010 10:45:25 +0100 Subject: [ptxdist] let variables of PTXDIST_VERSION_* reflect timed releases The upcomming releases of ptxdist will follow a time based scheme: ptxdist-xxxx.yy.z ^^^^ ^^ ^----------- Bugfix Number, starting at 0 \ \------------- Month \---------------- Year This patch removed the old PTXDIST_VERSION_* variables: - PTXDIST_VERSION_MAJOR - PTXDIST_VERSION_MINOR - PTXDIST_VERSION_MICRO - PTXDIST_VERSION_EXTRA and replaces them according to the new scheme with: - PTXDIST_VERSION_YEAR - PTXDIST_VERSION_MONTH - PTXDIST_VERSION_BUGFIX (For the first release the VERSION_EXTRA will be dropped and may be added later again) There is one new variable: - PTXDIST_VERSION_SCM holding version information from the version control system (SCM = Source code Control Management). It's the appendix known from the linux kernel like '-gb91d1ff-dirty'. The variable: - PTXDIST_VERSION_FULL consists of '$year.$month.$bugfix$scm'. For example: '2010.01.0-gb91d1ff-dirty' Signed-off-by: Marc Kleine-Budde --- configure.ac | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index dc3f50ce9..a42810249 100644 --- a/configure.ac +++ b/configure.ac @@ -406,31 +406,18 @@ AC_SUBST(BASH_COMPLETION_DIR) dnl dnl versions dnl -VERSION_MAJOR=` echo "$PACKAGE_VERSION" | \ - sed -e "s/-/./g" | \ - (IFS=. read VERSION_MAJOR VERSION_MINOR VERSION_MICRO VERSION_EXTRA; echo $VERSION_MAJOR)` -VERSION_MINOR=` echo "$PACKAGE_VERSION" | \ - sed -e "s/-/./g" | \ - (IFS=. read VERSION_MAJOR VERSION_MINOR VERSION_MICRO VERSION_EXTRA; echo $VERSION_MINOR)` -VERSION_MICRO=` echo "$PACKAGE_VERSION" | \ - sed -e "s/-/./g" | \ - (IFS=. read VERSION_MAJOR VERSION_MINOR VERSION_MICRO VERSION_EXTRA; echo $VERSION_MICRO)` -VERSION_EXTRA=` echo "$PACKAGE_VERSION" | \ - sed -e "s/-/./g" | \ - (IFS=. read VERSION_MAJOR VERSION_MINOR VERSION_MICRO VERSION_EXTRA; echo $VERSION_EXTRA)` - -if test -n "$VERSION_EXTRA"; then - VERSION_EXTRA_SEP="-" -else - VERSION_EXTRA_SEP="" -fi - -AC_SUBST(PACKAGE_VERSION) -AC_SUBST(VERSION_MAJOR) -AC_SUBST(VERSION_MINOR) -AC_SUBST(VERSION_MICRO) -AC_SUBST(VERSION_EXTRA_SEP) -AC_SUBST(VERSION_EXTRA) +orig_ifs="${IFS}" +IFS=. +set -- ${PACKAGE_VERSION} +IFS="${orig_ifs}" + +PTXDIST_VERSION_YEAR="${1}" +PTXDIST_VERSION_MONTH="${2}" +PTXDIST_VERSION_BUGFIX="${3}" + +AC_SUBST(PTXDIST_VERSION_YEAR) +AC_SUBST(PTXDIST_VERSION_MONTH) +AC_SUBST(PTXDIST_VERSION_BUGFIX) AC_MSG_RESULT([]) AC_CONFIG_FILES( \ -- cgit v1.2.3