kbuild: Fix packaging targets with relative $(srctree)
authorMichal Marek <mmarek@suse.cz>
Fri, 4 Jul 2014 20:53:52 +0000 (22:53 +0200)
committerMichal Marek <mmarek@suse.cz>
Fri, 4 Jul 2014 20:58:55 +0000 (22:58 +0200)
All other users of Makefile.build set $(obj) to the name of the
subdirectory to build. Do the same for the packaging targets, otherwise
the build fails if $(srctree) is a relative directory:

    $ make O=build tar-pkg
    make[1]: Entering directory `/home/mmarek/linux-2.6/build'
      CHK     include/config/kernel.release
    ../scripts/Makefile.build:44: ../../scripts/package/Makefile: No such file or directory
    make[2]: *** No rule to make target `../../scripts/package/Makefile'.  Stop.

Fixes: 9da0763b ("kbuild: Use relative path when building in a subdir of the source tree")
Signed-off-by: Michal Marek <mmarek@suse.cz>
Makefile

index 1a5f9f3c7a585d71e05d1bae05b95cc6315b1c32..347d6c7c73140068bc8a960fec1115baa12f99cc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1176,7 +1176,7 @@ distclean: mrproper
 # Packaging of the kernel to various formats
 # ---------------------------------------------------------------------------
 # rpm target kept for backward compatibility
-package-dir    := $(srctree)/scripts/package
+package-dir    := scripts/package
 
 %src-pkg: FORCE
        $(Q)$(MAKE) $(build)=$(package-dir) $@