linux/scripts/package
Masahiro Yamada 21b42eb468 kbuild: rpm-pkg: fix binrpm-pkg breakage when O= is used
Zhenzhong Duan reported that running 'make O=/build/kernel binrpm-pkg'
failed with the following errors:

  Running 'make O=/build/kernel binrpm-pkg' failed with below two errors.

  Makefile:600: include/config/auto.conf: No such file or directory

  + cp make -C /mnt/root/kernel O=/build/kernel image_name make -f
  /mnt/root/kernel/Makefile ...
  cp: invalid option -- 'C'
  Try 'cp --help' for more information.

Prior to commit 80463f1b7b ("kbuild: add --include-dir flag only
for out-of-tree build"), both srctree and objtree were added to
--include-dir redundantly, and the wrong code 'make image_name'
was working by relying on that. Now, the potential issue that had
previously been hidden just showed up.

'make image_name' recurses to the generated $(objtree)/Makefile and
ends up with running in srctree, which is incorrect. It should be
invoked with '-f $srctree/Makefile' (or KBUILD_SRC=) to be executed
in objtree.

Fixes: 80463f1b7b ("kbuild: add --include-dir flag only for out-of-tree build")
Reported-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-11-06 01:28:48 +09:00
..
builddeb kbuild: deb-pkg: split generating packaging and build 2018-04-07 19:04:02 +09:00
buildtar kbuild: buildtar: add arm64 support 2018-07-19 08:40:28 +09:00
Makefile kbuild: deb-pkg: split generating packaging and build 2018-04-07 19:04:02 +09:00
mkdebian builddeb: Add automatic support for sh{3,4}{,eb} architectures 2018-07-28 10:53:44 +09:00
mkspec kbuild: rpm-pkg: fix binrpm-pkg breakage when O= is used 2018-11-06 01:28:48 +09:00
snapcraft.template scripts/package: snap-pkg target 2017-12-13 00:00:18 +09:00