summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Mitchell <kevmitch@math.sfu.ca>2014-01-28 19:24:24 -0800
committerKevin Mitchell <kevmitch@math.sfu.ca>2014-01-28 19:24:24 -0800
commit61c98b57b74f1776a763a4befc3684faf0f45548 (patch)
tree9672a7bc5b36e931ddd5d5734e2a95250efa7a05
parent387bda3713f36d7a4040fd2991db7dee4ca67c39 (diff)
downloadmpv-build-61c98b57b74f1776a763a4befc3684faf0f45548.tar.bz2
mpv-build-61c98b57b74f1776a763a4befc3684faf0f45548.tar.xz
fix parallel building in the debian package: ffmpeg at least was only building serially before
-rwxr-xr-xdebian/rules31
1 files changed, 22 insertions, 9 deletions
diff --git a/debian/rules b/debian/rules
index 5b28c4b..5671493 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,39 +5,52 @@ ifeq ($(DEB_HOST_ARCH_CPU),$(filter $(DEB_HOST_ARCH_CPU),powerpc sparc))
export CC=gcc-4.8 # fixes #73363
endif
+# To enable parallel building:
+# You can either set DEB_BUILD_OPTIONS=paralell=<num-procs> in your build environment
+# or provide the -j<numprocs> option to debuild or dpkg-buildpackage, which
+# ammounts to the same thing.
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ # use MFLAGS, rather than MAKEFLAGS as the latter is mysteriously given the "w" flag without "-"
+ MFLAGS += -j$(NUMJOBS)
+ WAFFLAGS += -j$(NUMJOBS)
+endif
+
# make .PHONY all the targets that have name collisions with the scripts
# see http://www.debian.org/doc/manuals/maint-guide/dreq.en.html#rules
.PHONY: clean build install
# Apparently, the above isn't enough because of the "%" target. Make the problematic targets explicit
clean:
- exec dh $@ --parallel
+ exec dh $@
build:
- exec dh $@ --parallel
+ exec dh $@
install:
- exec dh $@ --parallel
-# handle all other targets in the usual way
+ exec dh $@
+# Handle all other targets in the usual way.
+# The --parallel flag to dh doesn't seem to have the intended effect
+# so leave it out.
%:
- exec dh $@ --parallel
+ exec dh $@
+
# this should really create multiple shared object debian packages but
# this will do for now
-
# the dependencies must be built before mpv is configured
ffmpeg_config:
scripts/ffmpeg-config
ffmpeg_build:ffmpeg_config
- scripts/ffmpeg-build
+ scripts/ffmpeg-build $(MFLAGS)
libass_config:
scripts/libass-config
libass_build:libass_config
- scripts/libass-build
+ scripts/libass-build $(MFLAGS)
# put the config in the right place and drop the local/ since it's package managed now
override_dh_auto_configure:ffmpeg_build libass_build
scripts/mpv-config --prefix=/usr --confdir=/etc/mpv
override_dh_auto_build:
- scripts/mpv-build
+ scripts/mpv-build $(WAFLAGS)
# call waf to install to the debian packageing dir
override_dh_auto_install: