public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ulrich Mueller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/eselect:master commit in: /, bin/
Date: Thu,  8 Aug 2013 20:59:08 +0000 (UTC)	[thread overview]
Message-ID: <1375995569.f95b36d2beb19d53834e2f3c210fd0e0af79349e.ulm@gentoo> (raw)

commit:     f95b36d2beb19d53834e2f3c210fd0e0af79349e
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  8 20:59:29 2013 +0000
Commit:     Ulrich Mueller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Aug  8 20:59:29 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=f95b36d2

Configure check whether we are building from git.

* configure.ac: Check whether we are building from git;
include git revision in EXTRAVERSION if we do.
* bin/Makefile.am (dosed): Append EXTRAVERSION to VERSION.

---
 ChangeLog       |  6 ++++++
 bin/Makefile.am |  2 +-
 configure.ac    | 14 ++++++++++++++
 3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 46f4582..f5883ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-08-08  Ulrich Müller  <ulm@gentoo.org>
+
+	* configure.ac: Check whether we are building from git;
+	include git revision in EXTRAVERSION if we do.
+	* bin/Makefile.am (dosed): Append EXTRAVERSION to VERSION.
+
 2013-08-06  Ulrich Müller  <ulm@gentoo.org>
 
 	* libs/config.bash.in (store_config):

diff --git a/bin/Makefile.am b/bin/Makefile.am
index 72b4812..7ba2996 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -4,7 +4,7 @@ EXTRA_DIST = eselect.in
 dosed = @SED@ -e 's,\@BASH\@,$(BASH),g' \
 	      -e 's,\@DATADIR\@,$(datadir),g' \
 	      -e 's,\@EPREFIX\@,$(EPREFIX),g' \
-	      -e 's,\@VERSION\@,$(VERSION),g'
+	      -e 's,\@VERSION\@,$(VERSION)$(EXTRAVERSION),g'
 
 % : %.in
 	@echo "Building $@..."

diff --git a/configure.ac b/configure.ac
index 28e47da..8de7222 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,6 +74,20 @@ AS_CASE([$prefix],
 AC_MSG_RESULT([${EPREFIX:-nope}])
 AC_SUBST(EPREFIX)
 
+# Include extra version information when building from git
+AC_MSG_CHECKING([whether building from git])
+EXTRAVERSION=""
+if test -d ${GIT_DIR:-.git}; then
+    AC_MSG_RESULT(yes)
+    GITREV=`git rev-parse --short HEAD`
+    if test x$GITREV != x; then
+        EXTRAVERSION="-git-$GITREV"
+    fi
+else
+    AC_MSG_RESULT(no)
+fi
+AC_SUBST(EXTRAVERSION)
+
 AC_CONFIG_FILES(Makefile
 		doc/Makefile
 		man/Makefile


             reply	other threads:[~2013-08-08 20:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-08 20:59 Ulrich Mueller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-06-07  8:50 [gentoo-commits] proj/eselect:master commit in: bin/, / Ulrich Müller
2023-06-12 16:24 ` [gentoo-commits] proj/eselect:master commit in: /, bin/ Ulrich Müller
2023-06-05 18:34 Ulrich Müller
2014-06-05 11:22 Ulrich Müller
2013-10-22 17:04 Ulrich Müller
2013-10-22  8:30 Ulrich Müller
2013-10-22  8:47 ` Ulrich Müller
2012-09-15 20:35 Ulrich Mueller
2012-09-13 17:11 Ulrich Mueller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1375995569.f95b36d2beb19d53834e2f3c210fd0e0af79349e.ulm@gentoo \
    --to=ulm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox