summaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.package
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Makefile.package')
-rw-r--r--scripts/Makefile.package6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/Makefile.package b/scripts/Makefile.package
index c207f4ec47ac..80a96eb61426 100644
--- a/scripts/Makefile.package
+++ b/scripts/Makefile.package
@@ -96,7 +96,11 @@ debian-orig: private source = $(shell dpkg-parsechangelog -S Source)
debian-orig: private version = $(shell dpkg-parsechangelog -S Version | sed 's/-[^-]*$$//')
debian-orig: private orig-name = $(source)_$(version).orig.tar.gz
debian-orig: linux.tar.gz debian
- $(Q)cp $< ../$(orig-name)
+ $(Q)if [ "$(df --output=target .. 2>/dev/null)" = "$(df --output=target $< 2>/dev/null)" ]; then \
+ ln -f $< ../$(orig-name); \
+ else \
+ cp $< ../$(orig-name); \
+ fi
PHONY += deb-pkg
deb-pkg: debian-orig