aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Thayne Harbaugh <thayne@mastodonlabs.com> 2024-06-15 23:34:54 -0600
committerGravatar Masahiro Yamada <masahiroy@kernel.org> 2024-06-26 00:18:57 +0900
commitc61566538968ffb040acc411246fd7ad38c7e8c9 (patch)
tree83c08b7685e7d7ac8bd731cba3da640b040c3aa7 /scripts
parentkbuild: doc: Update default INSTALL_MOD_DIR from extra to updates (diff)
downloadlinux-c61566538968ffb040acc411246fd7ad38c7e8c9.tar.gz
linux-c61566538968ffb040acc411246fd7ad38c7e8c9.tar.bz2
linux-c61566538968ffb040acc411246fd7ad38c7e8c9.zip
kbuild: Fix build target deb-pkg: ln: failed to create hard link
The make deb-pkg target calls debian-orig which attempts to either hard link the source .tar to the build-output location or copy the source .tar to the build-output location. The test to determine whether to ln or cp is incorrectly expanded by Make and consequently always attempts to ln the source .tar. This fix corrects the escaping of '$' so that the test is expanded by the shell rather than by Make and appropriately selects between ln and cp. Fixes: b44aa8c96e9e ("kbuild: deb-pkg: make .orig tarball a hard link if possible") Signed-off-by: Thayne Harbaugh <thayne@mastodonlabs.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.package2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/Makefile.package b/scripts/Makefile.package
index 38653f3e8108..bf016af8bf8a 100644
--- a/scripts/Makefile.package
+++ b/scripts/Makefile.package
@@ -103,7 +103,7 @@ debian-orig: private version = $(shell dpkg-parsechangelog -S Version | sed 's/-
debian-orig: private orig-name = $(source)_$(version).orig.tar$(debian-orig-suffix)
debian-orig: mkdebian-opts = --need-source
debian-orig: linux.tar$(debian-orig-suffix) debian
- $(Q)if [ "$(df --output=target .. 2>/dev/null)" = "$(df --output=target $< 2>/dev/null)" ]; then \
+ $(Q)if [ "$$(df --output=target .. 2>/dev/null)" = "$$(df --output=target $< 2>/dev/null)" ]; then \
ln -f $< ../$(orig-name); \
else \
cp $< ../$(orig-name); \