[caffe] 92/249: d/rules: build again

Zhou Mo cdluminate-guest at moszumanska.debian.org
Tue Mar 8 14:51:25 UTC 2016


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

cdluminate-guest pushed a commit to branch debian/experimental
in repository caffe.

commit 5c576f5002abdb40933f2657f6ab229402112ccd
Author: Zhou Mo <cdluminate at gmail.com>
Date:   Mon Aug 31 15:44:09 2015 +0000

    d/rules: build again
---
 debian/rules | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/debian/rules b/debian/rules
index 1638969..559d024 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,7 +5,8 @@ export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
-RULES  := debian/rules
+RULES         := debian/rules
+TOP           := $(shell pwd)
 
 export CAFFE_CPU_BUILDDIR="caffe_cpu_build"
 export CAFFE_CUDA_BUILDDIR="caffe_cuda_build"
@@ -28,7 +29,8 @@ CONFFLAG_CPU = \
 	-DBUILD_matlab=OFF \
 	-DBUILD_docs=ON \
 	-DBUILD_python_layer=ON \
-	-DCMAKE_VERBOSE_MAKEFILE=ON
+	-DCMAKE_VERBOSE_MAKEFILE=ON \
+	-DCMAKE_INSTALL_PREFIX=$(TOP)/caffe-cpu
 CONFFLAG_CUDA = \
 	-DBLAS="Open" \
 	-DCMAKE_SKIP_RPATH=TRUE \
@@ -40,7 +42,8 @@ CONFFLAG_CUDA = \
 	-DBUILD_matlab=OFF \
 	-DBUILD_docs=ON \
 	-DBUILD_python_layer=ON \
-	-DCMAKE_VERBOSE_MAKEFILE=ON
+	-DCMAKE_VERBOSE_MAKEFILE=ON \
+	-DCMAKE_INSTALL_PREFIX=$(TOP)/caffe-cuda
 
 %:
 	dh $@ \
@@ -73,15 +76,22 @@ endif
 
 # In the test phase, we need to set LD_LIBRARY_PATH properly
 # for those test ELFs linked with libcaffe.so.X
-#override_dh_auto_test: config
 override_dh_auto_test: 
-	dh_auto_test -- test # compile test excutables 
-	dh_auto_test -- runtest LD_LIBRARY_PATH=${CAFFE_CPU_BUILDDIR}/lib/ 
+	dh_auto_test --builddirectory=${CAFFE_CPU_BUILDDIR} \
+		-- runtest LD_LIBRARY_PATH=${CAFFE_CPU_BUILDDIR}/lib/ 
+ifeq (y, $(flag_build_caffe_cuda))
+	# some i386/amd64 build machines may have no video card
+	# which supports CUDA. Then heading with a dash '-'.
+	-dh_auto_test --builddirectory=${CAFFE_CUDA_BUILDDIR} \
+		-- runtest LD_LIBRARY_PATH=${CAFFE_CUDA_BUILDDIR}/lib/ 
+endif
 
 override_dh_auto_install:
-	dh_auto_install -- -pcaffe-cpu -plibcaffe-cpu0 -plibcaffe-cpu-dev
+	dh_auto_install --builddirectory=${CAFFE_CPU_BUILDDIR} \
+		-- install
 ifeq (y, $(flag_build_caffe_cuda))
-	dh_auto_install -- -pcaffe-cuda -plibcaffe-cuda0 -plibcaffe-cuda-dev
+	dh_auto_install --builddirectory=${CAFFE_CUDA_BUILDDIR} \
+		-- install
 endif
 
 # Since the Distributed Binary Caffe can not play the best performance

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



More information about the debian-science-commits mailing list