diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/package/Makefile | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/scripts/package/Makefile b/scripts/package/Makefile index 5c0b43aaf63b..62fcc3a7f4d3 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile | |||
@@ -77,10 +77,27 @@ clean-files += $(objtree)/binkernel.spec | |||
77 | 77 | ||
78 | # Deb target | 78 | # Deb target |
79 | # --------------------------------------------------------------------------- | 79 | # --------------------------------------------------------------------------- |
80 | quiet_cmd_builddeb = BUILDDEB | ||
81 | cmd_builddeb = set -e; \ | ||
82 | test `id -u` = 0 || \ | ||
83 | test -n "$(KBUILD_PKG_ROOTCMD)" || { \ | ||
84 | which fakeroot >/dev/null 2>&1 && \ | ||
85 | KBUILD_PKG_ROOTCMD="fakeroot -u"; \ | ||
86 | } || { \ | ||
87 | echo; \ | ||
88 | echo "builddeb must be run as root (or using fakeroot)."; \ | ||
89 | echo "KBUILD_PKG_ROOTCMD is unset and fakeroot not found."; \ | ||
90 | echo "Try setting KBUILD_PKG_ROOTCMD to a command to acquire"; \ | ||
91 | echo "root privileges (e.g., 'fakeroot -u' or 'sudo')."; \ | ||
92 | false; \ | ||
93 | } && \ | ||
94 | \ | ||
95 | $$KBUILD_PKG_ROOTCMD $(CONFIG_SHELL) \ | ||
96 | $(srctree)/scripts/package/builddeb | ||
97 | |||
80 | deb-pkg: FORCE | 98 | deb-pkg: FORCE |
81 | $(MAKE) KBUILD_SRC= | 99 | $(MAKE) KBUILD_SRC= |
82 | $(KBUILD_PKG_ROOTCMD) $(CONFIG_SHELL) \ | 100 | $(call cmd,builddeb) |
83 | $(srctree)/scripts/package/builddeb | ||
84 | 101 | ||
85 | clean-dirs += $(objtree)/debian/ | 102 | clean-dirs += $(objtree)/debian/ |
86 | 103 | ||