Skip to content

Commit

Permalink
kbuild: deb-pkg: specify targets in debian/rules as .PHONY
Browse files Browse the repository at this point in the history
If a file with the same name exists, the target is not run.

For example, the following command fails.

  $ make O=build-arch bindeb-pkg
    [ snip ]
  sed: can't read modules.order: No such file or directory
  make[6]: *** [../Makefile:1577: __modinst_pre] Error 2
  make[5]: *** [../scripts/Makefile.package:150: intdeb-pkg] Error 2
  make[4]: *** [../Makefile:1657: intdeb-pkg] Error 2
  make[3]: *** [debian/rules:14: binary-arch] Error 2
  dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
  make[2]: *** [../scripts/Makefile.package:139: bindeb-pkg] Error 2

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
  • Loading branch information
masahir0y committed Apr 26, 2023
1 parent dbb5f7c commit 9892bd7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/package/mkdebian
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ cat <<EOF > debian/rules
srctree ?= .
KERNELRELEASE = ${KERNELRELEASE}
.PHONY: clean build build-arch build-indep binary binary-arch binary-indep
build-indep:
build-arch:
\$(MAKE) -f \$(srctree)/Makefile ARCH=${ARCH} \
Expand Down

0 comments on commit 9892bd7

Please sign in to comment.