[caffe] 04/04: rules: update costom target, custom-cpu build OK

Zhou Mo cdluminate-guest at moszumanska.debian.org
Wed Mar 9 09:42:19 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 f3d726e546178b570975537ca48a8a5dca06cf2d
Author: Zhou Mo <cdluminate at gmail.com>
Date:   Wed Mar 9 09:34:29 2016 +0000

    rules: update costom target, custom-cpu build OK
---
 debian/rules | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/debian/rules b/debian/rules
index 4bc8d7d..d8c23a6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -175,12 +175,12 @@ CUSTOM_JOBS   := "-j5" # number of cores plus 1
 CONFFLAG_CPU_CUSTOM = $(CMAKE_CONFIGURE_TEMPLATE) \
 	-DCMAKE_CXX_COMPILER=g++ \
 	-DCMAKE_C_COMPILER=gcc \
-	-DCMAKE_INSTALL_PREFIX="/caffe_cpu" \
+	-DCMAKE_INSTALL_PREFIX="$(shell pwd)/debian/tmp/caffe_cpu" \
 	-DCPU_ONLY=ON
 CONFFLAG_CUDA_CUSTOM = $(CMAKE_CONFIGURE_TEMPLATE) \
 	-DCMAKE_CXX_COMPILER=g++-5 \
 	-DCMAKE_C_COMPILER=gcc-5 \
-	-DCMAKE_INSTALL_PREFIX="/caffe_cuda" \
+	-DCMAKE_INSTALL_PREFIX="$(shell pwd)/debian/tmp/caffe_cuda" \
 	-DCPU_ONLY=OFF
 #
 .PHONY: custom-cpu custom-cuda
@@ -190,8 +190,9 @@ custom-cpu:
 	dpkg-source --before-build ./
 	dh_auto_clean --builddirectory=${CAFFE_CPU_BUILDDIR}
 	mkdir ${CAFFE_CPU_BUILDDIR}
-	cd ${CAFFE_CPU_BUILDDIR}; cmake $(CONFFLAG_CPU_CUSTOM) \
-			-DCMAKE_INSTALL_PREFIX="$(shell pwd)/debian/tmp/caffe_cpu" ..
+	$(RULES) autogen
+	dh_auto_configure --builddirectory=${CAFFE_CPU_BUILDDIR} -- \
+		$(CONFFLAG_CPU_CUSTOM)
 	dh_auto_build --builddirectory=${CAFFE_CPU_BUILDDIR} -- $(CUSTOM_JOBS) \
 			all caffe pycaffe test.testbin
 	# For Caffe's CPU-ONLY version it should not fail.
@@ -207,6 +208,9 @@ custom-cuda:
 	dpkg-source --after-build ./
 	dpkg-source --before-build ./
 	dh_auto_clean --builddirectory=${CAFFE_CUDA_BUILDDIR}
+	$(RULES) autogen
+	dh_auto_configure --builddirectory=${CAFFE_CUDA_BUILDDIR} -- \
+		$(CONFFLAG_CUDA_CUSTOM)
 	mkdir ${CAFFE_CUDA_BUILDDIR}
 	cd ${CAFFE_CUDA_BUILDDIR}; cmake $(CONFFLAG_CUDA_CUSTOM) \
 			-DCMAKE_INSTALL_PREFIX="$(shell pwd)/debian/tmp/caffe_cuda" ..

-- 
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