[caffe] 01/01: rules: remove custom-cuda target, fix custom-cpu target
Zhou Mo
cdluminate-guest at moszumanska.debian.org
Tue May 3 10:02:23 UTC 2016
This is an automated email from the git hooks/post-receive script.
cdluminate-guest pushed a commit to branch master
in repository caffe.
commit bef37b9061cf75be552985dc71e01e03a46a5012
Author: Zhou Mo <cdluminate at gmail.com>
Date: Tue May 3 09:54:13 2016 +0000
rules: remove custom-cuda target, fix custom-cpu target
---
debian/rules | 39 ++++++---------------------------------
1 file changed, 6 insertions(+), 33 deletions(-)
diff --git a/debian/rules b/debian/rules
index 791a7c3..02f41d8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,7 +13,7 @@ RULES := debian/rules
ORIG_SOURCE := "https://github.com/BVLC/caffe/archive/rc3.tar.gz"
CAFFE_SOVER := "1.0.0-rc3"
-BUILDDIR := "build"
+BUILDDIR := "caffe_cpu_build"
SUITE := caffe-cpu libcaffe-cpu1 libcaffe-cpu-dev python-caffe-cpu
SUITE_P := $(foreach PKG, $(SUITE), --package=$(PKG))
@@ -106,14 +106,14 @@ get-orig-source:
## For the custom build instruction please see README.Debian
##
CUSTOM_JOBS := "-j5" # number of cores plus 1
-CONFFLAG_CPU_CUSTOM = $(CMAKE_CONFIGURE_TEMPLATE) \
+CONFFLAG_CPU_CUSTOM = \
+ $(CMAKE_CONFIGURE_TEMPLATE) \
-DCMAKE_INSTALL_PREFIX="$(shell pwd)/debian/tmp/caffe_cpu" \
-DCPU_ONLY=ON
-CONFFLAG_CUDA_CUSTOM = $(CMAKE_CONFIGURE_TEMPLATE) \
- -DCMAKE_INSTALL_PREFIX="$(shell pwd)/debian/tmp/caffe_cuda" \
- -DCPU_ONLY=OFF
#
-.PHONY: custom-cpu custom-cuda
+CAFFE_CPU_BUILDDIR=$(BUILDDIR)
+SUITE_CPU_P=$(SUITE)
+.PHONY: custom-cpu
custom-cpu:
dch --local='+custom' "Local custom build of caffe-cpu packages."
dch "Host Info: `uname -a`"
@@ -134,31 +134,4 @@ custom-cpu:
-P cmake_install.cmake
-$(RM) debian/*.symbols
fakeroot dh binary $(SUITE_CPU_P)
-custom-cuda:
-ifeq (installed, $(shell dpkg -s nvidia-cuda-toolkit | grep -o installed))
- dch --local='+custom' "Local custom build of caffe-cuda packages."
- dch "Host Info: `uname -a`"
- dpkg-source --after-build ./
- dpkg-source --before-build ./
- dh_auto_clean --builddirectory=$(CAFFE_CUDA_BUILDDIR)
- mkdir $(CAFFE_CUDA_BUILDDIR)
- $(RULES) autogen
- dh_auto_configure --builddirectory=$(CAFFE_CUDA_BUILDDIR) -- \
- $(CONFFLAG_CUDA_CUSTOM)
- cd $(CAFFE_CUDA_BUILDDIR); cmake $(CONFFLAG_CUDA_CUSTOM) \
- -DCMAKE_INSTALL_PREFIX="$(shell pwd)/debian/tmp/caffe_cuda" ..
- dh_auto_build --builddirectory=$(CAFFE_CUDA_BUILDDIR) -- $(CUSTOM_JOBS) \
- all caffe pycaffe test.testbin
- # note the '-' sign, some amd64 build machines have no GPU,
- # so this test is allowed to fail.
- -dh_auto_test --builddirectory=$(CAFFE_CUDA_BUILDDIR) \
- -- runtest LD_LIBRARY_PATH=$(CAFFE_CUDA_BUILDDIR)/lib/
- dh_auto_install --builddirectory=$(CAFFE_CUDA_BUILDDIR) -- install
- cd $(CAFFE_CUDA_BUILDDIR); cmake -DCMAKE_INSTALL_CONFIG_NAME="Release" \
- -P cmake_install.cmake
- -$(RM) debian/*.symbols
- fakeroot dh binary $(SUITE_CUDA_P)
-else
- @echo "PLEASE INSTALL PACKAGE 'nvidia-cuda-toolkit'"
-endif
#### END: CUSTOM TARGETS ##############################################
--
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