From 6ca472b7404c89a5533d435cc5a09ec3f52d55f2 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 14 Oct 2009 08:38:47 +0200 Subject: [PATCH] m4/as-version: Make AS_NANO set RELEASE if nano != 1 If code using AS_NANO wants finer grained control, they should use the PACKAGE_VERSION_NANO. https://bugzilla.gnome.org/show_bug.cgi?id=598248 --- m4/as-version.m4 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/m4/as-version.m4 b/m4/as-version.m4 index 4856498..22ff774 100644 --- a/m4/as-version.m4 +++ b/m4/as-version.m4 @@ -32,7 +32,7 @@ AC_DEFUN([AS_VERSION], AC_SUBST(PACKAGE_VERSION_MICRO) ]) -dnl AS_NANO(ACTION-IF-NO-NANO, [ACTION-IF-NANO]) +dnl AS_NANO(ACTION-IF-NANO-NON-NULL, [ACTION-IF-NANO-NULL]) dnl requires AC_INIT to be called before dnl For projects using a fourth or nano number in your versioning to indicate @@ -44,7 +44,7 @@ dnl - parses AC_PACKAGE_VERSION, set by AC_INIT, and extracts the nano number dnl - sets the variable PACKAGE_VERSION_NANO dnl - sets the variable PACKAGE_VERSION_RELEASE, which can be used dnl for rpm release fields -dnl - executes ACTION-IF-NO-NANO or ACTION-IF-NANO +dnl - executes ACTION-IF-NANO-NON-NULL or ACTION-IF-NANO-NULL dnl example: dnl AS_NANO(RELEASE="yes", RELEASE="no") @@ -63,7 +63,11 @@ AC_DEFUN([AS_NANO], else AC_MSG_RESULT($NANO) PACKAGE_VERSION_RELEASE=0.`date +%Y%m%d.%H%M%S` - ifelse([$2], , :, [$2]) + if test "x$NANO" != "x1" ; then + ifelse([$1], , :, [$1]) + else + ifelse([$2], , :, [$2]) + fi fi PACKAGE_VERSION_NANO=$NANO AC_SUBST(PACKAGE_VERSION_NANO) -- 2.7.4