diff options
Diffstat (limited to 'scripts/package/Makefile')
| -rw-r--r-- | scripts/package/Makefile | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/scripts/package/Makefile b/scripts/package/Makefile index f67cc885c807..62fcc3a7f4d3 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile | |||
| @@ -77,9 +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 | $(CONFIG_SHELL) $(srctree)/scripts/package/builddeb | 100 | $(call cmd,builddeb) |
| 83 | 101 | ||
| 84 | clean-dirs += $(objtree)/debian/ | 102 | clean-dirs += $(objtree)/debian/ |
| 85 | 103 | ||
