[sagemath] 02/02: Add support for ccache. To use, add pkg.sagemath.ccache to DEB_BUILD_PROFILES

Ximin Luo infinity0 at debian.org
Thu Sep 29 11:48:00 UTC 2016


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository sagemath.

commit 6edc91d164d20ba14b11bd228f6e58a28fc72ba5
Author: Ximin Luo <infinity0 at debian.org>
Date:   Thu Sep 29 13:47:48 2016 +0200

    Add support for ccache. To use, add pkg.sagemath.ccache to DEB_BUILD_PROFILES
---
 debian/control | 1 +
 debian/rules   | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/debian/control b/debian/control
index 49a3d2b..11211f6 100644
--- a/debian/control
+++ b/debian/control
@@ -11,6 +11,7 @@ Standards-Version: 3.9.8
 X-Python-Version: 2.7
 Build-Depends:
  autoconf,
+ ccache <pkg.sagemath.ccache>,
  cysignals-tools <!nodoc>,
  cython (>= 0.24.1),
  debhelper (>= 9),
diff --git a/debian/rules b/debian/rules
index 7fab82e..95cace4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,6 +15,14 @@ else
 	DEB_BUILD_TARGET = all
 endif
 
+# Use ccache if pkg.sagemath.ccache build-profile is active.
+# Your rebuilds will be *much quicker*.
+ifneq (,$(filter pkg.sagemath.ccache,$(DEB_BUILD_PROFILES)))
+export PATH := /usr/lib/ccache:$(PATH)
+export CCACHE_DIR := $(PWD)/debian/ccache
+$(shell mkdir -p "$(CCACHE_DIR)")
+endif
+
 %:
 	dh $@ --parallel
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git



More information about the debian-science-commits mailing list