public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* configure: pull the version number from Bazaar
@ 2011-10-20  3:38 Michael Hope
  2011-10-20 21:51 ` Yann E. MORIN
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Hope @ 2011-10-20  3:38 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

If '.version' ends with bzr then use bzr to automatically add the
revision number to the version string.

Mirrors the current support for Mercurial.  Uses Debian style versions
with a '+' to indicate after.

.version will normally contain '1.12.4+bzr'.  CT_VERSION will end up
as '1.12.4+bzr1234'.  If the revno can't be found fall back to a
Debian style date such as '1.12.4+bzr+20111009'.

Linaro does most of its work in Launchpad and Bazaar.  I'm happy to
keep this as a local patch if need be.

Signed-off-by: Michael Hope <michael.hope@linaro.org>


diff --git a/configure b/configure
index 6a68b38..0e7d23e 100755
--- a/configure
+++ b/configure
@@ -550,6 +550,16 @@
          # arbitrarily deep directory structure
          VERSION="$( printf "${VERSION}\n" |"${sed}" -r -e 's|/+|_|g;' )"
          ;;
+    *bzr)
+	REVISION="$( bzr revno 2>/dev/null || true )"
+        case "${REVISION}" in
+            "")
+                VERSION="${VERSION}+$( date +%Y%m%d.%H%M%S )";;
+            *)
+                VERSION="${VERSION}${REVISION}";
+                ;;
+	esac
+	;;
  esac
  printf "${VERSION}\n"


--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-11-09  0:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-20  3:38 configure: pull the version number from Bazaar Michael Hope
2011-10-20 21:51 ` Yann E. MORIN
2011-10-20 22:13   ` Michael Hope
2011-11-02  0:03   ` Yann E. MORIN
2011-11-09  0:43     ` Michael Hope

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).