diff --git a/Makefile b/Makefile
index 1c97c0c94c16cf516526f52f6afbb8c66ec6c09b..5f7ddd3ee3fce10fdc3a29c9c11f237176cd1f28 100644
--- a/Makefile
+++ b/Makefile
@@ -85,8 +85,8 @@ export macos_target = 10.9
 
 # Installation prefix under which Pd-l2ork is installed (Linux only). If this
 # isn't set, a default location will be used (usually /usr/local). NOTE: We
-# *always* assume that this variable is set properly in the install targets
-# (see below).
+# *always* assume that this variable is set properly in the install targets,
+# as well as the (Linux) check target (see below).
 prefix = /usr
 
 ifneq ($(prefix),)
@@ -164,7 +164,7 @@ os = $(shell uname|sed 's/^\(MINGW[0-9]*\)_NT.*/\1/')
 
 ifeq ($(os),Linux)
 # Linux (all flavors)
-pdprog = packages/linux_make/build/usr/bin/pd-l2ork
+pdprog = packages/linux_make/build$(prefix)/bin/pd-l2ork
 else ifeq ($(os),Darwin)
 # Mac
 pdprog = packages/darwin_app/build/*.app/Contents/Resources/app.nw/bin/pd-l2ork
diff --git a/debuild/debian/rules b/debuild/debian/rules
index 2f3f245fd447469c79ef886186032362509f0acd..33fbf0dfa436c44b23aacf68aa5f43cbf3a7ad8f 100755
--- a/debuild/debian/rules
+++ b/debuild/debian/rules
@@ -30,14 +30,16 @@ override_dh_auto_configure:
 
 override_dh_auto_clean:
 
-# Need to disable this, 'make check' currently fails, probably due to our
-# meddling with the directory layout, executable names, etc.
+# This runs too late, 'make check' then fails, probably due to our meddling
+# with the directory layout, executable names, etc., during 'make install'.
+# Instead we invoke 'make check' right after the build, see below.
 override_dh_auto_test:
 
 override_dh_auto_build:
 # Copy the nw.js sources to where purr-data wants them.
 	tar -xf debian/nwjs/$(nwjspkg)-$(arch).tar.gz && rm -rf pd/nw/nw && mv $(nwjspkg)-$(arch) pd/nw/nw
-	cd l2ork_addons && (export inst_dir=$(prefix); ./tar_em_up.sh -B -n)
+	cd l2ork_addons && (export V=0 inst_dir=$(prefix); ./tar_em_up.sh -Bn)
+	make check prefix=$(prefix)
 
 override_dh_auto_install:
 	mkdir -p debian/purr-data && mv packages/linux_make/build/* debian/purr-data