]> git.dujemihanovic.xyz Git - linux.git/commitdiff
kbuild: deb-pkg: specify targets in debian/rules as .PHONY
authorMasahiro Yamada <masahiroy@kernel.org>
Tue, 25 Apr 2023 11:08:59 +0000 (20:08 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Wed, 26 Apr 2023 12:10:51 +0000 (21:10 +0900)
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>
scripts/package/mkdebian

index a4c2c2276223fa1de435344c80e74a7afdbbe389..b6cb95473548ecf1e5faf9a7559cb1ae117ca1f2 100755 (executable)
@@ -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} \