From: Damien Lespiau <damien.lespiau@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t 4/4] build: Add an option to not use the git hash in version
Date: Thu, 2 Jul 2015 00:21:43 +0100 [thread overview]
Message-ID: <1435792903-11552-4-git-send-email-damien.lespiau@intel.com> (raw)
In-Reply-To: <1435792903-11552-1-git-send-email-damien.lespiau@intel.com>
When developing, it's quite annoying that the version changes every
commit, causing the library to be rebuild and everything single binary
re-linked.
Add a config option to skip that.
I remember Ville asking for this "feature" as well.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
configure.ac | 7 +++++++
lib/Makefile.sources | 5 +++++
2 files changed, 12 insertions(+)
diff --git a/configure.ac b/configure.ac
index 4208f00..caa3f50 100644
--- a/configure.ac
+++ b/configure.ac
@@ -212,6 +212,13 @@ if test "x$enable_debug" = xyes; then
AC_SUBST([DEBUG_CFLAGS])
fi
+# prevent relinking the world on every commit for developpers
+AC_ARG_ENABLE(skip-version,
+ AS_HELP_STRING([--enable-skip-version],
+ [Do not use git hash in version]),
+ [skip_version=$enableval], [skip_version=no])
+AM_CONDITIONAL(SKIP_VERSION, [test "x$skip_version" = xyes])
+
# -----------------------------------------------------------------------------
# To build multithread code, gcc uses -pthread, Solaris Studio cc uses -mt
diff --git a/lib/Makefile.sources b/lib/Makefile.sources
index f8a1b92..2148684 100644
--- a/lib/Makefile.sources
+++ b/lib/Makefile.sources
@@ -60,6 +60,10 @@ libintel_tools_la_SOURCES = \
.PHONY: version.h.tmp
+if SKIP_VERSION
+$(IGT_LIB_PATH)/version.h.tmp:
+ @echo '#define IGT_GIT_SHA1 "SKIP"' >> $@
+else
$(IGT_LIB_PATH)/version.h.tmp:
@touch $@
@if test -d $(GPU_TOOLS_PATH)/.git; then \
@@ -73,6 +77,7 @@ $(IGT_LIB_PATH)/version.h.tmp:
else \
echo '#define IGT_GIT_SHA1 "NOT-GIT"' ; \
fi >> $@
+endif # SKIP_VERSION
$(IGT_LIB_PATH)/version.h: $(IGT_LIB_PATH)/version.h.tmp
--
2.1.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-07-01 23:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-01 23:21 [PATCH i-g-t 1/4] stats: Add wikipedia links to get_trimean() and get_iqm() Damien Lespiau
2015-07-01 23:21 ` [PATCH i-g-t 2/4] aux: Don't evaluate several times the arguments of min() and max() Damien Lespiau
2015-07-01 23:21 ` [PATCH i-g-t 3/4] build: Add DEBUG_FLAGS to tools and self-tests Damien Lespiau
2015-07-01 23:21 ` Damien Lespiau [this message]
2015-07-02 8:31 ` [PATCH i-g-t 4/4] build: Add an option to not use the git hash in version Ville Syrjälä
2015-07-02 8:42 ` Chris Wilson
2015-07-02 9:33 ` Thomas Wood
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=1435792903-11552-4-git-send-email-damien.lespiau@intel.com \
--to=damien.lespiau@intel.com \
--cc=intel-gfx@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.