Commit a91f98a2 authored by Sam Ravnborg's avatar Sam Ravnborg

kbuild: Fix bug in make deb-pkg when using seperate source and output directories

From: Ryan Anderson <>

When running "make O=something deb-pkg", I get a failure that claims I
haven't configured my kernel (I have).  Running it a second time tells
me to run "make mrproper"  (include/linux/version.h got built on the
first run)

Original patch from:
From: Ajay Patel <>

With modifications from:
Signed-off-By: default avatarRyan Anderson <>
Signed-off-by: default avatarSam Ravnborg <>
parent dc5962fd
......@@ -59,7 +59,7 @@ $(objtree)/binkernel.spec: $(MKSPEC) $(srctree)/Makefile
$(CONFIG_SHELL) $(MKSPEC) prebuilt > $@
binrpm-pkg: $(objtree)/binkernel.spec
set -e; \
$(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
set -e; \
......@@ -74,7 +74,7 @@ clean-files += $(objtree)/binkernel.spec
.PHONY: deb-pkg
$(CONFIG_SHELL) $(srctree)/scripts/package/builddeb
clean-dirs += $(objtree)/debian/
......@@ -41,7 +41,7 @@ else
if grep -q '^CONFIG_MODULES=y' .config ; then
INSTALL_MOD_PATH="$tmpdir" make modules_install
INSTALL_MOD_PATH="$tmpdir" make KBUILD_SRC= modules_install
if [ "$ARCH" == "um" ] ; then
mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/"
rmdir "$tmpdir/lib/modules/$version"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment