diff --git a/Makefile b/Makefile index 92831a6d4..77ad72294 100644 --- a/Makefile +++ b/Makefile @@ -387,7 +387,7 @@ dpkg: ../scst_$(VERSION).orig.tar.gz else \ buildopts+=(-j4); \ fi && \ - debuild "$${buildopts[@]}" --lintian-opts --profile debian && \ + DEB_KVER_SET=$(KVER) DEB_KDIR_SET=$(KDIR) debuild "$${buildopts[@]}" --lintian-opts --profile debian && \ mkdir -p dpkg && \ for f in "$${output_files[@]}" ../scst_$(VERSION).orig.tar.[gx]z; do\ mv $$f dpkg || true; \ diff --git a/debian/rules b/debian/rules index f78e364a0..8342862e9 100755 --- a/debian/rules +++ b/debian/rules @@ -17,6 +17,11 @@ SUBDIRS=scst fcst iscsi-scst qla2x00t/qla2x00-target scst_local scstadmin srpt DESTDIR=$(CURDIR)/debian/tmp VERSION:=$(shell head -n1 debian/changelog | sed 's/.*(\([0-9.]*\).*).*/\1/') +# rules won't see variables unless they're using DEB_foo_SET syntax. So use that as +# an intermediary. Also, export variables for sub-makes to be able to see them. +export KVER=$(DEB_KVER_SET) +export KDIR=$(DEB_KDIR_SET) + %: echo "*** dh $@ ***" dh $@